/* * File: SoPo.h * Author: hermann * * Created on October 20, 2020, 7:01 PM */ #ifndef SOPO_H #define SOPO_H #define LATITUDE 45 #define LONGITUDE 5 #define PRESSURE 1000.0 #define TEMPERATURE 22.0 #define YEAR 2020 #define MONTH 10 #define DAY 20 #define HOUR 0 #define MIN 0 #define SEC 0 class Date { private: int year, month, monthday, day, hour, minute,second; // float Delta_T; // ?T = Terrestrial Time (TT) - Universal Time (UT) [seconds] // float second_deltaT ; // Seconds of present time corrected by ?T public: float T,JD_frac; int32_t JD_whole,JDx; void SetDate(int16_t y, int16_t m, int16_t d); void CalcJulian(int16_t h, int16_t mm, int16_t s); }; class SoPo { public: float deg_elev,deg_azimuth; // deg float r_elev,r_azimuth; // rad float deg_elev_corr; // corrected for atmospheric refraction float Lat, Lon; float SinLat, CosLat; float p0, Temp; // pressure im mbar and temperature in °C SoPo(float Latitude, float Longitude); void Calc_SoPo(Date DD); void Set_T_P(float p, float t) // set pressure and temperature at regular intervals { p0 = p; Temp = t; } }; // ==================== Make instance Global =================== extern Date DD; extern SoPo SunPos; //================================================================ #endif /* SOPO_H */