Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate magnetic declination #300

Closed
albar965 opened this issue Sep 13, 2018 · 7 comments
Assignees
Milestone

Comments

@albar965
Copy link
Owner

@albar965 albar965 commented Sep 13, 2018

Calculate magnetic declination on the fly for current year instead of using fixed files.

http://www.edwilliams.org/avform.htm#Var

https://github.com/FlightGear/simgear/tree/next/simgear/magvar

@albar965 albar965 added this to the Release 2.4 milestone Sep 13, 2018
@albar965 albar965 self-assigned this Sep 13, 2018
@jdvalleiz

This comment has been minimized.

Copy link

@jdvalleiz jdvalleiz commented Dec 4, 2018

Hi there,

Why not use the WMMCOF from https://www.ngdc.noaa.gov/geomag/WMM/soft.shtml
I think that X-Plane use this coefficient file (WMM.COF). it brings declination for a location (lat/lon) and a precise date (day). Therefore it's not a bunch of static values and it agrees with X-Plane values, moreover it can covers 5 years accurately (2015-2020 for WMM2015COFv2).

Many thanks for your work Alex, please keep up the great job!

@albar965

This comment has been minimized.

Copy link
Owner Author

@albar965 albar965 commented Dec 4, 2018

Thank you for the link! Very helpful. :-)
I'll add the WMM software to the atools library once this issue is due. This seems to be the most accurate solution so far.
Alex

@jdvalleiz

This comment has been minimized.

Copy link

@jdvalleiz jdvalleiz commented Dec 4, 2018

Alex,

Glad that it can contribute to LNM jewel!

You can find libraries to use the WMM.COF here :
https://www.ngdc.noaa.gov/geomag/WMM/thirdpartycontributions.shtml

I use daily the python version (Christopher Weiss contribution on the page above) and it sticks very well with values provided through X-PLANE (you can find WMM.COF in XPL installed files) : magnetic bearings without crosswinds on long legs are very precise.

BTW it's the model used in real world apps like skyvector (VFR predominance).

Cheers!
Jean-Eudes

@albar965

This comment has been minimized.

Copy link
Owner Author

@albar965 albar965 commented Dec 5, 2018

There are plenty of other problems that come from real world data (VORs calibrated a long time ago with differing declination from surrounding) or issues when traveling along long legs where declination changes significantly between start and end. This all makes it hard to give a precise magnetic course. Maybe I should add true course as well in future versions.
Alex

@jdvalleiz

This comment has been minimized.

Copy link

@jdvalleiz jdvalleiz commented Dec 5, 2018

You are perfectly right. Long haul navigation is not as simple as it appears.
Dead reckoning navigation (beyond VOR/NDB range) is always a challenge, but it's also so fun.

Regards,
Jean-Eudes

@gaabne

This comment has been minimized.

Copy link

@gaabne gaabne commented Dec 14, 2018

I fear the inconsistencies that this may rise with the magdec.bgl used by the sim (FSX or P3D).
To limit them, I copy the one used by the simulation to LNM mapdec directory.

Does this make sense ?

Regards
Gérard

@albar965

This comment has been minimized.

Copy link
Owner Author

@albar965 albar965 commented Dec 14, 2018

Hi Gérard,
not needed. LNM uses the FSX/P3D magdec.bgl if present in the scenery library. The included one is a fallback for X-Plane. You can see that in the log file:
... Reading ".../Prepar3D v4/Scenery/BASE/Scenery/magdec.bgl"
Alex

albar965 added a commit to albar965/atools that referenced this issue May 26, 2019
Changed X-Plane and DFD compiler to save declination based on current year and month into database.
albar965/littlenavmap#300
albar965 added a commit that referenced this issue May 26, 2019
based on current year and month. Resulting table is written into database when compiling scenery library.
#300
albar965 added a commit to albar965/navdatareader that referenced this issue May 26, 2019
…here resulting table is written into database.

For DFD and X-Plane compiler.
albar965/littlenavmap#300
@albar965 albar965 closed this May 26, 2019
albar965 added a commit to albar965/atools that referenced this issue May 26, 2019
albar965 added a commit to albar965/atools that referenced this issue May 26, 2019
albar965 added a commit to albar965/atools that referenced this issue May 26, 2019
albar965 added a commit that referenced this issue Jul 10, 2019
…ation data.

Falling back to WMM if database is empty now.
#300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.