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

Last change on this file since 17951 was 17951, checked in by tbretz, 11 years ago
A central current predictor.
File size: 1.2 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 using namespace Nova;
11
12 double PredictI(const double &jd, const EquPosn &src_pos)
13 {
14 // Sun properties
15 const EquPosn sun = GetSolarEquCoords(jd);
16 const ZdAzPosn hrzs = GetHrzFromEqu(sun, jd);
17
18 // Moon properties
19 const EquPosn moon = GetLunarEquCoords(jd, 0.01);
20 const HrzPosn hrzm = GetHrzFromEqu(moon, jd);
21 const double disk = GetLunarDisk(jd);
22
23 // Derived moon properties
24 const double angle = GetAngularSeparation(moon, src_pos);
25 const double edist = GetLunarEarthDist(jd)/384400;
26
27 // Current prediction
28 const double sin_malt = hrzm.alt<0 ? 0 : sin(hrzm.alt*M_PI/180);
29 const double cos_mdist = cos(angle*M_PI/180);
30 const double sin_szd = sin(hrzs.zd*M_PI/180);
31
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);
35 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);
37
38 return 6.2 + 95.7*c0*c1*c2*c3 + c4; // [muA]
39 }
40}
41
42#endif
Note: See TracBrowser for help on using the repository browser.