From e39373cb6aa074683bfb1e63fb92c4a3c52b6c69 Mon Sep 17 00:00:00 2001 From: jmt Date: Sat, 3 Jan 2009 16:15:48 +0000 Subject: [PATCH] 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. --- src/AIModel/AIFlightPlanCreate.cxx | 4 ++-- src/Airports/runways.cxx | 6 +++--- src/Airports/runways.hxx | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/AIModel/AIFlightPlanCreate.cxx b/src/AIModel/AIFlightPlanCreate.cxx index f48110b72..35d2c75d1 100644 --- a/src/AIModel/AIFlightPlanCreate.cxx +++ b/src/AIModel/AIFlightPlanCreate.cxx @@ -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); diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index 5adfba4f8..fc70d8384 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -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); } diff --git a/src/Airports/runways.hxx b/src/Airports/runways.hxx index ae2610c8b..b61b6a079 100644 --- a/src/Airports/runways.hxx +++ b/src/Airports/runways.hxx @@ -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; }