Changeset 17952
- Timestamp:
- 08/13/14 12:31:07 (10 years ago)
- Location:
- trunk/Mars/mcore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/Prediction.h
r17951 r17952 8 8 namespace FACT 9 9 { 10 using namespace Nova; 11 12 double PredictI(const double &jd, const EquPosn &src_pos) 10 double PredictI(const Nova::SolarObjects &so, const Nova::EquPosn &srcEqu) 13 11 { 14 // Sun properties15 const EquPosn sun = GetSolarEquCoords(jd);16 const ZdAzPosn hrzs = GetHrzFromEqu(sun, jd);17 18 // Moon properties19 const EquPosn moon = GetLunarEquCoords(jd, 0.01);20 const HrzPosn hrzm = GetHrzFromEqu(moon, jd);21 const double disk = GetLunarDisk(jd);22 23 12 // Derived moon properties 24 const double angle = GetAngularSeparation(moon, src_pos);25 const double edist = GetLunarEarthDist(jd)/384400;13 const double angle = Nova::GetAngularSeparation(so.fMoonEqu, srcEqu); 14 const double edist = so.fEarthDist/384400; 26 15 27 16 // Current prediction 28 const double sin_malt = hrzm.alt<0 ? 0 : sin(hrzm.alt*M_PI/180);17 const double sin_malt = so.fMoonHrz.alt<0 ? 0 : sin(so.fMoonHrz.alt*M_PI/180); 29 18 const double cos_mdist = cos(angle*M_PI/180); 30 const double sin_szd = sin(hrzs.zd*M_PI/180);19 const double cos_salt = cos(so.fSunHrz.alt*M_PI/180); 31 20 32 const double c0 = pow( disk,2.63);33 const double c1 = pow(sin_malt, 0.60);34 const double c2 = pow(edist, -2.00);21 const double c0 = pow(so.fMoonDisk, 2.63); 22 const double c1 = pow(sin_malt, 0.60); 23 const double c2 = pow(edist, -2.00); 35 24 const double c3 = exp(0.67*cos_mdist*cos_mdist*cos_mdist*cos_mdist); 36 const double c4 = exp(-97.8+105.8* sin_szd*sin_szd);25 const double c4 = exp(-97.8+105.8*cos_salt*cos_salt); 37 26 38 27 return 6.2 + 95.7*c0*c1*c2*c3 + c4; // [muA] 28 } 29 30 double PredictI(const double &jd, const Nova::EquPosn &srcEqu) 31 { 32 return PredictI(Nova::SolarObjects(jd), srcEqu); 39 33 } 40 34 } -
trunk/Mars/mcore/nova.h
r16974 r17952 157 157 return ln_get_angular_separation(&p1, &p2); 158 158 } 159 160 struct SolarObjects 161 { 162 double fJD; 163 164 EquPosn fSunEqu; 165 HrzPosn fSunHrz; 166 167 EquPosn fMoonEqu; 168 HrzPosn fMoonHrz; 169 double fMoonDisk; 170 171 double fEarthDist; 172 173 SolarObjects(const double &jd, const LnLatPosn &obs=Nova::ORM()) 174 { 175 fJD = jd; 176 177 // Sun properties 178 fSunEqu = GetSolarEquCoords(jd); 179 fSunHrz = GetHrzFromEqu(fSunEqu, obs, jd); 180 181 // Moon properties 182 fMoonEqu = GetLunarEquCoords(jd, 0.01); 183 fMoonHrz = GetHrzFromEqu(fMoonEqu, obs, jd); 184 185 fMoonDisk = GetLunarDisk(jd); 186 fEarthDist = GetLunarEarthDist(jd); 187 } 188 }; 189 159 190 } 160 191
Note:
See TracChangeset
for help on using the changeset viewer.