Skyward boardcore
Loading...
Searching...
No Matches
VN300Defs.h
Go to the documentation of this file.
1/* Copyright (c) 2023 Skyward Experimental Rocketry
2 * Authors: Lorenzo Cucchi, Fabrizio Monti
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22
23#pragma once
24
25namespace Boardcore
26{
27
28namespace VN300Defs
29{
30
44
69
88
108
132
152
173
178{
179 float posX; // Relative position of GPS antenna (X-axis)
180 float posY;
181 float posZ;
182 float uncX; // Uncertainty in the X-axis position measurement
183 float uncY;
184 float uncZ;
185};
186
191{
192 uint64_t insTimestamp;
193 uint16_t gpsFix;
194 uint16_t insStatus;
195 float yaw;
196 float pitch;
197 float roll;
198 float latitude;
200 float altitude;
201 float velocityX; // Estimated velocity (NED) in m/s
204};
205
209enum class SampleOptions : uint8_t
210{
211 FULL,
212 REDUCED,
213};
214
219struct __attribute__((packed)) BinaryDataFull
220{
221 uint8_t selectedGroups; // Indicates which groups are selected
222 uint16_t selectedFieldsCommonGroup; // Indicates which fields are selected
223 uint16_t selectedFieldsGnssGroup; // Indicates which fields are selected
224 float yaw;
225 float pitch;
226 float roll;
227 float quaternionX;
228 float quaternionY;
229 float quaternionZ;
230 float quaternionW;
231 float angularX;
232 float angularY;
233 float angularZ;
234 float velocityX; // Estimated velocity (NED) in m/s
235 float velocityY;
236 float velocityZ;
237 float accelX;
238 float accelY;
239 float accelZ;
240 float magneticX;
241 float magneticY;
242 float magneticZ;
243 float temperature;
244 float pressure;
245 uint16_t insStatus; // Status of the INS
246 uint8_t numsats; // Number of tracked gps satellites
247 uint8_t gpsFix;
248 double latitude;
249 double longitude;
250 double altitude;
251 uint16_t checksum;
252};
253
265struct __attribute__((packed)) BinaryDataReduced
266{
267 uint8_t selectedGroups; // Indicates which groups are selected
268 uint16_t selectedFieldsCommonGroup; // Indicates which fields are selected
269 uint16_t selectedFieldsGnssGroup; // Indicates which fields are selected
270 float yaw;
271 float pitch;
272 float roll;
273 float quaternionX;
274 float quaternionY;
275 float quaternionZ;
276 float quaternionW;
277 float angularX;
278 float angularY;
279 float angularZ;
280 float accelX;
281 float accelY;
282 float accelZ;
283 uint8_t gpsFix;
284 double latitude;
285 double longitude;
286 double altitude;
287 uint16_t checksum;
288};
289
290} // namespace VN300Defs
291
292} // namespace Boardcore
CommonGroup
Values used to select data for the binary output from group 1 (common group).
Definition VN300Defs.h:50
@ COMMONGROUP_TIMEGPS
Gps time.
Definition VN300Defs.h:53
@ COMMONGROUP_TIMESYNCIN
Time since last sync in trigger.
Definition VN300Defs.h:54
@ COMMONGROUP_VELOCITY
Velocity.
Definition VN300Defs.h:59
@ COMMONGROUP_TIMESTARTUP
Time since startup (nanoseconds).
Definition VN300Defs.h:52
@ COMMONGROUP_YAWPITCHROLL
Yaw pitch roll.
Definition VN300Defs.h:55
@ COMMONGROUP_TIMEGPSPPS
Time since last GpsPps trigger.
Definition VN300Defs.h:67
@ COMMONGROUP_SYNCINCNT
SyncIn count.
Definition VN300Defs.h:66
@ COMMONGROUP_ACCEL
Acceleration compensated (body).
Definition VN300Defs.h:60
@ COMMONGROUP_ANGULARRATE
Angular Rate.
Definition VN300Defs.h:57
@ COMMONGROUP_INSSTATUS
Ins status.
Definition VN300Defs.h:65
@ COMMONGROUP_DELTATHETA
Delta time, theta and velocity.
Definition VN300Defs.h:64
@ COMMONGROUP_IMU
Uncompensated gyro and accelerometer.
Definition VN300Defs.h:61
@ COMMONGROUP_QUATERNION
Quaternion.
Definition VN300Defs.h:56
@ COMMONGROUP_MAGPRES
Compensated magnetic, temperature and pressure.
Definition VN300Defs.h:62
@ COMMONGROUP_POSITION
Position.
Definition VN300Defs.h:58
InsGroup
Values used to select data for the binary output from group 6 (ins group).
Definition VN300Defs.h:158
@ INSGROUP_ACCELECEF
Compensated acceleration (ECEF).
Definition VN300Defs.h:167
@ INSGROUP_MAGECEF
Compensated magnetic (ECEF).
Definition VN300Defs.h:166
@ INSGROUP_LINEARACCELECEF
Compensated linear acceleration (ECEF).
Definition VN300Defs.h:168
@ INSGROUP_POSLLA
Position (latitude, longitude, altitude).
Definition VN300Defs.h:161
@ INSGROUP_VELBODY
Velocity (body).
Definition VN300Defs.h:163
@ INSGROUP_VELNED
Velocity (NED).
Definition VN300Defs.h:164
@ INSGROUP_VELECEF
Velocity (ECEF).
Definition VN300Defs.h:165
@ INSGROUP_VELU
Velocity uncertainty.
Definition VN300Defs.h:171
@ INSGROUP_POSECEF
Position (ECEF).
Definition VN300Defs.h:162
@ INSGROUP_INSSTATUS
Status.
Definition VN300Defs.h:160
@ INSGROUP_POSU
Position uncertainty.
Definition VN300Defs.h:170
ImuGroup
Values used to select data for the binary output from group 3 (imu group).
Definition VN300Defs.h:94
@ IMUGROUP_UNCOMPMAG
Uncompensated magnetic.
Definition VN300Defs.h:97
@ IMUGROUP_UNCOMPACCEL
Uncompensated accelerometer.
Definition VN300Defs.h:98
@ IMUGROUP_DELTATHETA
Delta theta angles.
Definition VN300Defs.h:102
@ IMUGROUP_PRES
Pressure.
Definition VN300Defs.h:101
@ IMUGROUP_ACCEL
Compensated accelerometer.
Definition VN300Defs.h:105
@ IMUGROUP_IMUSTATUS
Imu status.
Definition VN300Defs.h:96
@ IMUGROUP_UNCOMPGYRO
Uncompensated gyroscope.
Definition VN300Defs.h:99
@ IMUGROUP_MAG
Compensated magnetometer.
Definition VN300Defs.h:104
@ IMUGROUP_DELTAVEL
Delta velocity.
Definition VN300Defs.h:103
@ IMUGROUP_ANGULARRATE
Compensated gyroscope.
Definition VN300Defs.h:106
@ IMUGROUP_TEMP
Temperature.
Definition VN300Defs.h:100
TimeGroup
Values used to select data for the binary output from group 2 (time group).
Definition VN300Defs.h:75
@ TIMEGROUP_GPSWEEK
Gps week.
Definition VN300Defs.h:80
@ TIMEGROUP_SYNCOUTCNT
Sync out trigger count.
Definition VN300Defs.h:85
@ TIMEGROUP_TIMEUTC
UTC time.
Definition VN300Defs.h:83
@ TIMEGROUP_TIMESTATUS
Time valid status flag.
Definition VN300Defs.h:86
@ TIMEGROUP_TIMEGPSPPS
Time since last GpsPps trigger.
Definition VN300Defs.h:82
@ TIMEGROUP_SYNCINCNT
Sync in trigger count.
Definition VN300Defs.h:84
@ TIMEGROUP_TIMESYNCIN
Time since last sync in trigger.
Definition VN300Defs.h:81
@ TIMEGROUP_GPSTOW
Time since start of gps week.
Definition VN300Defs.h:79
@ TIMEGROUP_TIMESTARTUP
Time since startup (nanoseconds).
Definition VN300Defs.h:77
@ TIMEGROUP_TIMEGPS
Gps time.
Definition VN300Defs.h:78
BinaryGroup
The groups of binary data available from the sensor.
Definition VN300Defs.h:35
@ BINARYGROUP_IMU
IMU group.
Definition VN300Defs.h:38
@ BINARYGROUP_INS
INS group.
Definition VN300Defs.h:41
@ BINARYGROUP_TIME
Time group.
Definition VN300Defs.h:37
@ BINARYGROUP_ATTITUDE
Attitude group.
Definition VN300Defs.h:40
@ BINARYGROUP_COMMON
Common group.
Definition VN300Defs.h:36
@ BINARYGROUP_GPS
GPS group.
Definition VN300Defs.h:39
@ BINARYGROUP_GPS2
GPS2 group.
Definition VN300Defs.h:42
SampleOptions
Sample options (data output packets) available.
Definition VN300Defs.h:210
@ REDUCED
Only data needed for the reduced data packet.
GpsGroup
Values used to select data for the binary output from group 4 and 7 (gps and gps2 group).
Definition VN300Defs.h:114
@ GPSGROUP_POSECEF
Gps position (ECEF).
Definition VN300Defs.h:123
@ GPSGROUP_VELNED
Gps velocity (NED).
Definition VN300Defs.h:124
@ GPSGROUP_NUMSATS
Number of tracked satellites.
Definition VN300Defs.h:119
@ GPSGROUP_WEEK
Gps week.
Definition VN300Defs.h:118
@ GPSGROUP_POSLLA
Gps position (latitude, longitude, altitude).
Definition VN300Defs.h:121
@ GPSGROUP_FIX
Gps fix.
Definition VN300Defs.h:120
@ GPSGROUP_UTC
Gps UTC time.
Definition VN300Defs.h:116
@ GPSGROUP_TIMEINFO
Gps time status and leap seconds.
Definition VN300Defs.h:129
@ GPSGROUP_DOP
Dilution of precision values.
Definition VN300Defs.h:130
@ GPSGROUP_VELU
Velocity uncertainty.
Definition VN300Defs.h:127
@ GPSGROUP_TIMEU
Time uncertainty.
Definition VN300Defs.h:128
@ GPSGROUP_TOW
Gps time of week.
Definition VN300Defs.h:117
@ GPSGROUP_VELECEF
Gps velocity (ECEF).
Definition VN300Defs.h:125
@ GPSGROUP_POSU
Position uncertainty (NED).
Definition VN300Defs.h:126
AttitudeGroup
Values used to select data for the binary output from group 5 (attitude group).
Definition VN300Defs.h:138
@ ATTITUDEGROUP_ACCELNED
Compensated acceleration (NED).
Definition VN300Defs.h:145
@ ATTITUDEGROUP_LINEARACCELBODY
Compensated linear acceleration (no gravity).
Definition VN300Defs.h:146
@ ATTITUDEGROUP_LINEARACCELNED
Compensated linear acceleration (no gravity) (NED).
Definition VN300Defs.h:148
@ ATTITUDEGROUP_YAWPITCHROLL
Yaw pitch roll.
Definition VN300Defs.h:141
@ ATTITUDEGROUP_QUATERNION
Quaternion.
Definition VN300Defs.h:142
@ ATTITUDEGROUP_MAGNED
Compensated magnetic (NED).
Definition VN300Defs.h:144
@ ATTITUDEGROUP_DCM
Directional cosine matrix.
Definition VN300Defs.h:143
@ ATTITUDEGROUP_YPRU
Yaw Pitch Roll uncertainty.
Definition VN300Defs.h:150
@ ATTITUDEGROUP_VPESTATUS
VpeStatus.
Definition VN300Defs.h:140
struct __attribute__((packed)) BinaryDataFull
Structure to handle binary message in case of full sampling (all available measurements are taken).
Definition VN300Defs.h:219
This file includes all the types the logdecoder script will decode.
Structure to handle antenna A position units [m].
Definition VN300Defs.h:178
Structure to handle INS (inertial navigation system) data.
Definition VN300Defs.h:191