Vivian MEAZZA: add missing heading-indicator-dg inclusion (instrument_mgr.cxx)
mf: - fix abs/fabs bug - typos & cosmetics
This commit is contained in:
parent
eb6b28f507
commit
b4a4e9ea86
4 changed files with 14 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue