From f83731630c77534bc7b3cedeee6111d56c214466 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 21 Apr 2000 04:20:35 +0000 Subject: [PATCH] Updates to add in navaid management code. --- src/Makefile.am | 1 + src/Time/fg_time.cxx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 60a2d88d8..ece0b1969 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,6 +22,7 @@ SUBDIRS = \ FDM \ GUI \ Joystick \ + Navaids \ $(NETWORK_DIRS) \ Objects \ Scenery \ diff --git a/src/Time/fg_time.cxx b/src/Time/fg_time.cxx index 297c28f53..39afdf439 100644 --- a/src/Time/fg_time.cxx +++ b/src/Time/fg_time.cxx @@ -398,8 +398,8 @@ void FGTime::update( double lon, double lat, double alt_m ) { // Calculate local magnetic variation double field[6]; // cout << "alt_m = " << alt_m << endl; - magvar = SGMagVar( lat, lon, alt_m / 1000.0, jd, field ); - magdip = atan(field[5]/pow(field[3]*field[3]+field[4]*field[4],0.5)); + magvar = SGMagVar( lat, lon, alt_m / 1000.0, (long)jd, field ); + magdip = atan(field[5]/sqrt(field[3]*field[3]+field[4]*field[4])); FG_LOG( FG_EVENT, FG_DEBUG, " Current lon=0.00 Sidereal Time = " << gst ); -- 2.39.5