/[PAMELA software]/DarthVader/OrbitalInfo/src/OrbitalInfo.cpp
ViewVC logotype

Annotation of /DarthVader/OrbitalInfo/src/OrbitalInfo.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide annotations) (download)
Mon Nov 26 08:01:13 2007 UTC (17 years ago) by mocchiut
Branch: MAIN
CVS Tags: v5r00
Changes since 1.9: +1 -1 lines
Compilation bug fixed

1 mocchiut 1.1 #include <OrbitalInfo.h>
2    
3 mocchiut 1.2 OrbitalInfo::OrbitalInfo(){
4 mocchiut 1.5 absTime = 0;
5     OBT = 0;
6     pkt_num = 0;
7 pam-rm2 1.6
8     lon = 0.;
9     lat = 0.;
10     alt = 0.;
11    
12     Bnorth = 0.;
13     Beast = 0.;
14     Bdown = 0.;
15     Babs = 0.;
16     BB0 = 0.;
17     L = 0.;
18    
19     londip = -1000.;
20     latdip = -1000.;
21     altdip = -1000.;
22    
23     loncgm = -1000.;
24     latcgm = -1000.;
25     altcgm = -1000.;
26    
27     loncbm = -1000.;
28     latcbm = -1000.;
29     altcbm = -1000.;
30    
31     std::fill_n(cutoff, 20, 0.);
32    
33     // Quaternions
34     q0 = -1000.;
35     q1 = -1000.;
36     q2 = -1000.;
37     q3 = -1000.;
38    
39     // Euler angles (nadir reference frame)
40 mocchiut 1.8 theta = -1000.;
41     phi = -1000.;
42     etha = -1000.;
43 pam-rm2 1.6
44 mocchiut 1.9 // // Euler angles (local field reference frame)
45     // thetamag = -1000.;
46     // phimag = -1000.;
47     // ethamag = -1000.;
48     mode = 0;
49     // std::fill_n(goodAttitude, 5, 0);
50 mocchiut 1.2 }
51 mocchiut 1.1
52    
53 mocchiut 1.10 void OrbitalInfo::Clear(Option_t *t){
54 mocchiut 1.5 absTime = 0;
55     OBT = 0;
56     pkt_num = 0;
57 pam-rm2 1.6
58     lon = -1000.;
59     lat = -1000.;
60     alt = -1000.;
61    
62     Bnorth = -1000.;
63     Beast = -1000.;
64     Bdown = -1000.;
65     Babs = -1000.;
66     BB0 = -1000.;
67     L = -1000.;
68    
69     londip = -1000.;
70     latdip = -1000.;
71     altdip = -1000.;
72    
73     loncgm = -1000.;
74     latcgm = -1000.;
75     altcgm = -1000.;
76    
77     loncbm = -1000.;
78     latcbm = -1000.;
79     altcbm = -1000.;
80    
81     std::fill_n(cutoff, 20, 0.);
82    
83     // Quaternions
84     q0 = -1000.;
85     q1 = -1000.;
86     q2 = -1000.;
87     q3 = -1000.;
88    
89     // Euler angles (nadir reference frame)
90 mocchiut 1.8 theta = -1000.;
91     phi = -1000.;
92     etha = -1000.;
93 pam-rm2 1.6
94     // Euler angles (local field reference frame)
95 mocchiut 1.9 // thetamag = -1000.;
96     // phimag = -1000.;
97     // ethamag = -1000.;
98 pam-rm2 1.6
99 mocchiut 1.9 mode = 0;
100     // std::fill_n(goodAttitude, 5, 0);
101 mocchiut 1.3 }
102    
103 pam-fi 1.4 /**
104     * Fills a struct cOrbitalInfo with values from a OrbitalInfo object (to put data into a F77 common).
105     */
106     void OrbitalInfo::GetLevel2Struct(cOrbitalInfo *l2) const{
107     l2->abstime = absTime;
108     l2->obt = OBT;
109     l2->pkt_num = pkt_num;
110 pam-rm2 1.6
111     l2->lon = lon;
112     l2->lat = lat;
113     l2->alt = alt;
114    
115     l2->Bnorth = Bnorth;
116     l2->Beast = Beast;
117     l2->Bdown = Bdown;
118     l2->Babs = Babs;
119     l2->BB0 = BB0;
120     l2->L = L;
121    
122     l2->londip = londip;
123     l2->latdip = latdip;
124     l2->altdip = altdip;
125    
126     l2->loncgm = loncgm;
127     l2->latcgm = latcgm;
128     l2->altcgm = altcgm;
129    
130     l2->loncbm = loncbm;
131     l2->latcbm = latcbm;
132     l2->altcbm = altcbm;
133    
134     memcpy(l2->cutoff, cutoff, sizeof(cutoff));
135    
136     // Quaternions
137     l2->q0 = q0;
138     l2->q1 = q1;
139     l2->q2 = q2;
140     l2->q3 = q3;
141    
142     // Euler angles (nadir reference frame)
143 mocchiut 1.8 l2->theta = theta;
144     l2->phi = phi;
145     l2->etha = etha;
146 pam-rm2 1.6
147 mocchiut 1.9 l2->mode = mode;
148 pam-rm2 1.6 // Euler angles (local field reference frame)
149 mocchiut 1.9 // l2->thetamag = thetamag;
150     // l2->phimag = phimag;
151     // l2->ethamag = ethamag;
152 pam-rm2 1.6
153 mocchiut 1.9 // memcpy(l2->goodAttitude, goodAttitude, sizeof(goodAttitude));
154 pam-fi 1.4 }
155    
156     void OrbitalInfo::SetFromLevel2Struct(cOrbitalInfo *l2){
157     absTime = l2->abstime;
158     OBT = l2->obt;
159     pkt_num = l2->pkt_num;
160 pam-rm2 1.6
161     lon = l2->lon;
162     lat = l2->lat;
163     alt = l2->alt;
164    
165     l2->Bnorth = Bnorth;
166     l2->Beast = Beast;
167     l2->Bdown = Bdown;
168     l2->Babs = Babs;
169     BB0 = l2->BB0;
170     L = l2->L;
171    
172     londip = l2->londip;
173     latdip = l2->latdip;
174     altdip = l2->altdip;
175    
176     loncgm = l2->loncgm;
177     latcgm = l2->latcgm;
178     altcgm = l2->altcgm;
179    
180     loncbm = l2->loncbm;
181     latcbm = l2->latcbm;
182     altcbm = l2->altcbm;
183    
184     memcpy(cutoff, l2->cutoff, sizeof(l2->cutoff));
185    
186     // Quaternions
187     q0 = l2->q0;
188     q1 = l2->q1;
189     q2 = l2->q2;
190     q3 = l2->q3;
191    
192     // Euler angles (nadir reference frame)
193 mocchiut 1.8 theta = l2->theta;
194     phi = l2->phi;
195     etha = l2->etha;
196 pam-rm2 1.6
197 mocchiut 1.9 mode = l2->mode;
198 pam-rm2 1.6 // Euler angles (local field reference frame)
199 mocchiut 1.9 // thetamag = l2->thetamag;
200     // phimag = l2->phimag;
201     // ethamag = l2->ethamag;
202 pam-rm2 1.6
203 mocchiut 1.9 // memcpy(goodAttitude, l2->goodAttitude, sizeof(l2->goodAttitude));
204 pam-fi 1.4 }
205    
206 mocchiut 1.1 ClassImp(OrbitalInfo)

  ViewVC Help
Powered by ViewVC 1.1.23