In MMC5983 magnetometer (Arduino library example 3) it says:
“// Magnetic north is oriented with the Y axis // Convert the X and Y fields into heading using atan2 (Arc Tangent 2) heading = atan2(scaledX, 0 - scaledY);”.
–From the code in example 3, it looks like there is no correction for magnetic declination, so do we always have to subtract magnetic declination regardless of its sign??
–Is there a write up on how the Arduino library examples were developed?? I mean a paper covering the physics and programming used in the examples.
Thanks. AA