FACT++  1.0
Prediction.h
Go to the documentation of this file.
1 #ifndef MARS_Prediction
2 #define MARS_Prediction
3 
4 #include <math.h>
5 
6 #include "nova.h"
7 
8 namespace 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
Namespace to help with some general things in the program initialization.
Definition: Prediction.h:8
HrzPosn fMoonHrz
Definition: nova.h:168
HrzPosn fSunHrz
Definition: nova.h:165
double fEarthDist
Definition: nova.h:171
EquPosn fMoonEqu
Definition: nova.h:167
double fMoonDisk
Definition: nova.h:169
double GetAngularSeparation(const EquPosn &p1, const EquPosn &p2)
Definition: nova.h:148
double PredictI(const Nova::SolarObjects &so, const Nova::EquPosn &srcEqu)
Definition: Prediction.h:10