1
0
Fork 0

I found a meter/feet conversion problem with DME elevations. These changes

should resolve the problem.
This commit is contained in:
curt 2004-03-14 22:58:58 +00:00
parent f63d336ebc
commit 78155104e8
3 changed files with 5 additions and 5 deletions

View file

@ -50,7 +50,7 @@ static double kludgeRange ( double stationElev, double aircraftElev,
// Assume that the nominal range (usually
// 50nm) applies at a 5,000 ft difference.
// Just a wild guess!
double factor = ((aircraftElev*SG_METER_TO_FEET) - stationElev) / 5000.0;
double factor = (aircraftElev - stationElev)*SG_METER_TO_FEET / 5000.0;
double range = fabs(nominalRange * factor);
// Clamp the range to keep it sane; for
@ -238,7 +238,7 @@ void FGDME::search()
valid = true;
lon = nav->get_lon();
lat = nav->get_lat();
elev = nav->get_elev();
elev = nav->get_elev_ft();
range = nav->get_range();
effective_range = kludgeRange(elev, elev, range);
x = nav->get_x();

View file

@ -51,7 +51,7 @@ static double kludgeRange ( double stationElev, double aircraftElev,
// Assume that the nominal range (usually
// 50nm) applies at a 5,000 ft difference.
// Just a wild guess!
double factor = ((aircraftElev*SG_METER_TO_FEET) - stationElev) / 5000.0;
double factor = (aircraftElev - stationElev)*SG_METER_TO_FEET / 5000.0;
double range = fabs(nominalRange * factor);
// Clamp the range to keep it sane; for
@ -503,7 +503,7 @@ void FGKR_87::search() {
trans_ident = nav->get_trans_ident();
stn_lon = nav->get_lon();
stn_lat = nav->get_lat();
stn_elev = nav->get_elev();
stn_elev = nav->get_elev_ft();
range = nav->get_range();
effective_range = kludgeRange(stn_elev, acft_elev, range);
x = nav->get_x();

View file

@ -686,7 +686,7 @@ void FGNavCom::search()
nav_has_gs = false;
nav_loclon = nav->get_lon();
nav_loclat = nav->get_lat();
nav_elev = nav->get_elev();
nav_elev = nav->get_elev_ft();
nav_twist = nav->get_magvar();
nav_range = nav->get_range();
nav_effective_range = adjustNavRange(nav_elev, elev, nav_range);