// 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.
_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 );
#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"
#include "wxradar.hxx"
#include "tacan.hxx"
#include "mk_viii.hxx"
+#include "mrg.hxx"
FGInstrumentMgr::FGInstrumentMgr ()
} 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 ) );
} 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 );
-// 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.
_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;