albar965 / littlenavmap

Little Navmap is a free flight planner, navigation tool, moving map, airport search and airport information system for Flight Simulator X, Microsoft Flight Simulator 2020, Prepar3D and X-Plane.
https://albar965.github.io/littlenavmap.html
GNU General Public License v3.0
1.3k stars 163 forks source link

Magnetic variation does not appear to work anywhere in the US #425

Closed arnonmoscona closed 5 years ago

arnonmoscona commented 5 years ago

No magnetic variation information on navaids

This is not a new issue in my setup. When I plan anywhere in the world I seem to have no magnetic variation info on any navaid (e.g. VORs). The compass rose does not show a declination. Also when measuring GC or Rhumb distances I get a result like 201T (rather than 220M, for example).

This is true anywhere, but you can use the TOY VOR near KSTL if you'd like a specific example.

albar965 commented 5 years ago

The VOR declination is taken from the the VOR station's BGL. Overall declination is taken from the magdec.bgl (P3DBASE/Scenery/Base/Scenery/magdec.bgl) if present. LNM reads this file when reading the scenery library and places a copy in its own database.

TOY (Troy) VOR has a declination of 4° East here which differs from 2° in the surrounding. This VOR was probably calibrated a long time ago.

Can you see the declination in the status bar? Did you install a navdata update (e.g. fsAerodata or FSX/P3D Navaids update)? What happens if you switch to "Use Navigraph only" in LNM? Still no declination on VOR and environment (status bar)? Same as above for "Do not use Navigraph"?

It might the the magdec.bgl file which can be unreadable, missing or otherwise broken.

If all fails load the scenery library and send me the log file per email. I'd not recommend to attach it here.

Alex

arnonmoscona commented 5 years ago

Thanks for the super-quick response!

This is an awesome package. I contributed before and I feel like contributing again. A whole bunch of "thank you"s!

arnonmoscona commented 5 years ago

This is very odd. Could be that I am just confused. But after changing between the 3 options under "Scenery Library/Navigraph" (where I assume you meant to try Navigraph only and no Navigraph), I get a different result then I got before regardless of what option I use. When I hover over these VORs I do see now a declination, where before I did not. I'm pretty certain that this declination info was not there before, as I was looking for it.

However, when I measure distance, I still get True rather than Magnetic bearing. If I understood the documentation correctly, it should show magnetic when magnetic declination data is available. Is there some kind of option or setting I am missing somewhere?

albar965 commented 5 years ago

Strange. I have no idea what can cause this. VOR should always have a declination (except a few where scenery data is buggy) independent of magdec.bgl. The declination shown in the status bar depends on magdec.bgl and might show null if reading of the BGL failed for whatever reason.

GC distance shows true only. Rhumb distance shows true and magnetic bearing. The bearing of measurement lines also depends if they start at a VOR or airport. The ident/name/frequency is shown in the label then.

Alex

albar965 commented 5 years ago

BTW: The calculation of declination changed with #300. It is now calculated instead read from the included BGL.

arnonmoscona commented 5 years ago

Thanks Alex! I'll check with Rhumb distance. I did not try that last night. Really appreciate the super-quick response time.

arnonmoscona commented 5 years ago

I just tested with Rhumb distance and it now works there (showing both). No idea what happened. Before I fiddled with the settings, neither the Rhumb distsnce showed magnetic bearing nor did hovering over a VOR showed declination. Now I'm back to the original settings and everything works "as advertised". Very odd.

But thank you so much for the good support. I donated more today. You deserve so much more than my little $40 donation.

albar965 commented 5 years ago

Hi Arnon,

first: Thank you very much for your donation which is for sure not little!

I'm still confused about what caused this. Maybe the magdec.bgl not readable? I'll have a closer look at the code and add more error checking and reporting. Feel free to close the issue if you think all is working now as expected. You can reopen it again if the problems reappear. Alex

arnonmoscona commented 5 years ago

I am not sure myself, Alex. What I do know is that I did not touch the data in between those tests and did not run anything that would update it (including updating the navigraph data). In fact during the 2 day period in question I didn't even run my simulator.

So the only thing I think I did was tinker with the settings of whether or not to use navigraph etc. So i'm pretty sure that magdec.bgl was readable before.

I have used the sim as well as little nav map several times since and I am consistently getting the magnetic bearing both in measurement and in plan segments now (after the "tinkering" it never happened again). I will be sure to let you know if I encounter it again.

albar965 commented 5 years ago

Thanks for the feedback. Let me know if LNM shows any problems again in this regard.

I'm sure that there are quite a few gremlins in LNM that appear occasionally.

I closed the issue. Feel free to reopen if needed.

All the best Alex