]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Also properly reinit previously set time of day upon reset.
[flightgear.git] / src / Main / fg_props.cxx
index 18345fc9f281fa0ea619c8956d11a3122e039728..22b1d0901522ccbfcdcbd4257dc45231ffd8ae58 100644 (file)
@@ -24,7 +24,7 @@
 #  include <simgear/compiler.h>
 #endif
 
-#include <simgear/misc/exception.hxx>
+#include <simgear/structure/exception.hxx>
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/timing/sg_time.hxx>
 #include <simgear/misc/sg_path.hxx>
@@ -46,7 +46,6 @@
 #include <GUI/gui.h>
 
 #include "globals.hxx"
-#include "fgfs.hxx"
 #include "fg_props.hxx"
 
 SG_USING_STD(istream);
@@ -334,7 +333,6 @@ setDateString (const char * date_string)
   double lat = current_aircraft.fdm_state->get_Latitude();
   globals->set_warp(warp);
   st->update(lon, lat, cur_time_override->getLongValue(), warp);
-  fgUpdateSkyAndLightingParams();
 }
 
 /**
@@ -378,7 +376,10 @@ getMagDip ()
 static double
 getHeadingMag ()
 {
-  return current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
+  double magheading;
+  magheading = current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
+  if (magheading < 0) magheading += 360;
+  return magheading;
 }