Finding Magnetic Declination

60 Views Asked by At

I am trying to find an exact "plug and chug" formula for calculating magnetic declination given time, date, latitude, longitude, elevation, etc. Everywhere I look tells me to use their web based calculator. I was hoping there was a way that I could figure this out myself and maybe code my own calculator.

1

There are 1 best solutions below

0
On

I don't think an "exact plug and chug" formula exists for this problem.

A free fully documented implementation that does the job is available here:

https://www.ngdc.noaa.gov/geomag/WMM/soft.shtml

It's a substantial piece of software.

You might be able to read the code and the documentation and put together a crude approximation of your own.