X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fheading_indicator_fg.cxx;h=32332a3e1a648a257cabee0e140e8eaef96909e3;hb=1867ccb4a8484b9bc856c88629e09e25bcc35d42;hp=eeeaf1bd4570a58f5272327f63de6d858c6a27e3;hpb=043128c7c093c99125ba0ece4c0bcc0b697d2a63;p=flightgear.git diff --git a/src/Instrumentation/heading_indicator_fg.cxx b/src/Instrumentation/heading_indicator_fg.cxx index eeeaf1bd4..32332a3e1 100644 --- a/src/Instrumentation/heading_indicator_fg.cxx +++ b/src/Instrumentation/heading_indicator_fg.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include
@@ -66,7 +65,7 @@ HeadingIndicatorFG::init () SGPropertyNode *node = fgGetNode(branch.c_str(), num, true ); if( NULL == (_offset_node = node->getChild("offset-deg", 0, false)) ) { _offset_node = node->getChild("offset-deg", 0, true); - _offset_node->setDoubleValue( -globals->get_mag()->get_magvar() * SGD_RADIANS_TO_DEGREES ); + _offset_node->setDoubleValue( -fgGetDouble("/environment/magnetic-variation-deg") ); } _serviceable_node = node->getChild("serviceable", 0, true); _error_node = node->getChild("heading-bug-error-deg", 0, true); @@ -161,7 +160,7 @@ HeadingIndicatorFG::update (double dt) // calculate the difference between the indicated heading // and the selected heading for use with an autopilot - static SGPropertyNode *bnode + SGPropertyNode *bnode = fgGetNode( "/autopilot/settings/heading-bug-deg", false ); double diff = 0; if ( bnode ){