28 #include "generated/airframe.h"
37 #include "pprzlink/messages.h"
62 #ifndef XSENS_OUTPUT_MODE
63 #define XSENS_OUTPUT_MODE 0x1836
91 #ifndef XSENS_OUTPUT_SETTINGS
92 #define XSENS_OUTPUT_SETTINGS 0x80000C05
136 XSENS_SetSyncOutSettings(0, 0x0002);
140 XSENS_SetSyncOutSettings(1, 100);
143 XSENS_ReqLeverArmGps();
147 XSENS_ReqMagneticDeclination();
152 #pragma message "Sending XSens Magnetic Declination."
158 #ifdef GPS_IMU_LEVER_ARM_X
159 #pragma message "Sending XSens GPS Arm."
160 XSENS_SetLeverArmGps(GPS_IMU_LEVER_ARM_X, GPS_IMU_LEVER_ARM_Y, GPS_IMU_LEVER_ARM_Z);
165 XSENS_SetBaudrate(baud);
170 XSENS_GoToMeasurment();
180 RunOnceEvery(100, XSENS_ReqGPSStatus());
191 }
else if (
xsens.
parser.
id == XSENS_ReqMagneticDeclinationAck_ID) {
209 xsens.gps.num_sv = 0;
215 if (ch >
xsens.gps.nb_channels) {
continue; }
220 if (
xsens.gps.svinfos[ch].flags > 0) {
235 offset += XSENS_DATA_RAWInertial_LENGTH;
238 #if USE_GPS_XSENS_RAW_DATA && USE_GPS_XSENS
261 offset += XSENS_DATA_RAWGPS_LENGTH;
265 offset += XSENS_DATA_Temp_LENGTH;
290 offset += l * XSENS_DATA_Calibrated_LENGTH / 3;
299 offset += XSENS_DATA_Quaternion_LENGTH;
305 offset += XSENS_DATA_Euler_LENGTH;
308 offset += XSENS_DATA_Matrix_LENGTH;
320 offset += l * XSENS_DATA_Auxiliary_LENGTH / 2;
326 offset += XSENS_DATA_Position_LENGTH;
328 #if (! USE_GPS_XSENS_RAW_DATA) && USE_GPS_XSENS
338 offset += XSENS_DATA_Velocity_LENGTH;
353 #endif // USE_GPS_XSENS
354 offset += XSENS_DATA_Status_LENGTH;
358 offset += XSENS_DATA_TimeStamp_LENGTH;
369 offset += XSENS_DATA_UTC_LENGTH;