Hacked-Crew / Magnetic-Declination

QGIS plugin
GNU General Public License v2.0
5 stars 8 forks source link

Update Magnetic_declination.py for TVMDCAW and CDMVTAE #9

Closed drf5n closed 6 months ago

drf5n commented 6 months ago

TVMDC AW needs to change sign to Add Westerly with +E declinations

As per https://github.com/Hacked-Crew/Magnetic-Declination/issues/2#issuecomment-1876016654

drf5n commented 6 months ago

Making these changes makes the panel calculations match the rose:

image image

...contrary to the screenshots in https://github.com/Hacked-Crew/Magnetic-Declination/issues/2#issuecomment-1876016654

drf5n commented 6 months ago

Or is this code backwards:

https://github.com/Hacked-Crew/Magnetic-Declination/blob/9ea3356558224a4fd86777c25b8d461eee4b11aa/MagneticDeclination/Magnetic_declination.py#L407-L410

The if simpleXtoMagnetic==1: condition seems like it should be converting true to magnetic with the geomag.mag_heading(...) function.

I'm confused.

drf5n commented 6 months ago

Swapping the clauses of the if statement also makes it work. That is a better solution than this pull request which would muck up the geomag.mag_heading() function.

Closing this in favor of https://github.com/Hacked-Crew/Magnetic-Declination/pull/10