Alasdair Campbell: fix the MK_VIII problems
This commit is contained in:
parent
6f021e2bcc
commit
ee8f603969
2 changed files with 7 additions and 7 deletions
|
@ -4489,10 +4489,10 @@ MK_VIII::TCFHandler::get_azimuth_difference (const FGRunway *_runway)
|
||||||
// This selection algorithm is not specified in [SPEC], but
|
// This selection algorithm is not specified in [SPEC], but
|
||||||
// http://www.egpws.com/general_information/description/runway_select.htm
|
// http://www.egpws.com/general_information/description/runway_select.htm
|
||||||
// talks about automatic runway selection.
|
// talks about automatic runway selection.
|
||||||
void
|
FGRunway*
|
||||||
MK_VIII::TCFHandler::select_runway (const FGAirport *airport,
|
MK_VIII::TCFHandler::select_runway (const FGAirport *airport)
|
||||||
FGRunway *_runway)
|
|
||||||
{
|
{
|
||||||
|
FGRunway* _runway = 0;
|
||||||
double min_diff = 360;
|
double min_diff = 360;
|
||||||
|
|
||||||
for (unsigned int r=0; r<airport->numRunways(); ++r) {
|
for (unsigned int r=0; r<airport->numRunways(); ++r) {
|
||||||
|
@ -4504,6 +4504,7 @@ MK_VIII::TCFHandler::select_runway (const FGAirport *airport,
|
||||||
_runway = rwy;
|
_runway = rwy;
|
||||||
}
|
}
|
||||||
} // of airport runways iteration
|
} // of airport runways iteration
|
||||||
|
return _runway;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MK_VIII::TCFHandler::AirportFilter::pass(FGAirport *a)
|
bool MK_VIII::TCFHandler::AirportFilter::pass(FGAirport *a)
|
||||||
|
@ -4532,15 +4533,14 @@ MK_VIII::TCFHandler::update_runway ()
|
||||||
// the airport's reference point.
|
// the airport's reference point.
|
||||||
AirportFilter filter(mk);
|
AirportFilter filter(mk);
|
||||||
const FGAirport *airport = globals->get_airports()->search(
|
const FGAirport *airport = globals->get_airports()->search(
|
||||||
mk_data(gps_latitude).get(), mk_data(gps_longitude).get(),
|
mk_data(gps_longitude).get(), mk_data(gps_latitude).get(),
|
||||||
0.5, filter);
|
0.5, filter);
|
||||||
|
|
||||||
if (!airport) return;
|
if (!airport) return;
|
||||||
|
|
||||||
has_runway = true;
|
has_runway = true;
|
||||||
|
|
||||||
FGRunway* _runway;
|
FGRunway* _runway = select_runway(airport);
|
||||||
select_runway(airport, _runway);
|
|
||||||
|
|
||||||
runway.center.latitude = _runway->latitude();
|
runway.center.latitude = _runway->latitude();
|
||||||
runway.center.longitude = _runway->longitude();
|
runway.center.longitude = _runway->longitude();
|
||||||
|
|
|
@ -1563,7 +1563,7 @@ private:
|
||||||
double to_heading);
|
double to_heading);
|
||||||
double get_azimuth_difference (const FGRunway *_runway);
|
double get_azimuth_difference (const FGRunway *_runway);
|
||||||
|
|
||||||
void select_runway (const FGAirport *airport, FGRunway *_runway);
|
FGRunway* select_runway (const FGAirport *airport);
|
||||||
void update_runway ();
|
void update_runway ();
|
||||||
|
|
||||||
void get_bias_area_edges (Position *edge,
|
void get_bias_area_edges (Position *edge,
|
||||||
|
|
Loading…
Add table
Reference in a new issue