+void SGMagVar::update( const SGGeod& geod, double jd ) {
+
+ update(geod.getLongitudeRad(), geod.getLatitudeRad(),
+ geod.getElevationM(), jd);
+}
+
+
+double sgGetMagVar( double lon, double lat, double alt_m, double jd ) {
+ // cout << "lat = " << lat << " lon = " << lon << " elev = " << alt_m
+ // << " JD = " << jd << endl;
+
+ 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);
+}
+