source: trunk/Mars/mcore/Prediction.h@ 19971

Last change on this file since 19971 was 17952, checked in by tbretz, 10 years ago
Use a general object which stored the coordinates of the solar objects so that it can be re-used.
File size: 1.1 KB
Line 
1#ifndef MARS_Prediction
2#define MARS_Prediction
3
4#include <math.h>
5
6#include "nova.h"
7
8namespace FACT
9{
10 double PredictI(const Nova::SolarObjects &so, const Nova::EquPosn &srcEqu)
11 {
12 // Derived moon properties
13 const double angle = Nova::GetAngularSeparation(so.fMoonEqu, srcEqu);
14 const double edist = so.fEarthDist/384400;
15
16 // Current prediction
17 const double sin_malt = so.fMoonHrz.alt<0 ? 0 : sin(so.fMoonHrz.alt*M_PI/180);
18 const double cos_mdist = cos(angle*M_PI/180);
19 const double cos_salt = cos(so.fSunHrz.alt*M_PI/180);
20
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);
24 const double c3 = exp(0.67*cos_mdist*cos_mdist*cos_mdist*cos_mdist);
25 const double c4 = exp(-97.8+105.8*cos_salt*cos_salt);
26
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);
33 }
34}
35
36#endif
Note: See TracBrowser for help on using the repository browser.