]> git.mxchange.org Git - flightgear.git/commitdiff
Vivian MEAZZA: add missing heading-indicator-dg inclusion (instrument_mgr.cxx)
authormfranz <mfranz>
Tue, 24 Oct 2006 16:03:44 +0000 (16:03 +0000)
committermfranz <mfranz>
Tue, 24 Oct 2006 16:03:44 +0000 (16:03 +0000)
mf:
- fix abs/fabs bug
- typos & cosmetics

src/Instrumentation/heading_indicator_dg.cxx
src/Instrumentation/heading_indicator_fg.cxx
src/Instrumentation/instrument_mgr.cxx
src/Instrumentation/mrg.cxx

index eb8726c8971d330c3ce204b49e2546ae642349bd..28be8a3a1412b481ea68a596992dd14762f5e748 100644 (file)
@@ -1,5 +1,5 @@
 // heading_indicator_dg.cxx - a Directional Gyro (DG) compass.
-// Based on the vacuum driven Heading Indicator Written by David Megginson, 
+// Based on the vacuum driven Heading Indicator Written by David Megginson,
 // started 2002.
 //
 // Written by Vivian Meazza, started 2005.
index 14027a412a3be522e3d1fc2aa82eadd886646b57..b5dde762d8a10828d285141e8f9c714ea1db82ab 100644 (file)
@@ -131,7 +131,7 @@ HeadingIndicatorFG::update (double dt)
 
     _heading_out_node->setDoubleValue(heading);
 
-                                    // calculate the difference between the indicacted heading
+                                    // calculate the difference between the indicated heading
                                     // and the selected heading for use with an autopilot
        static SGPropertyNode *bnode
         = fgGetNode( "/autopilot/settings/heading-bug-deg", false );
index 425d1ee1e90ef0db00e7331b1b3788c28c0432b5..9bc9172c58726e4d293065ce130c0cd2589d70c2 100644 (file)
@@ -33,6 +33,7 @@
 #include "gsdi.hxx"
 #include "heading_indicator.hxx"
 #include "heading_indicator_fg.hxx"
+#include "heading_indicator_dg.hxx"
 #include "kr_87.hxx"
 #include "kt_70.hxx"
 #include "mag_compass.hxx"
@@ -47,6 +48,7 @@
 #include "wxradar.hxx"
 #include "tacan.hxx"
 #include "mk_viii.hxx"
+#include "mrg.hxx"
 
 
 FGInstrumentMgr::FGInstrumentMgr ()
@@ -134,6 +136,9 @@ bool FGInstrumentMgr::build ()
         } else if ( name == "heading-indicator-fg" ) {
             set_subsystem( "instrument" + temp.str(), 
                            new HeadingIndicatorFG( node ) );
+        } else if ( name == "heading-indicator-dg" ) {
+            set_subsystem( "instrument" + temp.str(), 
+                           new HeadingIndicatorDG( node ) );
         } else if ( name == "KR-87" ) {
             set_subsystem( "instrument" + temp.str(), 
                            new FGKR_87( node ) );
@@ -173,6 +178,10 @@ bool FGInstrumentMgr::build ()
         } else if ( name == "mk-viii" ) { 
             set_subsystem( "instrument" + temp.str(), 
                            new MK_VIII( node ) );
+        } else if ( name == "master-reference-gyro" ) { 
+            set_subsystem( "instrument" + temp.str(), 
+                           new MasterReferenceGyro( node ) );
+
         } else {
             SG_LOG( SG_ALL, SG_ALERT, "Unknown top level section: " 
                     << name );
index 918160ae54eaf8053c4a4e293cb8afe4a61a0a24..8300791726d74fb54a82667ffc4da3459811c6fd 100644 (file)
@@ -1,5 +1,5 @@
-// MRG.cxx - an electrcally powered master reference gyro.
-// Written by Vivian Meazza based on wrok by David Megginson, started 2006.
+// MRG.cxx - an electrically powered master reference gyro.
+// Written by Vivian Meazza based on work by David Megginson, started 2006.
 //
 // This file is in the Public Domain and comes with no warranty.
 
@@ -167,7 +167,7 @@ MasterReferenceGyro::update (double dt)
        _last_yaw_rate = yaw_rate;
 
        //the gyro only erects inside limits
-       if ( abs ( yaw_rate ) <= 5
+       if ( fabs ( yaw_rate ) <= 5
                        && (_g_in_node->getDoubleValue() <= 1.5
                        || _g_in_node->getDoubleValue() >= -0.5) ) {
                indicated_roll = _last_roll;