00001 00013 #ifndef INC_MI32_SUNCALC_H 00014 #define INC_MI32_SUNCALC_H 00015 00016 #ifndef INC_MI32_DATETIME_H 00017 #include <mi32/datetime.h> 00018 #endif 00019 00020 #ifndef INC_MI32_POINT_H 00021 #include <mi32/point.h> 00022 #endif 00023 00025 class SUN_POSN_CALCULATOR { 00026 public: 00027 SUN_POSN_CALCULATOR ( ) { }; 00028 00029 SUN_POSN_CALCULATOR ( 00030 const DATETIME& datetime, 00031 const DPOINT2D& latlon 00032 ); 00033 00034 ~SUN_POSN_CALCULATOR () { } 00035 00037 void SetLocation (const DPOINT2D& location); 00038 00040 const DPOINT2D& GetLocation () const; 00041 00043 void SetDateTime (const DATETIME& datetime); 00044 00046 const DATETIME& GetDateTime() const; 00047 00050 ERRVALUE Calculate ( 00051 double& SunAzimuth, 00052 double& SunElevation 00053 ); 00054 00056 double GetSunAzimuth ( ) { return (m_SunAzimuth); }; 00057 00059 double GetSunElevationAngle ( ) { return (m_SunElevation); }; 00060 00061 private: 00062 double CalcMeanObliquityOfEcliptic ( double &t ); 00063 double CalcObliquityCorrection ( double &t ); 00064 double CalcGeomMeanLongSun ( double &t ); 00065 double CalcEccentricityEarthOrbit ( double &t ); 00066 double CalcSunEqOfCenter ( double &t ); 00067 double CalcGeomMeanAnomalySun ( double &t ); 00068 double CalcEquationOfTime ( double &t ); 00069 double CalcSunApparentLong ( double &t ); 00070 double CalcSunDeclination ( double &t ); 00071 double CalcSunTrueLong ( double &t ); 00072 double CalcTimeJulianCent ( double ); 00073 00074 DPOINT2D m_Location; 00075 DATETIME m_DateTime; 00076 00077 double m_SunAzimuth; 00078 double m_SunElevation; 00079 }; 00080 00081 #endif 00082
1.6.1