Skip to main content
Associate III
July 25, 2024
Question

STEVAL-STWINBX1 datalogger - unable to get heading from 3-axis digital magnetic sensor (IIS2MDC)

  • July 25, 2024
  • 0 replies
  • 985 views

I am trying to use the raw data from the 3-axis digital magnetic sensor (IIS2MDC) to get a compass heading, but cannot get it to work.

With the STWINBX1 flat on a table, I slowly rotated it 360 degrees starting from north.

I then exported the data and used the following formula to calculate the heading...

johngj_0-1721922016855.png

The result shows a heading between 285 degrees to 344 degrees (instead of a full 360 degree swing)...

johngj_3-1721922390790.png

The raw data looks like this...

johngj_4-1721922632609.png

Spreadsheet iis2mdc.xlsx is attached for reference.