]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/metarproperties.cxx
toggle fullscreen: also adapt GUI plane when resizing
[flightgear.git] / src / Environment / metarproperties.cxx
index aa67b355a7b8fa9bfadcfb6a08c8f6ff0322e8ba..944307b0169825e7e3afdbeb89a193d0aae35b8e 100644 (file)
@@ -88,10 +88,8 @@ inline void MagneticVariation::recalc( double lon, double lat, double alt )
     _lat = lat;
     _alt = alt;
 
-    lon *= SGD_DEGREES_TO_RADIANS;
-    lat *= SGD_DEGREES_TO_RADIANS;
-    alt *= SG_FEET_TO_METER;
-   _time.update( lon, lat, 0, 0 );
+    SGGeod location(SGGeod::fromDegFt(lon, lat, alt));
+   _time.update( location, 0, 0 );
     update( lon, lat, alt, _time.getJD() );
   }
 }