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.
For accurate orientation estimation there is this. If you just want to know the magnetic field, any magnetometer will do. I like the MMC5983A. Neither of these has been embedded in a LoRaWAN node yet.