1 |
#include <OrbitalInfo.h> |
#include <OrbitalInfo.h> |
2 |
|
|
3 |
OrbitalInfo::OrbitalInfo(){ |
using namespace std; |
|
absTime = 0; |
|
|
OBT = 0; |
|
|
pkt_num = 0; |
|
4 |
|
|
5 |
lon = 0.; |
ClassImp(OrbitalInfoTrkVar); |
6 |
lat = 0.; |
ClassImp(OrbitalInfo); |
|
alt = 0.; |
|
|
|
|
|
Bnorth = 0.; |
|
|
Beast = 0.; |
|
|
Bdown = 0.; |
|
|
Babs = 0.; |
|
|
BB0 = 0.; |
|
|
L = 0.; |
|
|
|
|
|
londip = -1000.; |
|
|
latdip = -1000.; |
|
|
altdip = -1000.; |
|
|
|
|
|
loncgm = -1000.; |
|
|
latcgm = -1000.; |
|
|
altcgm = -1000.; |
|
|
|
|
|
loncbm = -1000.; |
|
|
latcbm = -1000.; |
|
|
altcbm = -1000.; |
|
7 |
|
|
8 |
std::fill_n(cutoff, 20, 0.); |
OrbitalInfoTrkVar::OrbitalInfoTrkVar(){ |
9 |
|
this->Clear(); |
10 |
|
// Eij = new TMatrixD(3,3); |
11 |
|
// Sij = new TMatrixD(3,3); |
12 |
|
} |
13 |
|
|
14 |
// Quaternions |
void OrbitalInfoTrkVar::Clear(Option_t *t){ |
15 |
q0 = -1000.; |
trkseqno = 0; |
16 |
q1 = -1000.; |
pitch = -1000.; |
17 |
q2 = -1000.; |
Eij.Zero(); |
18 |
q3 = -1000.; |
Sij.Zero(); |
19 |
|
} |
20 |
|
|
21 |
// Euler angles (nadir reference frame) |
void OrbitalInfoTrkVar::Delete(Option_t *t){ |
22 |
theta = -1000.; |
// if ( Eij ) Eij->Delete(); |
23 |
phi = -1000.; |
// if ( Sij ) Sij->Delete(); |
24 |
etha = -1000.; |
} |
25 |
|
|
26 |
// // Euler angles (local field reference frame) |
OrbitalInfo::OrbitalInfo(){ |
27 |
// thetamag = -1000.; |
OrbitalInfoTrk = 0; //ELENA |
28 |
// phimag = -1000.; |
this->Clear(); |
|
// ethamag = -1000.; |
|
|
mode = 0; |
|
|
// std::fill_n(goodAttitude, 5, 0); |
|
29 |
} |
} |
30 |
|
|
31 |
|
void OrbitalInfo::Delete(Option_t *t){ //ELENA |
32 |
|
// |
33 |
|
// if ( Iij ) Iij->Delete(); |
34 |
|
if(OrbitalInfoTrk){ |
35 |
|
OrbitalInfoTrk->Delete(); //ELENA |
36 |
|
delete OrbitalInfoTrk; //ELENA |
37 |
|
} |
38 |
|
// |
39 |
|
}; //ELENA |
40 |
|
|
41 |
|
void OrbitalInfo::Set(){//ELENA |
42 |
|
if ( !OrbitalInfoTrk ) OrbitalInfoTrk = new TClonesArray("OrbitalInfoTrkVar",2); //ELENA} |
43 |
|
// if ( !Iij ) Iij = new TMatrixD(3,3); |
44 |
|
}//ELENA |
45 |
|
|
46 |
|
OrbitalInfoTrkVar *OrbitalInfo::GetOrbitalInfoTrkVar(Int_t itrk){ |
47 |
|
// |
48 |
|
if(itrk >= ntrk()){ |
49 |
|
printf(" OrbitalInfo ERROR: track related variables set %i does not exists! \n",itrk); |
50 |
|
printf(" stored track related variables = %i \n",ntrk()); |
51 |
|
return(NULL); |
52 |
|
} |
53 |
|
// |
54 |
|
if(!OrbitalInfoTrk)return 0; //ELENA |
55 |
|
TClonesArray &t = *(OrbitalInfoTrk); |
56 |
|
OrbitalInfoTrkVar *orbtrack = (OrbitalInfoTrkVar*)t[itrk]; |
57 |
|
return orbtrack; |
58 |
|
} |
59 |
|
|
60 |
void OrbitalInfo::Clear(){ |
void OrbitalInfo::Clear(Option_t *t){ |
61 |
|
// |
62 |
|
if ( OrbitalInfoTrk ) OrbitalInfoTrk->Delete(); |
63 |
|
// |
64 |
absTime = 0; |
absTime = 0; |
65 |
OBT = 0; |
OBT = 0; |
66 |
pkt_num = 0; |
pkt_num = 0; |
76 |
BB0 = -1000.; |
BB0 = -1000.; |
77 |
L = -1000.; |
L = -1000.; |
78 |
|
|
79 |
londip = -1000.; |
// londip = -1000.; |
80 |
latdip = -1000.; |
// latdip = -1000.; |
81 |
altdip = -1000.; |
// altdip = -1000.; |
82 |
|
|
83 |
loncgm = -1000.; |
// loncgm = -1000.; |
84 |
latcgm = -1000.; |
// latcgm = -1000.; |
85 |
altcgm = -1000.; |
// altcgm = -1000.; |
86 |
|
|
87 |
loncbm = -1000.; |
// loncbm = -1000.; |
88 |
latcbm = -1000.; |
// latcbm = -1000.; |
89 |
altcbm = -1000.; |
// altcbm = -1000.; |
90 |
|
|
91 |
std::fill_n(cutoff, 20, 0.); |
// std::fill_n(cutoff, 20, 0.); |
92 |
|
// std::fill_n(cutoff, 2, 0.); |
93 |
|
cutoffsvl = 0.; |
94 |
|
|
95 |
// Quaternions |
// Quaternions |
96 |
q0 = -1000.; |
q0 = -1000.; |
108 |
// phimag = -1000.; |
// phimag = -1000.; |
109 |
// ethamag = -1000.; |
// ethamag = -1000.; |
110 |
|
|
111 |
|
// pamzenitangle = -1000.; |
112 |
|
// pamBangle = -1000.; |
113 |
|
Iij.Zero(); |
114 |
|
|
115 |
mode = 0; |
mode = 0; |
116 |
// std::fill_n(goodAttitude, 5, 0); |
// std::fill_n(goodAttitude, 5, 0); |
117 |
} |
} |
135 |
l2->BB0 = BB0; |
l2->BB0 = BB0; |
136 |
l2->L = L; |
l2->L = L; |
137 |
|
|
138 |
l2->londip = londip; |
// l2->londip = londip; |
139 |
l2->latdip = latdip; |
// l2->latdip = latdip; |
140 |
l2->altdip = altdip; |
// l2->altdip = altdip; |
141 |
|
|
142 |
l2->loncgm = loncgm; |
// l2->loncgm = loncgm; |
143 |
l2->latcgm = latcgm; |
// l2->latcgm = latcgm; |
144 |
l2->altcgm = altcgm; |
// l2->altcgm = altcgm; |
145 |
|
|
146 |
l2->loncbm = loncbm; |
// l2->loncbm = loncbm; |
147 |
l2->latcbm = latcbm; |
// l2->latcbm = latcbm; |
148 |
l2->altcbm = altcbm; |
// l2->altcbm = altcbm; |
149 |
|
|
150 |
memcpy(l2->cutoff, cutoff, sizeof(cutoff)); |
l2->cutoffsvl = cutoffsvl; |
151 |
|
// memcpy(l2->cutoffsvl, cutoffsvl, sizeof(cutoffsvl)); |
152 |
|
|
153 |
// Quaternions |
// Quaternions |
154 |
l2->q0 = q0; |
l2->q0 = q0; |
186 |
BB0 = l2->BB0; |
BB0 = l2->BB0; |
187 |
L = l2->L; |
L = l2->L; |
188 |
|
|
189 |
londip = l2->londip; |
// londip = l2->londip; |
190 |
latdip = l2->latdip; |
// latdip = l2->latdip; |
191 |
altdip = l2->altdip; |
// altdip = l2->altdip; |
192 |
|
|
193 |
loncgm = l2->loncgm; |
// loncgm = l2->loncgm; |
194 |
latcgm = l2->latcgm; |
// latcgm = l2->latcgm; |
195 |
altcgm = l2->altcgm; |
// altcgm = l2->altcgm; |
196 |
|
|
197 |
loncbm = l2->loncbm; |
// loncbm = l2->loncbm; |
198 |
latcbm = l2->latcbm; |
// latcbm = l2->latcbm; |
199 |
altcbm = l2->altcbm; |
// altcbm = l2->altcbm; |
200 |
|
|
201 |
memcpy(cutoff, l2->cutoff, sizeof(l2->cutoff)); |
// memcpy(cutoff, l2->cutoff, sizeof(l2->cutoff)); |
202 |
|
l2->cutoffsvl = cutoffsvl; |
203 |
|
|
204 |
// Quaternions |
// Quaternions |
205 |
q0 = l2->q0; |
q0 = l2->q0; |
221 |
// memcpy(goodAttitude, l2->goodAttitude, sizeof(l2->goodAttitude)); |
// memcpy(goodAttitude, l2->goodAttitude, sizeof(l2->goodAttitude)); |
222 |
} |
} |
223 |
|
|
|
ClassImp(OrbitalInfo) |
|