package senlcm;

struct ms_gx1_t
{
    int64_t utime;

    int64_t bitmask;
    const int16_t 
        INST_MAGFIELD=1,
        INST_ACCEL=2,
        INST_ANGRATE=4,
        INST_EULER=8,
        INST_M=16,
        INST_Q=32,
        STAB_MAGFIELD=64,
        STAB_ACCEL=128,
        STAB_ANGRATE=256,
        STAB_EULER=512,
        STAB_M=1024,
        STAB_Q=2048,
        TEMPERATURE=4096;


    // stabilized
    double sMagField[3];   // [Gauss] magnetic field vector
    double sAccel[3];      // [m/s^2] linear acceleration
    double sAngRate[3];    // [rad/s] angular rate
    double sEuler[3];      // [rad]   Euler angles
    double sM[3][3];       // 3x3 rotation matrix
    double sQ[4];          // quaternion

    // instantaneous
    double iMagField[3];   // [Gauss] magnetic field vector
    double iAccel[3];      // [m/s^2] linear acceleration
    double iAngRate[3];    // [rad/s] angular rate
    double iEuler[3];      // [rad]   Euler angles
    double iM[3][3];       // 3x3 rotation matrix
    double iQ[4];          // quaternion

    double Temperature;  // [C]
    int16_t TimerTicks; // seconds
}
