1
0
Fork 0

Clean up naming of the 'point on runway' helpers, to get rid of the confusing

notion of a 'displacedThreshold'. Now there's just a real threshold,
displaced or otherwise, and people who care about the paved area can use
'begin' and 'end'. Thanks to John Denker for pointing out the confusion this
leads to. Using 'end' also gets rid of the 'reverseThreshold' name, which was
clearly a bad choice of mine.
This commit is contained in:
jmt 2009-01-03 16:15:48 +00:00 committed by Tim Moore
parent d756f913ec
commit e39373cb6a
3 changed files with 10 additions and 10 deletions

View file

@ -363,7 +363,7 @@ void FGAIFlightPlan::createTakeOff(bool firstFlight, FGAirport *apt, double spee
wpt->on_ground = false;
waypoints.push_back(wpt);
wpt = cloneWithPos(wpt, "3000 ft", rwy->reverseThreshold());
wpt = cloneWithPos(wpt, "3000 ft", rwy->end());
wpt->altitude = airportElev+3000;
waypoints.push_back(wpt);
@ -441,7 +441,7 @@ void FGAIFlightPlan::createLanding(FGAirport *apt)
waypoint *wpt;
double aptElev = apt->getElevation();
//Runway Threshold
wpt = createOnGround("Threshold", rwy->displacedThreshold(), aptElev, 150);
wpt = createOnGround("Threshold", rwy->threshold(), aptElev, 150);
wpt->crossat = apt->getElevation();
waypoints.push_back(wpt);

View file

@ -120,17 +120,17 @@ double FGRunway::score(double aLengthWt, double aWidthWt, double aSurfaceWt) con
return _length * aLengthWt + _width * aWidthWt + surface * aSurfaceWt + 1e-20;
}
SGGeod FGRunway::threshold() const
SGGeod FGRunway::begin() const
{
return pointOnCenterline(0.0);
}
SGGeod FGRunway::reverseThreshold() const
SGGeod FGRunway::end() const
{
return pointOnCenterline(lengthM());
}
SGGeod FGRunway::displacedThreshold() const
SGGeod FGRunway::threshold() const
{
return pointOnCenterline(_displ_thresh * SG_FEET_TO_METER);
}

View file

@ -68,21 +68,21 @@ public:
{ return _reciprocal; }
/**
* Get the runway threshold point - this is syntatic sugar, equivalent to
* Get the runway begining point - this is syntatic sugar, equivalent to
* calling pointOnCenterline(0.0);
*/
SGGeod threshold() const;
SGGeod begin() const;
/**
* Get the (possibly displaced) threshold point.
*/
SGGeod displacedThreshold() const;
SGGeod threshold() const;
/**
* Get the opposite threshold - this is equivalent to calling
* Get the 'far' end - this is equivalent to calling
* pointOnCenterline(lengthFt());
*/
SGGeod reverseThreshold() const;
SGGeod end() const;
double displacedThresholdM() const
{ return _displ_thresh * SG_FEET_TO_METER; }