24 |
|
|
25 |
void OrbitalInfoItem::fill(TArrayC* data){ |
void OrbitalInfoItem::fill(TArrayC* data){ |
26 |
//pos = float[3]; |
//pos = float[3]; |
27 |
//vel = float[3]; |
//vel = float[3] |
28 |
time = (((data->At(1) << 24) & 0xFF000000) + ((data->At(0) << 16) & 0x00FF0000) + ((data->At(3) << 8) & 0x0000FF00) + |
long tempData = 0; |
29 |
(data->At(2) & 0x000000FF))/128.0; |
time = (((data->At(1) << 24) & 0xFF000000) + ((data->At(0) << 16) & 0x00FF0000) + ((data->At(3) << 8) & 0x0000FF00) + (data->At(2) & 0x000000FF))/128.0; |
30 |
|
|
31 |
short index = 0; |
short index = 0; |
32 |
for (int i = 0; i < 3; i++){ |
for (int i = 0; i < 3; i++){ |
33 |
index = 4*i; |
index = 4*i; |
34 |
pos[i] = ((((data->At(index + 5) << 24) & 0x7F000000) * ((data->At(index + 5) >> 7) & 1)*(-1.0)) + |
tempData = ((data->At(index + 4) << 24) & 0xFF000000) + ((data->At(index + 5) << 16) & 0x00FF0000) + ((data->At(index + 6) << 8) & 0x0000FF00) + (data->At(index + 7) & 0x000000FF); |
35 |
((data->At(index + 4) << 16) & 0x00FF0000) + ((data->At(index + 8) << 8) & 0x0000FF00) + |
if (data->At(index + 4) >> 8) { |
36 |
(data->At(index + 7) & 0x000000FF))/262144.0; |
pos[i] = (~tempData * -1.0)/262144.0; |
37 |
|
} else { |
38 |
vel[i] = ((((data->At(index + 17) << 24) & 0x7F000000) * ((data->At(index + 17) >> 7) & 1)*(-1.0)) + |
pos[i] = tempData /262144.0; |
39 |
((data->At(index + 16) << 16) & 0x00FF0000) + ((data->At(index + 19) << 8) & 0x0000FF00) + |
} |
40 |
(data->At(index + 18) & 0x000000FF))/134217728.0; |
|
41 |
|
tempData = ((data->At(index + 16) << 24) & 0xFF000000) + ((data->At(index + 17) << 16) & 0x00FF0000) + ((data->At(index + 18) << 8) & 0x0000FF00) + (data->At(index + 19) & 0x000000FF); |
42 |
|
if (data->At(index + 16) >> 8) { |
43 |
|
vel[i] = (~tempData * -1.0)/134217728.0; |
44 |
|
} else { |
45 |
|
vel[i] = tempData /134217728.0; |
46 |
|
} |
47 |
} |
} |
48 |
} |
} |
49 |
|
|
64 |
void InclinationInfoItem::fill(TArrayC* data){ |
void InclinationInfoItem::fill(TArrayC* data){ |
65 |
short extIndex = 0; |
short extIndex = 0; |
66 |
short innIndex = 0; |
short innIndex = 0; |
67 |
|
long tempData = 0; |
68 |
for (int i = 0; i < 6; i++){ |
for (int i = 0; i < 6; i++){ |
69 |
extIndex = 20*i; |
extIndex = 20*i; |
70 |
time[i] = (((data->At(extIndex + 1) << 24) & 0xFF000000) + |
time[i] = (((data->At(extIndex) << 24) & 0xFF000000) + |
71 |
((data->At(extIndex) << 16) & 0x00FF0000) + ((data->At(extIndex + 3) << 8) & 0x0000FF00) + |
((data->At(extIndex + 1) << 16) & 0x00FF0000) + ((data->At(extIndex + 2) << 8) & 0x0000FF00) + |
72 |
(data->At(extIndex + 2) & 0x000000FF))/128.0; |
(data->At(extIndex + 3) & 0x000000FF))/128.0; |
73 |
|
|
74 |
for (int j = 0; j < 4; j++){ |
for (int j = 0; j < 4; j++){ |
75 |
innIndex = extIndex + 4*j; |
innIndex = extIndex + 4*j; |
76 |
quat[i][j] = ((((data->At(innIndex + 5) << 24) & 0x7F000000) * ((data->At(innIndex + 5) >> 7) & 1)*(-1.0)) + |
tempData = ((data->At(innIndex + 4) << 24) & 0xFF000000) + ((data->At(innIndex + 5) << 16) & 0x00FF0000) + ((data->At(innIndex + 6) << 8) & 0x0000FF00) + (data->At(innIndex + 7) & 0x000000FF); |
77 |
((data->At(innIndex + 4) << 16) & 0x00FF0000) + ((data->At(innIndex + 7) << 8) & 0x0000FF00) + |
if (data->At(innIndex + 4) >> 8) { |
78 |
(data->At(innIndex + 6) & 0x000000FF))/1073741824.0; |
quat[i][j] = (~tempData * -1.0)/1073741824.0; |
79 |
|
} else { |
80 |
|
quat[i][j] = tempData / 1073741824.0; |
81 |
|
} |
82 |
} |
} |
83 |
} |
} |
84 |
} |
} |