Compass node

Does anyone know of a node that can be used as a simple compass (i.e. to derive its simple magnetic heading)?

Is the only option something like the RAK2700 tracker? (which is a bit of overkill, but it has 3 magnetometer readings).

Can anyone recommend a better device?

If the 3 magnetometer readings are the only option, how does one process these readings to derive the magnetic heading in the horizontal plane?

from the magnetometer readings you can calculate the bearing it is facing, however there are other aspects to consider including using an accelerometer to add any tilt compensation to counteract the device not being completely in line with the earths magnetic fields.

I’ve done this in a couple of commercial products. The calculations are available online as I can’t remember exactly where I obtained the information I used.


Thank you for the information, Andrew.
In my application, the node would always be horizontal and merely be rotating like a weather vane, so hopefully the calculation need only involve the magnetometer values.