TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: FELIX on September 07, 2019, 11:26:11 PM
-
Any reference on how to get the magnetic declination and annual variation of a geographical point?
-
i want to calculate it yourself or just get it from the remote source?
-
By remote source already solves me.
If I can calculate and it's simple, I'm interested too.
-
there's the program with the source code https://www.ngdc.noaa.gov/geomag/geom_util/gmpole.shtml
it calculates only the position of geomagnetic pole (no declination)
and it does not look simple at all
-
This URL return the two values I need (magnetic declination and annual variation). Can you make the program call of this calculator?
https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml
(https://www.dropbox.com/s/oc87m5lr557qzoz/Sem%20t%C3%ADtulo.png?dl=0)
-
Got it:
(SETQ XML (vk_ReadXML (STRCAT "http://www.ngdc.noaa.gov/geomag-web/calculators/calculateDeclination?lat1=" (RTOS LATGR1 2 8) "&lon1=" (RTOS LONGR1 2 8) "&resultFormat=xml")))