Skip to content

Instantly share code, notes, and snippets.

@xiaodong2077
Created October 16, 2024 00:47
Show Gist options
  • Save xiaodong2077/e6c6c20b1b60e74b50b73aa196cf2336 to your computer and use it in GitHub Desktop.
Save xiaodong2077/e6c6c20b1b60e74b50b73aa196cf2336 to your computer and use it in GitHub Desktop.
C++ header about the data struct of FMI IM19.
#ifndef IM19_DATA_H
#define IM19_DATA_H
#include <cstdint>
struct __attribute__((packed)) IMUData {
char header[4] = {'f', 'm', 'i', 'm'};
double hhmmss_ss;
float acc_x;
float acc_y;
float acc_z;
float gyro_x;
float gyro_y;
float gyro_z;
float reserved[3];
uint16_t checksum;
char footer[2] = {'e', 'd'};
};
struct __attribute__((packed)) GNSSData {
char header[4] = {'f', 'm', 'i', 'g'};
double hhmmss_ss;
double BLH[3];
float vel_n;
float vel_e;
float vel_d;
float pos_cov_n;
float pos_cov_e;
float pos_cov_d;
float reserved[2];
float dual_antenna_heading;
float hrms;
float vrms;
float hdop;
float vdop;
uint8_t satellite_count;
uint8_t status;
uint8_t diff_age;
uint16_t checksum;
char footer[2] = {'e', 'd'};
};
struct __attribute__((packed)) NAVIData {
char header[4] = {'f', 'm', 'i', 'n'};
double hhmmss_ss;
double BLH[3];
float vel_n;
float vel_e;
float vel_d;
float roll;
float pitch;
float yaw;
float precision;
float acc_bias_x;
float acc_bias_y;
float acc_bias_z;
float gyro_bias_x;
float gyro_bias_y;
float gyro_bias_z;
float temperature;
uint32_t status;
uint16_t checksum;
char footer[2] = {'e', 'd'};
};
#endif // IM19_DATA_H
@xiaodong2077
Copy link
Author

xiaodong2077 commented Oct 16, 2024

For more infomation, please check the FMI website: https://www.feymani-global.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment