Converts a magnetic bearing to a true bearing by adding the magnetic declination at the given position. The result is normalized to [0, 360).
Magnetic bearing in degrees.
Geodetic latitude in decimal degrees.
Geodetic longitude in decimal degrees.
Optional
Optional altitude and date.
True bearing in degrees, normalized to [0, 360).
import { magnetic } from '@squawk/flight-math';// Convert a magnetic heading of 350 to true at a given positionconst trueHeading = magnetic.magneticToTrue(350, 40.0, -105.0); Copy
import { magnetic } from '@squawk/flight-math';// Convert a magnetic heading of 350 to true at a given positionconst trueHeading = magnetic.magneticToTrue(350, 40.0, -105.0);
Converts a magnetic bearing to a true bearing by adding the magnetic declination at the given position. The result is normalized to [0, 360).