SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
svissr_blocks.h
Go to the documentation of this file.
1#include <cstdint>
2
7
8
9#ifdef _WIN32
10#pragma pack(push, 1)
11#endif
17{
18 uint8_t bytes[6];
19
20 int64_t value() const
21 {
22 uint64_t raw = ((uint64_t)bytes[0] << 40) | ((uint64_t)bytes[1] << 32) | ((uint64_t)bytes[2] << 24) | ((uint64_t)bytes[3] << 16) | ((uint64_t)bytes[4] << 8) | ((uint64_t)bytes[5]);
23
24 // sign bit is set to zero
25 if (bytes[0] & 128)
26 {
27 raw &= 0x7fffffffffff;
28 return -((int64_t)raw);
29 }
30
31 return (int64_t)raw;
32 }
33 operator int64_t() const { return value(); }
34}
35
36#ifdef _WIN32
37;
38#else
39__attribute__((packed));
40#endif
41#ifdef _WIN32
42#pragma pack(pop)
43#endif
44
45#ifdef _WIN32
46#pragma pack(push, 1)
47#endif
53{
54 uint8_t bytes[4];
55
56 int32_t value() const
57 {
58 uint32_t raw = ((uint32_t)bytes[0] << 24) | ((uint64_t)bytes[1] << 16) | ((uint64_t)bytes[2] << 8) | ((uint64_t)bytes[3]);
59
60 // sign bit is set to zero
61 if (bytes[0] & 128)
62 {
63 raw &= 0x7fffffff;
64 return -((int32_t)raw);
65 }
66
67 return (int32_t)raw;
68 }
69 operator int32_t() const { return value(); }
70}
71
72#ifdef _WIN32
73;
74#else
75__attribute__((packed));
76#endif
77#ifdef _WIN32
78#pragma pack(pop)
79#endif
80
81#ifdef _WIN32
82#pragma pack(push, 1)
83#endif
84
94{
95 svissr_r6_t IMAGE_START_TIME; /* R*6.8, [MJD] */
96 svissr_r4_t VIS_STEPPING_LINE; /* R*4.8, VIS channel stepping angle along line, [rad] */
97 svissr_r4_t IR_STEPPING_LINE; /* R*4.8, IR channel stepping angle along line, [rad] */
98 svissr_r4_t VIS_STEPPING_PIXEL; /* R*4.10, VIS channel stepping along pixel, [rad] */
99 svissr_r4_t IR_STEPPING_PIXEL; /* R*4.10, IR channel stepping along pixel, [rad] */
100 svissr_r4_t VIS_CENTER_LINE; /* R*4.4 VIS channel center line number of the VISSR frame */
101 svissr_r4_t IR1_CENTER_LINE; /* R*4.4 IR1 channel center line number of the VISSR frame */
102 svissr_r4_t VIS_CENTER_PIXEL; /* R*4.4, VIS channel center pixel number of the VISSR frame */
103 svissr_r4_t IR1_CENTER_PIXEL; /* R*4.4, IR1 channel center pixel number of the VISSR frame */
104 svissr_r4_t VIS_SENSOR_NUMBER; /* R*4.0 Number of VIS channel sensors */
105 svissr_r4_t IR_SENSOR_NUMBER; /* R*4.0 Number of IR channel sensors */
106 svissr_r4_t VIS_TOTAL_LINE_NUMBER; /* R*4.0 Total number of VIS channel lines in VISSR frame */
107 svissr_r4_t IR_TOTAL_LINE_NUMBER; /* R*4.0 Total number of IR channel lines in VISSR frame */
108 svissr_r4_t VIS_LINE_PX; /* R*4.0 Pixels per VIS line */
109 svissr_r4_t IR_LINE_PX; /* R*4.0 Pixel per IR line */
110 svissr_r4_t VISSR_MISALIGNMENT_ANGLE_X_AXIS; /* R*4.10, VISSR misalignment angle around the x axis, [rad] */
111 svissr_r4_t VISSR_MISALIGNMENT_ANGLE_Y_AXIS; /* R*4.10, VISSR misalignment angle around the y axis, [rad] */
112 svissr_r4_t VISSR_MISALIGNMENT_ANGLE_Z_AXIS; /* R*4.10, VISSR misalignment angle around the z axis, [rad] */
113 svissr_r4_t VMM_R1_C1; /* R*4.7, fixed value, VISSR misalignment matrix row 1 column 1 */
114 svissr_r4_t VMM_R2_C1; /* R*4.10, fixed value, VISSR misalignment matrix row 2 column 1 */
115 svissr_r4_t VMM_R3_C1; /* R*4.10, fixed value, VISSR misalignment matrix row 3 column 1 */
116 svissr_r4_t VMM_R1_C2; /* R*4.10, fixed value, VISSR misalignment matrix row 1 column 2 */
117 svissr_r4_t VMM_R2_C2; /* R*4.7, fixed value, VISSR misalignment matrix row 2 column 2 */
118 svissr_r4_t VMM_R3_C2; /* R*4.10, fixed value, VISSR misalignment matrix row 3 column 2 */
119 svissr_r4_t VMM_R1_C3; /* R*4.10, fixed value, VISSR misalignment matrix row 1 column 3 */
120 svissr_r4_t VMM_R2_C3; /* R*4.10, fixed value, VISSR misalignment matrix row 2 column 3 */
121 svissr_r4_t VMM_R3_C3; /* R*4.7, fixed value, VISSR misalignment matrix row 3 column 3 */
122 svissr_r4_t IR2_channel_center_line_number_of_frame; /* R*4.4 IR 2 channel's center line number in the VISSR frame */
123 svissr_r4_t IR3_channel_center_line_number_of_frame; /* R*4.4 IR 3 channel's center line number in the VISSR frame */
124 uint8_t spare[10]; // The above two values are repeated again here, I just added them to the 2 byte spare to be skipped
125 svissr_r4_t RATIO_OF_CIRCUMFERENCE; /* R*4.7, fixed value, ratio of circumference - pi */
126 svissr_r4_t RATIO_OF_CIRCUMFERENCE_1; /* R*4.9, fixed value, pi/180 */
127 svissr_r4_t RATIO_OF_CIRCUMFERENCE_2; /* R*4.6, fixed value, 180/pi */
128 svissr_r4_t EARTH_RADIUS; /* R*4.1, Equatorial radius, fixed value, [m] */
129 svissr_r4_t EARTH_OBLATENESS; /* R*4.10, fixed value */
130 svissr_r4_t EARTH_ECCENTRICITY; /* R*4.9, fixed value */
131 svissr_r4_t VISSR_SUN_SENSOR_ANGLE; /* R*4.8, fixed value, Angle between VISSR and view of sun sensor at data acquisition start, [rad] */
132
133 // Orbit params
134 svissr_r6_t ORBITAL_PARAM_EPOCH; /* R*6.8, Epoch of orbital parameters, Orbit parameters in mean J2000, [MJD] */
135 svissr_r6_t SEMI_MAJOR_AXIS; /* R*6.8, Orbit parameters in mean J2000, [km] */
136 svissr_r6_t ECCENTRICITY; /* R*6.10, Orbit parameters in mean J2000 */
137 svissr_r6_t INCLINATION; /* R*6.8, Orbit parameters in mean J2000, [deg] */
138 svissr_r6_t LONGITUDE_ASCENDING_NODE; /* R*6.8, Longitude of ascending node, Orbit parameters in mean J2000, [deg] */
139 svissr_r6_t PERIGEE; /* R*6.8, Argument of perigee, Orbit parameters in mean J2000, [deg] */
140 svissr_r6_t MEAN_ANOMALY; /* R*6.8, Orbit parameters in mean J2000, [deg] */
141 svissr_r6_t SSP_LONGITUDE; /* R*6.6, Sub-satellite East Longitude, Orbit parameters in mean J2000, [deg] */
142 svissr_r6_t SSP_LATITUDE; /* R*6.6, Sub-satellite North Latitude, Orbit parameters in mean J2000, [deg] */
143
144 // Attitude params
145 svissr_r6_t ATTITUDE_PARAM_EPOCH; /* R*6.8, Epoch of attitude parameters, Attitude parameters in mean J2000, [MJD] */
146 svissr_r6_t ALPHA_Z_AXIS_SAT_SPIN_ON_YZ_PLANE; /* R*6.8, Angle between Z-axis and Satellite Spin Axis projected on yz-plane α, Attitude parameters in mean J2000, [rad] */
147 svissr_r6_t ALPHA_CHANGE_RATE; /* R*6.15, Change-rate of α, Attitude parameters in mean J2000, [rad/sec] */
148 svissr_r6_t DELTA_SAT_SPIN_YZ_PLANE; /* R*6.11, Angle between Satellite Spin Axis and yz-plane δ, Attitude parameters in mean J2000, [rad] */
149 svissr_r6_t DELTA_CHANGE_RATE; /* R*6.15, Change-rate of δ, Angle between Satellite Spin Axis and yz-plane δ, Attitude parameters in mean J2000, [rad/sec] */
150 svissr_r6_t MEAN_SPIN_RATE; /* R*6.8, Estimated daily mean spin rate, [rpm] */
151 uint8_t spare2[10];
152
153 uint8_t ATTITUDE_PREDICTION_SUBBLOCKS[10][64]; /* 10x 64-byte attitude prediction sub block*/
154 uint8_t ORBIT_PREDICTION_SUBBLOCKS[8][256]; /* 8x 256-byte orbit prediction sub block */
155 svissr_r6_t FIRST_ATTITUDE_PREDICTION; /* R*6.8, Time of the first attitude prediction record, [MJD]*/
156 svissr_r6_t LATEST_ATTITUDE_PREDICTION; /* R*6.8, Time of the last attitude prediction record, [MJD]*/
157 svissr_r6_t ATTITUDE_PREDICTION_INTERVAL; /* R*6.8, fixed value (0.00347222), Interval time of attitude prediction data, [MJD]*/
158 int16_t ATTITUDE_PREDICTION_NUMBER; /* I*2 Number of attitude prediction data block, [=10] */
159 svissr_r6_t FIRST_ORBITAL_PREDICTION; /* R*6.8, Time of the first orbit prediction record, [MJD]*/
160 svissr_r6_t LATEST_ORBITAL_PREDICTION; /* R*6.8, Time of the last orbit prediction record, [MJD]*/
161 svissr_r6_t ORBITAL_PREDICTION_INTERVAL; /* R*6.8, fixed value (0.00347222), Interval time of orbit prediction data, [MJD]*/
162 int32_t ORBITAL_PREDICTION_COUNT; /* I*2 Number of attitude prediction data block, [=8] */
163 uint8_t spare3[216];
164}
165
166#ifdef _WIN32
167;
168#else
169__attribute__((packed));
170#endif
171#ifdef _WIN32
172#pragma pack(pop)
173#endif
174
175#ifdef _WIN32
176#pragma pack(push, 1)
177#endif
178
184{
185 svissr_r6_t PREDICTION_TIME; /* R*6.8, UTC time when attitude prediction is processed, [MJD] */
186 svissr_r6_t PREDICTION_TIME_BCD; /* BCD*6, time when attitude prediction is processed, [BCD] */
187 svissr_r6_t Z_AXIS_SAT_SPIN_ON_YZ_PLANE_ANGLE; /* R*6.8, Angle between z-axis and satellite spin axis projected on yz-plane in mean of 1950.0 coordinates, mean J2000, [rad] */
188 svissr_r6_t SAT_SPIN_YZ_PLANE_ANGLE; /* R*6.11, Angle between satelltie spin axis and yz-plane, [rad] */
189 svissr_r6_t DIHEDRAL_ANGLE; /* R*6.8, Dihedral angle between the Sun and Earth measured clockwise viewing from North, [rad]*/
190 svissr_r6_t SPIN_RATE; /* R*6.8, Spin speed of satellite, [rpm] */
191 svissr_r6_t RIGHT_ASCENSION_SPIN_AXIS; /* R*6.8, Right ascension of satellite spin axis on the sat orbit plane coordinate sysetm, [rad] */
192 svissr_r6_t DECLINATION_SPIN_AXIS; /* R*6.8, Declination of satellite spin axis on the sat orbit plane coordinate sysetm, [rad]*/
193 uint8_t spare[16];
194}
195
196#ifdef _WIN32
197;
198#else
199__attribute__((packed));
200#endif
201#ifdef _WIN32
202#pragma pack(pop)
203#endif
204
205#ifdef _WIN32
206#pragma pack(push, 1)
207#endif
208
214{
215 svissr_r6_t PREDICTION_TIME_MJD; /* R*6.8, UTC time when orbit prediction is processed, [MJD] */
216 svissr_r6_t PREDICTION_TIME_BCD; /* BCD*6, time when orbit prediction is processed, [BCD] */
217 svissr_r6_t X_COMP; /* R*6.6, X component of the satellite position in mean J2000, [m] */
218 svissr_r6_t Y_COMP; /* R*6.6, Y component of the satellite position in mean J2000, [m] */
219 svissr_r6_t Z_COMP; /* R*6.6, Z component of the satellite position in mean J2000, [m] */
220 svissr_r6_t X_COMP_SPEED; /* R*6.8, X component of the satellite position in mean J2000, [m/s] */
221 svissr_r6_t Y_COMP_SPEED; /* R*6.8, Y component of the satellite position in mean J2000, [m/s] */
222 svissr_r6_t Z_COMP_SPEED; /* R*6.8, Z component of the satellite position in mean J2000, [m/s] */
223 svissr_r6_t X_COMP_EARTH_FIXED; /* R*6.6, X component of the satellite position in earth-fixed coordinates, [m] */
224 svissr_r6_t Y_COMP_EARTH_FIXED; /* R*6.6, Y component of the satellite position in earth-fixed coordinates, [m] */
225 svissr_r6_t Z_COMP_EARTH_FIXED; /* R*6.6, Z component of the satellite position in earth-fixed coordinates, [m] */
226 svissr_r6_t X_COMP_EARTH_FIXED_SPEED; /* R*6.10, X component of the satellite position in earth-fixed coordinates, [m/s] */
227 svissr_r6_t Y_COMP_EARTH_FIXED_SPEED; /* R*6.10, Y component of the satellite position in earth-fixed coordinates, [m/s] */
228 svissr_r6_t Z_COMP_EARTH_FIXED_SPEED; /* R*6.10, Z component of the satellite position in earth-fixed coordinates, [m/s] */
229 svissr_r6_t GREENWHICH_SIDEREAL; /* R*6.8, Greenwhich sidereal time in true of data coordinates, [deg] */
230 svissr_r6_t RATS_J2; /* R*6.8, Right ascension from the satellite to the sun in mean of J2000 coordinates, [deg] */
231 svissr_r6_t DSTS_J2; /* R*6.8, Declination from the satellite to the sun in mean of J2000 coordinates, [deg] */
232 svissr_r6_t RATS_EF; /* R*6.8, Right ascension from the satellite to the sun in earth-fixed coordinates, [deg] */
233 svissr_r6_t DSTS_EF; /* R*6.8, Declination from the satellite to the sun in earth-fixed coordinates, [deg] */
234 uint8_t spare[14];
235 svissr_r6_t NPM_R1_C1; /* R6*12 Nutation and precession matrix row 1 column 1 */
236 svissr_r6_t NPM_R2_C1; /* R6*14 Nutation and precession matrix row 2 column 1 */
237 svissr_r6_t NPM_R3_C1; /* R6*14 Nutation and precession matrix row 3 column 1 */
238 svissr_r6_t NPM_R1_C2; /* R6*14 Nutation and precession matrix row 1 column 2 */
239 svissr_r6_t NPM_R2_C2; /* R6*12 Nutation and precession matrix row 2 column 2 */
240 svissr_r6_t NPM_R3_C2; /* R6*16 Nutation and precession matrix row 3 column 2 */
241 svissr_r6_t NPM_R1_C3; /* R6*12 Nutation and precession matrix row 1 column 3 */
242 svissr_r6_t NPM_R2_C3; /* R6*16 Nutation and precession matrix row 2 column 3 */
243 svissr_r6_t NPM_R3_C3; /* R6*12 Nutation and precession matrix row 3 column 3 */
244 svissr_r6_t SSP_LATITUDE; /* R*6.8, North Latitude, [deg] */
245 svissr_r6_t SSP_LONGITUDE; /* R*6.8, East Longitude, [deg] */
246 svissr_r6_t ALTITUDE; /* R*6.6, Height of sat above Earth surface, [m] */
247 uint8_t spare2[56];
248}
249
250#ifdef _WIN32
251;
252#else
253__attribute__((packed));
254#endif
255#ifdef _WIN32
256#pragma pack(pop)
257#endif
64-byte sub block that is present 10 times, contains attitude prediction data
Definition svissr_blocks.h:184
S-VISSR Orbit And Attitude subcommunication block contents. All integers are signed using the MSB bit...
Definition svissr_blocks.h:94
256-byte sub block that is present 8 times, contains orbit prediction data
Definition svissr_blocks.h:214
Creates a signed 4-byte integer from big-endian bytes.
Definition svissr_blocks.h:53
Takes 6 bytes, creates a signed 48-bit integer in big endian. Stored in a 64 bit signed integer.
Definition svissr_blocks.h:17