Computes the magnetic declination at a geographic position using the World Magnetic Model 2025 (WMM2025).
Declination is the angle between true north and magnetic north. A positive value means magnetic north is east of true north; negative means west.
Geodetic latitude in decimal degrees (-90 to 90).
Geodetic longitude in decimal degrees (-180 to 180).
Optional
Optional altitude and date.
Magnetic declination in degrees (positive east, negative west).
import { magnetic } from '@squawk/flight-math';// Declination at Boulder, CO on Jan 1 2025const dec = magnetic.magneticDeclination(40.0, -105.0, { date: new Date(Date.UTC(2025, 0, 1)),}); Copy
import { magnetic } from '@squawk/flight-math';// Declination at Boulder, CO on Jan 1 2025const dec = magnetic.magneticDeclination(40.0, -105.0, { date: new Date(Date.UTC(2025, 0, 1)),});
Computes the magnetic declination at a geographic position using the World Magnetic Model 2025 (WMM2025).
Declination is the angle between true north and magnetic north. A positive value means magnetic north is east of true north; negative means west.