]> git.mxchange.org Git - flightgear.git/commitdiff
Kludge the HI error so that it initially matches the magnetic variation.
authordavid <david>
Thu, 17 Jul 2003 00:06:03 +0000 (00:06 +0000)
committerdavid <david>
Thu, 17 Jul 2003 00:06:03 +0000 (00:06 +0000)
src/Main/main.cxx

index 594696e76b33fe4262aa691d5a12b9478251605a..2a80636555b91bc813f93449f4009fe696c5efc0 100644 (file)
@@ -1774,6 +1774,13 @@ static bool fgMainInit( int argc, char **argv ) {
     SGMagVar *magvar = new SGMagVar();
     globals->set_mag( magvar );
 
+
+                                // kludge to initialize mag compass
+                                // (should only be done for in-flight
+                                // startup)
+    fgSetDouble("/instrumentation/heading-indicator/offset-deg",
+                globals->get_mag()->get_magvar() * SGD_RADIANS_TO_DEGREES);
+
     // airport = new ssgBranch;
     // airport->setName( "Airport Lighting" );
     // lighting->addKid( airport );