]> git.mxchange.org Git - flightgear.git/commitdiff
Updates to add in navaid management code.
authorcurt <curt>
Fri, 21 Apr 2000 04:20:35 +0000 (04:20 +0000)
committercurt <curt>
Fri, 21 Apr 2000 04:20:35 +0000 (04:20 +0000)
src/Makefile.am
src/Time/fg_time.cxx

index 60a2d88d8ccad66a1f3049249ecdb4e70db63593..ece0b1969cdf7bcf1892136f7129fca937d84f9b 100644 (file)
@@ -22,6 +22,7 @@ SUBDIRS = \
         FDM \
         GUI \
         Joystick \
+       Navaids \
         $(NETWORK_DIRS) \
         Objects \
         Scenery \
index 297c28f53e8cc7a207ae4316c79cdd3bc3d8bf10..39afdf439c42e63edecf48c501c7ef4447005146 100644 (file)
@@ -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 );