]> git.mxchange.org Git - flightgear.git/commitdiff
Feature request for Syd - expose the ND view heading
authorJames Turner <zakalawe@mac.com>
Mon, 23 Apr 2012 12:59:01 +0000 (13:59 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 23 Apr 2012 12:59:01 +0000 (13:59 +0100)
src/Instrumentation/NavDisplay.cxx
src/Instrumentation/NavDisplay.hxx

index c45a705efe5eadf624b0fc851895b6c783bd9885..5c6720ae19d7b1398cd5bd0b5b3b14feaaaeb9c8 100644 (file)
@@ -540,6 +540,7 @@ NavDisplay::init ()
     _testModeNode = _Instrument->getChild("test-mode", 0, true);
     _testModeNode->setBoolValue(false);
   
+    _viewHeadingNode = _Instrument->getChild("view-heading-deg", 0, true);
 // OSG geometry setup
     _radarGeode = new osg::Geode;
 
@@ -647,6 +648,7 @@ NavDisplay::update (double delta_time_sec)
   } else {
     _view_heading = _Instrument->getFloatValue("heading-up-deg", 0.0);
   }
+  _viewHeadingNode->setDoubleValue(_view_heading);
   
   double xCenterFrac = _xCenterNode->getDoubleValue();
   double yCenterFrac = _yCenterNode->getDoubleValue();
index 3e7adc7fa6566aac1c4218af82a53fff4606c92b..daa4ae34d905bebbd13ea15348fc9a019fd72b17 100644 (file)
@@ -146,7 +146,8 @@ private:
     SGPropertyNode_ptr _navRadio1Node;
     SGPropertyNode_ptr _navRadio2Node;
     SGPropertyNode_ptr _xCenterNode, _yCenterNode;
-    
+    SGPropertyNode_ptr _viewHeadingNode;
+  
     osg::ref_ptr<osg::Texture2D> _symbolTexture;
     osg::ref_ptr<osg::Geode> _radarGeode;
     osg::ref_ptr<osg::Geode> _textGeode;