https://github.com/ftzi/magneticDeclinationByCoord
Wants to convert your GPS coordinates to the magnetic declination? AUTOMATICALLY? Concerned about the accuracy of it? OR NOT? 3AM here and I finished it!
https://github.com/ftzi/magneticDeclinationByCoord
Last synced: about 1 year ago
JSON representation
Wants to convert your GPS coordinates to the magnetic declination? AUTOMATICALLY? Concerned about the accuracy of it? OR NOT? 3AM here and I finished it!
- Host: GitHub
- URL: https://github.com/ftzi/magneticDeclinationByCoord
- Owner: ftzi
- Created: 2019-04-15T05:42:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-16T03:01:55.000Z (about 7 years ago)
- Last Synced: 2025-03-03T06:29:31.820Z (over 1 year ago)
- Language: Objective-C
- Size: 262 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# declinationGridToArray
Wants to convert your GPS coordinates to the magnetic declination? AUTOMATICALLY? Concerned about the accuracy of it? OR NOT? 3AM here and I finished it!
Later I will write this readme properly.
### About:
Multiple tables of different sizes to fit your project needs.
### Quick story:
I was member of a university rocketry team, manager of the Avionics. One year ago, I found the WMM2015v2 (https://www.ngdc.noaa.gov/geomag/WMM/soft.shtml) software, which calculates the magnetic declination based on your coordinates. Yesterday, 21h, I thought it was a good time to integrate it to my system, to automatically calculate it based on the GPS coordinates. I was struggling to reverse engineer the code of it, which is the hell on Earth. So I googled if anyone had already this idea. Yeap. https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_Declination.
:-(
BUT! I planned this mission for a whole year. I wouldn't just use someone's else work... - but I decided to copy the table idea, anyway, as the WMM code is really a mess, and I don't know if it would run on a microcontroller.
First I was thinking to use RegEx to create the tables, but then I decided to just change the WMM code and remake it, to automatically output in a C array.
Uses the wmm_grid.exe program, which can create a declination map for the entire planet.