Patches and tweaks from Alex.
This commit is contained in:
parent
ca3fd98b5c
commit
1882fb0119
3 changed files with 23 additions and 4 deletions
|
@ -22,6 +22,7 @@
|
|||
|
||||
|
||||
#include <Aircraft/aircraft.hxx>
|
||||
#include <Main/bfi.hxx>
|
||||
#include <Navaids/ilslist.hxx>
|
||||
#include <Navaids/navlist.hxx>
|
||||
|
||||
|
@ -102,6 +103,7 @@ void FGRadioStack::update( double lon, double lat, double elev ) {
|
|||
nav1_loclat, nav1_loclon,
|
||||
&az1, &az2, &s );
|
||||
nav1_heading = az1;
|
||||
// Alex: nav1_heading = az1 - FGBFI::getMagVar() / RAD_TO_DEG;
|
||||
|
||||
// cout << " heading = " << nav1_heading
|
||||
// << " dist = " << nav1_dist << endl;
|
||||
|
@ -145,6 +147,7 @@ void FGRadioStack::update( double lon, double lat, double elev ) {
|
|||
nav2_loclat, nav2_loclon,
|
||||
&az1, &az2, &s );
|
||||
nav2_heading = az1;
|
||||
// Alex: nav2_heading = az1 - FGBFI::getMagVar() / RAD_TO_DEG;
|
||||
|
||||
// cout << " heading = " << nav2_heading
|
||||
// << " dist = " << nav2_dist << endl;
|
||||
|
|
|
@ -68,10 +68,16 @@ double FGSteam::the_MH_deg = 0.0;
|
|||
double FGSteam::the_MH_degps = 0.0;
|
||||
double FGSteam::get_MH_deg () { _CatchUp(); return the_MH_deg; }
|
||||
|
||||
double FGSteam::the_DG_err = 0.0;
|
||||
double FGSteam::the_DG_deg = 0.0;
|
||||
double FGSteam::the_DG_degps = 0.0;
|
||||
double FGSteam::the_DG_inhg = 0.0;
|
||||
double FGSteam::get_DG_deg () { _CatchUp(); return the_DG_deg; }
|
||||
double FGSteam::get_DG_err () { _CatchUp(); return the_DG_err; }
|
||||
|
||||
void FGSteam::set_DG_err ( double approx_magvar ) {
|
||||
the_DG_err = approx_magvar;
|
||||
}
|
||||
|
||||
double FGSteam::the_TC_rad = 0.0;
|
||||
double FGSteam::the_TC_std = 0.0;
|
||||
|
@ -84,7 +90,7 @@ double FGSteam::get_TC_std () { _CatchUp(); return the_TC_std; }
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
int FGSteam::_UpdatesPending = 9999; /* Forces filter to reset */
|
||||
int FGSteam::_UpdatesPending = 999; /* Forces filter to reset */
|
||||
|
||||
|
||||
void FGSteam::update ( int timesteps )
|
||||
|
@ -315,12 +321,20 @@ void FGSteam::_CatchUp()
|
|||
> have it tumble when you exceed the usual pitch or bank limits,
|
||||
> put in those insidious turning errors ... for now anyway.
|
||||
*/
|
||||
the_DG_deg = FGBFI::getHeading () - FGBFI::getMagVar();
|
||||
// cout << "Updates pending = " << _UpdatesPending << endl;
|
||||
if ( _UpdatesPending > 999 ) {
|
||||
the_DG_err = FGBFI::getMagVar();
|
||||
}
|
||||
the_DG_degps = 0.0; /* HACK! */
|
||||
if (dt<1.0) the_DG_err += dt * the_DG_degps;
|
||||
the_DG_deg = FGBFI::getHeading () - the_DG_err;
|
||||
|
||||
/**************************
|
||||
Finished updates, now clear the timer
|
||||
*/
|
||||
_UpdatesPending = 0;
|
||||
} else {
|
||||
// cout << "0 Updates pending" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,9 +58,11 @@ public:
|
|||
|
||||
// Position
|
||||
static double get_ALT_ft ();
|
||||
static double get_TC_rad ();
|
||||
static double get_MH_deg ();
|
||||
static double get_DG_deg ();
|
||||
static double get_TC_rad ();
|
||||
static double get_DG_err ();
|
||||
static void set_DG_err(double approx_magvar);
|
||||
|
||||
// Velocities
|
||||
static double get_ASI_kias ();
|
||||
|
@ -85,7 +87,7 @@ private:
|
|||
static double the_STATIC_inhg, the_VACUUM_inhg;
|
||||
static double the_VSI_fps, the_VSI_case;
|
||||
static double the_MH_deg, the_MH_degps, the_MH_err;
|
||||
static double the_DG_deg, the_DG_degps, the_DG_inhg;
|
||||
static double the_DG_deg, the_DG_degps, the_DG_inhg, the_DG_err;
|
||||
|
||||
static int _UpdatesPending;
|
||||
static void _CatchUp ();
|
||||
|
|
Loading…
Add table
Reference in a new issue