]> git.mxchange.org Git - simgear.git/blobdiff - simgear/magvar/magvar.cxx
Add project.* to MSVC project files
[simgear.git] / simgear / magvar / magvar.cxx
index 095c9718eb037fda46c7b13ec4854c276ed53a38..2744e20e3c1c7c83ce999282ad7ed329055e8c7d 100644 (file)
@@ -50,7 +50,7 @@ void SGMagVar::update( double lon, double lat, double alt_m, double jd ) {
 
 void SGMagVar::update( const SGGeod& geod, double jd ) {
 
-  update(geod.getLongitudeDeg(), geod.getLatitudeDeg(),
+  update(geod.getLongitudeRad(), geod.getLatitudeRad(),
     geod.getElevationM(), jd);
 }
 
@@ -62,3 +62,10 @@ double sgGetMagVar( double lon, double lat, double alt_m, double 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);
+}
+