// $Id$
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
+
#include <math.h>
#include <simgear/magvar/magvar.hxx>
void SGMagVar::update( const SGGeod& geod, double jd ) {
- update(geod.getLongitudeDeg(), geod.getLatitudeDeg(),
+ update(geod.getLongitudeRad(), geod.getLatitudeRad(),
geod.getElevationM(), jd);
}
double field[6];
return calc_magvar( lat, lon, alt_m / 1000.0, (long)jd, field );
}
+
+double sgGetMagVar( const SGGeod& pos, double jd )
+{
+ return sgGetMagVar(pos.getLongitudeRad(), pos.getLatitudeRad(),
+ pos.getElevationM(), jd);
+}
+