# include <config.h>
#endif
+#include <simgear/misc/sg_path.hxx>
#include <simgear/magvar/magvar.hxx>
#include <FDM/flight.hxx>
#include <Main/globals.hxx>
-#include <Main/options.hxx>
#include "light.hxx"
#include "moonpos.hxx"
#include "tmp.hxx"
-FGMagVar::FGMagVar() {
-}
-
-FGMagVar::~FGMagVar() {
-}
-
-
-void FGMagVar::update( double lon, double lat, double alt_m, double jd ) {
- // Calculate local magnetic variation
- double field[6];
- // cout << "alt_m = " << alt_m << endl;
- magvar = SGMagVar( lat, lon, alt_m / 1000.0, (long)jd, field );
- magdip = atan(field[5]/sqrt(field[3]*field[3]+field[4]*field[4]));
-}
-
-FGMagVar cur_magvar;
-
-
// periodic time updater wrapper
void fgUpdateLocalTime() {
+ SGPath zone( globals->get_fg_root() );
+ zone.append( "Timezone" );
globals->get_time_params()->updateLocal( cur_fdm_state->get_Longitude(),
cur_fdm_state->get_Latitude(),
- current_options.get_fg_root() );
+ zone.str() );
}