Hi spachner,
For example: BMM150 had default sensing axis orientation(black color in picture), device also had sensing axis orientation(red color).
For BMM150 itself: struct bmm150_mag_data { /*! compensated mag X data */ float x;
/*! compensated mag Y data */ float y;
/*! compensated mag Z data */ float z; }; /*! Structure containing mag data */ struct bmm150_mag_data data;
For device: /*! @brief structure definition to hold the data and other info from the module */ typedef struct { float x; float y; float z; }vector_3d_t; vector_3d_t mag_in;
//Remap it according your HW board mag_in.x = bmm150dev.data.x; mag_in.y = -bmm150dev.data.y; mag_in.z = -bmm150dev.data.z;
... View more