Search code examples
magnetometermovesense

Is movesense magnetometer in NED or ENU reference frame? / how to determine magnetometer reference frame?


I can't find an axis diagram for the movesense sensor, nor does it say on the spec sheet on the website - Is the magnetometer in the NED or ENU reference frame? On SO there is an answer that doesn't differentiate between the accelerometer, gyro and magnetometer.

I've set it down next to my phone's magnetometer, but as it's not calibrated I'm not sure how to compare. Oriented in the same direction as my phone (text facing upwards), the reading on my phone is: x: 0.1, y: 26.6, z: -31.1 movesense sensor: x: 85.5, y: -12.95, z: 120

If I rotate it 90 degrees towards the east, I get: x: 116, y: 17, z: 124


Solution

  • The axes are as follows:

    • x-axis: reading direction of the sticker / line from one stud to another
    • y-axis: the line towards the top of the sticker when looking from the sticker side
    • z-axis: line normal to the sticker and battery cover

    The +- direction can be confirmed with the showcase app (accelerometer signal) and is as follows:

    • +x axis is out of the right side (when seen from sticker side)
    • +y axis is out of the top of sensor (when seen from sticker side)
    • +z axis is straight out of the sticker in normal direction

    Same axes are also for gyro and follows right hand rule (thumb in the direction of positive axis, rotation is in direction of other fingers.

    Magnetic field is a bit more difficult to test (requires a known magnetic field) but follows the same axis directions. With using the magnetic field as a compass (like with AHRS algorithms) it is important to calibrate away the offset caused by the magnetic materials inside the sensor (mainly the battery). To do this, rotate the sensor around all axes and find the centerpoint of the point cloud.

    Full Disclosure: I work for the Movesense team