1 |
#include <OrbitalInfo.h> |
#include <OrbitalInfo.h> |
2 |
|
|
3 |
OrbitalInfo::OrbitalInfo(){ |
using namespace std; |
|
absTime = 0; |
|
|
OBT = 0; |
|
|
pkt_num = 0; |
|
|
|
|
|
lon = 0.; |
|
|
lat = 0.; |
|
|
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.; |
|
4 |
|
|
5 |
loncbm = -1000.; |
ClassImp(OrbitalInfoTrkVar); |
6 |
latcbm = -1000.; |
ClassImp(OrbitalInfo); |
|
altcbm = -1000.; |
|
7 |
|
|
8 |
std::fill_n(cutoff, 20, 0.); |
OrbitalInfoTrkVar::OrbitalInfoTrkVar(){ |
9 |
|
this->Clear(); |
10 |
// Quaternions |
} |
|
q0 = -1000.; |
|
|
q1 = -1000.; |
|
|
q2 = -1000.; |
|
|
q3 = -1000.; |
|
11 |
|
|
12 |
// Euler angles (nadir reference frame) |
void OrbitalInfoTrkVar::Clear(Option_t *t){ |
13 |
// theta = -1000.; |
trkseqno = 0; |
14 |
// phi = -1000.; |
pitch = -1000.; |
15 |
// etha = -1000.; |
} |
16 |
|
|
|
// Euler angles (local field reference frame) |
|
|
// thetamag = -1000.; |
|
|
// phimag = -1000.; |
|
|
// ethamag = -1000.; |
|
17 |
|
|
18 |
std::fill_n(goodAttitude, 5, 0); |
OrbitalInfo::OrbitalInfo(){ |
19 |
|
OrbitalInfoTrk = 0; //ELENA |
20 |
|
this->Clear(); |
21 |
} |
} |
22 |
|
|
23 |
|
void OrbitalInfo::Delete(Option_t *t){ //ELENA |
24 |
void OrbitalInfo::Clear(){ |
// |
25 |
|
if(OrbitalInfoTrk){ |
26 |
|
OrbitalInfoTrk->Delete(); //ELENA |
27 |
|
delete OrbitalInfoTrk; //ELENA |
28 |
|
} |
29 |
|
// |
30 |
|
}; //ELENA |
31 |
|
|
32 |
|
void OrbitalInfo::Set(){//ELENA |
33 |
|
if ( !OrbitalInfoTrk ) OrbitalInfoTrk = new TClonesArray("OrbitalInfoTrkVar",2); //ELENA |
34 |
|
}//ELENA |
35 |
|
|
36 |
|
|
37 |
|
void OrbitalInfo::Clear(Option_t *t){ |
38 |
|
// |
39 |
|
if ( OrbitalInfoTrk ) OrbitalInfoTrk->Delete(); |
40 |
|
// |
41 |
absTime = 0; |
absTime = 0; |
42 |
OBT = 0; |
OBT = 0; |
43 |
pkt_num = 0; |
pkt_num = 0; |
74 |
q3 = -1000.; |
q3 = -1000.; |
75 |
|
|
76 |
// Euler angles (nadir reference frame) |
// Euler angles (nadir reference frame) |
77 |
// theta = -1000.; |
theta = -1000.; |
78 |
// phi = -1000.; |
phi = -1000.; |
79 |
// etha = -1000.; |
etha = -1000.; |
80 |
|
|
81 |
// Euler angles (local field reference frame) |
// Euler angles (local field reference frame) |
82 |
//thetamag = -1000.; |
// thetamag = -1000.; |
83 |
// phimag = -1000.; |
// phimag = -1000.; |
84 |
//ethamag = -1000.; |
// ethamag = -1000.; |
85 |
|
|
86 |
|
pamzenitangle = -1000.; |
87 |
|
pamBangle = -1000.; |
88 |
|
|
89 |
|
|
90 |
std::fill_n(goodAttitude, 5, 0); |
mode = 0; |
91 |
|
// std::fill_n(goodAttitude, 5, 0); |
92 |
} |
} |
93 |
|
|
94 |
/** |
/** |
131 |
l2->q3 = q3; |
l2->q3 = q3; |
132 |
|
|
133 |
// Euler angles (nadir reference frame) |
// Euler angles (nadir reference frame) |
134 |
// l2->theta = theta; |
l2->theta = theta; |
135 |
// l2->phi = phi; |
l2->phi = phi; |
136 |
// l2->etha = etha; |
l2->etha = etha; |
137 |
|
|
138 |
|
l2->mode = mode; |
139 |
// Euler angles (local field reference frame) |
// Euler angles (local field reference frame) |
140 |
// l2->thetamag = thetamag; |
// l2->thetamag = thetamag; |
141 |
// l2->phimag = phimag; |
// l2->phimag = phimag; |
142 |
// l2->ethamag = ethamag; |
// l2->ethamag = ethamag; |
143 |
|
|
144 |
memcpy(l2->goodAttitude, goodAttitude, sizeof(goodAttitude)); |
// memcpy(l2->goodAttitude, goodAttitude, sizeof(goodAttitude)); |
145 |
} |
} |
146 |
|
|
147 |
void OrbitalInfo::SetFromLevel2Struct(cOrbitalInfo *l2){ |
void OrbitalInfo::SetFromLevel2Struct(cOrbitalInfo *l2){ |
181 |
q3 = l2->q3; |
q3 = l2->q3; |
182 |
|
|
183 |
// Euler angles (nadir reference frame) |
// Euler angles (nadir reference frame) |
184 |
//theta = l2->theta; |
theta = l2->theta; |
185 |
//phi = l2->phi; |
phi = l2->phi; |
186 |
//etha = l2->etha; |
etha = l2->etha; |
187 |
|
|
188 |
|
mode = l2->mode; |
189 |
// Euler angles (local field reference frame) |
// Euler angles (local field reference frame) |
190 |
//thetamag = l2->thetamag; |
// thetamag = l2->thetamag; |
191 |
//phimag = l2->phimag; |
// phimag = l2->phimag; |
192 |
//ethamag = l2->ethamag; |
// ethamag = l2->ethamag; |
193 |
|
|
194 |
memcpy(goodAttitude, l2->goodAttitude, sizeof(l2->goodAttitude)); |
// memcpy(goodAttitude, l2->goodAttitude, sizeof(l2->goodAttitude)); |
195 |
} |
} |
196 |
|
|
|
ClassImp(OrbitalInfo) |
|