/[PAMELA software]/DarthVader/OrbitalInfo/inc/OrbitalInfoCore.h
ViewVC logotype

Annotation of /DarthVader/OrbitalInfo/inc/OrbitalInfoCore.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download)
Mon Jan 19 12:32:11 2015 UTC (9 years, 10 months ago) by mocchiut
Branch: MAIN
Changes since 1.10: +4 -3 lines
File MIME type: text/plain
Bugs in OrbitalInfo code fixed: wrong Earth B-field computation, OICore memory leaks, Rotation tables bug + new IGRF12 parameters added

1 mocchiut 1.1 #ifndef OrbitalInfoCore_h
2     #define ObitalInfoCore_h
3     #include <TSQLServer.h>
4 mocchiut 1.3 #include <TTimeStamp.h>
5 mocchiut 1.4 #include <InclinationInfo.h>
6 mocchiut 1.6 #include <OrientationInfo.h>
7     #include <ToFLevel2.h>
8 mocchiut 1.3
9     #include <sgp4.h>
10    
11     extern "C" {
12     #include <dirent.h>
13 mocchiut 1.11 extern void initize_(Int_t *, Char_t *,Int_t *,Char_t *,Int_t *); // 10RED BUG: wrong extra/interpolation of Earth magnetic field
14     extern void feldcof_(Float_t *, Float_t *);
15 mocchiut 1.7 extern void feldg_(Float_t *, Float_t *, Float_t *, Float_t *, Float_t *, Float_t *, Float_t *);
16 mocchiut 1.11 extern void shellg_(Float_t *, Float_t *, Float_t *, Float_t *, Float_t *, Float_t *, Float_t *);
17 mocchiut 1.7 extern void findb0_(Float_t *, Float_t *, Bool_t *, Float_t *, Float_t *);
18    
19     /* //INITIZE(YEAR,DIMO) */
20     /* extern void initize_(char[], int*, char[], int*, char[], int*); */
21     /* //FELDCOF(YEAR,DIMO) */
22     /* extern void feldcof_(float*, float*); */
23     /* //FELDG(LATI,LONGI,HEIGHT,BNORTH,BEAST,BDOWN,BABS) */
24     /* extern void feldg_(float*, float*, float*, float*, float*, float*, float*); */
25     /* //SHELLG(LATI,LONGI,HEIGHT,DIMO,XL,ICODE,BAB1) */
26     /* extern void shellg_(float*, float*, float*, float*, float*, float*, float*); */
27     /* //FINDB0(STPS,BDEL,VALUE,BEQU,RR0) */
28     /* extern void findb0_(float*, float*, bool*, float*, float*); */
29 mocchiut 1.3 }
30    
31 pam-mep 1.10 /*
32 mocchiut 1.8 struct Sine{
33     Double_t A;
34     Double_t b;
35     Double_t c;
36     Double_t startPoint;
37     Double_t finishPoint;
38     Bool_t NeedFit;
39     };
40 pam-mep 1.10 */
41    
42     // Parameters to calculate geomagnetic coordinates
43    
44     Int_t GM_STARTYEAR = 1900;
45    
46     typedef struct {
47     int Day;
48     int Month;
49     int Year;
50     double DecimalYear;
51     int DayNumber;
52     } GMtype_Date;
53    
54     typedef struct {
55     double lambda;// longitude
56     double phi; // geodetic latitude
57     double HeightAboveEllipsoid; // height above the ellipsoid (HaE)
58     } GMtype_CoordGeodetic;
59    
60     typedef struct {
61     double r; //radial distance
62     double phig; //latitude
63     double lambda; //longitude
64     } GMtype_CoordSpherical;
65     typedef struct {
66     double lambda;
67     double phi;
68     } GMtype_CoordDipole;
69    
70     typedef struct {
71     double x;
72     double y;
73     double z;
74     } GMtype_CoordCartesian;
75    
76     typedef struct {
77     double a; /*semi-major axis of the ellipsoid*/
78     double b; /*semi-minor axis of the ellipsoid*/
79     double fla; /* flattening */
80     double epssq; /*first eccentricity squared */
81     double eps; /* first eccentricity */
82     double re;/* mean radius of ellipsoid*/
83     } GMtype_Ellipsoid;
84    
85     typedef struct {
86     int degree;
87     double coef[30];
88     } GMtype_Polynomial;
89    
90     typedef struct {
91     double h1;
92     double g1;
93     double g0;
94     } GMtype_Model;
95    
96     typedef struct {
97     double M; /*Magnetic Moment*/
98     double phi;
99     double lambda;
100     } GMtype_Pole;
101    
102     typedef struct{
103     int size;
104     double element[30];
105     } GMtype_Data;
106    
107 mocchiut 1.1
108 mocchiut 1.5 extern int OrbitalInfoCore(UInt_t run, TFile *file, GL_TABLES *glt, Int_t orbitalargc, char *orbitalargv[]);
109 mocchiut 1.3 cCoordGeo getCoo(UInt_t atime, UInt_t tletime, cTle *tle);
110 mocchiut 1.4 void CopyQ(Quaternions *Q1, Quaternions *Q2);
111     void CopyAng(InclinationInfo *A1, InclinationInfo *A2);
112     UInt_t holeq(Double_t lower,Double_t upper,Quaternions *Qlower, Quaternions *Qupper, UInt_t f);
113 mocchiut 1.8 void inclresize(vector<Double_t>&, vector<Float_t>&, vector<Float_t>&, vector<Float_t>&, vector<Float_t>&, vector<Int_t>&, vector<Float_t>&, vector<Float_t>&, vector<Float_t>&);
114 pam-mep 1.10 //void sineparam(vector<Sine>&, vector<Double_t>&, vector<Float_t>&, vector<Float_t>&, vector<Float_t>&, Float_t);
115     //void GM_ScanIGRF(TString PATH, GMtype_Data *G0, GMtype_Data *G1, GMtype_Data *H1);
116     void GM_ScanIGRF(TSQLServer *dbc, GMtype_Data *G0, GMtype_Data *G1, GMtype_Data *H1);
117 mocchiut 1.11 void GM_SetIGRF(Int_t isSecular,TString iFile1,TString iFile2, GMtype_Data *G0, GMtype_Data *G1, GMtype_Data *H1);
118 pam-mep 1.10 void GM_SetEllipsoid(GMtype_Ellipsoid *Ellip);
119     void GM_GeodeticToSpherical(GMtype_Ellipsoid Ellip, GMtype_CoordGeodetic CoordGeodetic, GMtype_CoordSpherical *CoordSpherical);
120     void GM_SphericalToCartesian(GMtype_CoordSpherical CoordSpherical, GMtype_CoordCartesian *CoordCartesian);
121     void GM_TimeAdjustCoefs(Float_t year, Float_t jyear, GMtype_Data g0d, GMtype_Data g1d, GMtype_Data h1d, GMtype_Model *Model);
122     void GM_PoleLocation(GMtype_Model Model, GMtype_Pole *Pole);
123     void GM_EarthCartToDipoleCartCD(GMtype_Pole Pole, GMtype_CoordCartesian EarthCoord, GMtype_CoordCartesian *DipoleCoords);
124     void GM_CartesianToSpherical(GMtype_CoordCartesian CoordCartesian, GMtype_CoordSpherical *CoordSpherical);
125     double GM_LinearInterpolation(double x1, double x2, double y1, double y2, double x);
126 mocchiut 1.1
127     #endif

  ViewVC Help
Powered by ViewVC 1.1.23