declination
number declination(latitude, longitude, altitude, timestamp)
Returns the approximate declination of the horizontal component of the magnetic field from true north at location and time.
Parameters
- latitude — latitude of location.
- longitude — longitude of location.
- altitude — optional altitude in meters, default is 0.
- ts — optional unix timestamp, default is current time.
Returns
- an approximate declination from true north in degrees.