X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNavaids%2Fwaypoint.cxx;h=5d2d761016148bde57b02a15e0be19c59f8dd347;hb=3e46c7998ce2bf23ec322d1dfe65c8da35621d51;hp=7327107b0e1074b264db9c37fa8909865630c7f4;hpb=3d46809ea8030af12d3148a8f4007a9f8332af3e;p=flightgear.git diff --git a/src/Navaids/waypoint.cxx b/src/Navaids/waypoint.cxx index 7327107b0..5d2d76101 100644 --- a/src/Navaids/waypoint.cxx +++ b/src/Navaids/waypoint.cxx @@ -24,9 +24,8 @@ #include "waypoint.hxx" #include -#include -#include +#include #include using std::string; @@ -34,24 +33,14 @@ using std::string; namespace flightgear { -BasicWaypt::BasicWaypt(const SGGeod& aPos, const string& aIdent, Route* aOwner) : +BasicWaypt::BasicWaypt(const SGGeod& aPos, const string& aIdent, RouteBase* aOwner) : Waypt(aOwner), _pos(aPos), _ident(aIdent) -{ - if (aPos.getElevationFt() > -999.0) { - setAltitude(aPos.getElevationFt(), RESTRICT_AT); - } -} - -BasicWaypt::BasicWaypt(const SGWayPoint& aWP, Route* aOwner) : - Waypt(aOwner), - _pos(aWP.get_target()), - _ident(aWP.get_id()) { } -BasicWaypt::BasicWaypt(Route* aOwner) : +BasicWaypt::BasicWaypt(RouteBase* aOwner) : Waypt(aOwner) { } @@ -81,16 +70,16 @@ void BasicWaypt::writeToProperties(SGPropertyNode_ptr aProp) const ////////////////////////////////////////////////////////////////////////////// -NavaidWaypoint::NavaidWaypoint(FGPositioned* aPos, Route* aOwner) : +NavaidWaypoint::NavaidWaypoint(FGPositioned* aPos, RouteBase* aOwner) : Waypt(aOwner), _navaid(aPos) { if (aPos->type() == FGPositioned::RUNWAY) { - SG_LOG(SG_GENERAL, SG_WARN, "sure you don't want to be building a runway waypt here?"); + SG_LOG(SG_NAVAID, SG_WARN, "sure you don't want to be building a runway waypt here?"); } } -NavaidWaypoint::NavaidWaypoint(Route* aOwner) : +NavaidWaypoint::NavaidWaypoint(RouteBase* aOwner) : Waypt(aOwner) { } @@ -142,7 +131,7 @@ void NavaidWaypoint::writeToProperties(SGPropertyNode_ptr aProp) const aProp->setDoubleValue("lat", _navaid->geod().getLatitudeDeg()); } -OffsetNavaidWaypoint::OffsetNavaidWaypoint(FGPositioned* aPos, Route* aOwner, +OffsetNavaidWaypoint::OffsetNavaidWaypoint(FGPositioned* aPos, RouteBase* aOwner, double aRadial, double aDistNm) : NavaidWaypoint(aPos, aOwner), _radial(aRadial), @@ -151,7 +140,7 @@ OffsetNavaidWaypoint::OffsetNavaidWaypoint(FGPositioned* aPos, Route* aOwner, init(); } -OffsetNavaidWaypoint::OffsetNavaidWaypoint(Route* aOwner) : +OffsetNavaidWaypoint::OffsetNavaidWaypoint(RouteBase* aOwner) : NavaidWaypoint(aOwner) { } @@ -186,13 +175,13 @@ void OffsetNavaidWaypoint::writeToProperties(SGPropertyNode_ptr aProp) const ///////////////////////////////////////////////////////////////////////////// -RunwayWaypt::RunwayWaypt(FGRunway* aPos, Route* aOwner) : +RunwayWaypt::RunwayWaypt(FGRunway* aPos, RouteBase* aOwner) : Waypt(aOwner), _runway(aPos) { } -RunwayWaypt::RunwayWaypt(Route* aOwner) : +RunwayWaypt::RunwayWaypt(RouteBase* aOwner) : Waypt(aOwner) { } @@ -239,7 +228,7 @@ void RunwayWaypt::writeToProperties(SGPropertyNode_ptr aProp) const ///////////////////////////////////////////////////////////////////////////// -Hold::Hold(const SGGeod& aPos, const string& aIdent, Route* aOwner) : +Hold::Hold(const SGGeod& aPos, const string& aIdent, RouteBase* aOwner) : BasicWaypt(aPos, aIdent, aOwner), _righthanded(true), _isDistance(false) @@ -247,7 +236,7 @@ Hold::Hold(const SGGeod& aPos, const string& aIdent, Route* aOwner) : setFlag(WPT_DYNAMIC); } -Hold::Hold(Route* aOwner) : +Hold::Hold(RouteBase* aOwner) : BasicWaypt(aOwner), _righthanded(true), _isDistance(false) @@ -308,7 +297,7 @@ void Hold::writeToProperties(SGPropertyNode_ptr aProp) const ///////////////////////////////////////////////////////////////////////////// -HeadingToAltitude::HeadingToAltitude(Route* aOwner, const string& aIdent, +HeadingToAltitude::HeadingToAltitude(RouteBase* aOwner, const string& aIdent, double aMagHdg) : Waypt(aOwner), _ident(aIdent), @@ -317,7 +306,7 @@ HeadingToAltitude::HeadingToAltitude(Route* aOwner, const string& aIdent, setFlag(WPT_DYNAMIC); } -HeadingToAltitude::HeadingToAltitude(Route* aOwner) : +HeadingToAltitude::HeadingToAltitude(RouteBase* aOwner) : Waypt(aOwner) { } @@ -343,7 +332,7 @@ void HeadingToAltitude::writeToProperties(SGPropertyNode_ptr aProp) const ///////////////////////////////////////////////////////////////////////////// -DMEIntercept::DMEIntercept(Route* aOwner, const string& aIdent, const SGGeod& aPos, +DMEIntercept::DMEIntercept(RouteBase* aOwner, const string& aIdent, const SGGeod& aPos, double aCourseDeg, double aDistanceNm) : Waypt(aOwner), _ident(aIdent), @@ -354,7 +343,7 @@ DMEIntercept::DMEIntercept(Route* aOwner, const string& aIdent, const SGGeod& aP setFlag(WPT_DYNAMIC); } -DMEIntercept::DMEIntercept(Route* aOwner) : +DMEIntercept::DMEIntercept(RouteBase* aOwner) : Waypt(aOwner) { } @@ -388,7 +377,7 @@ void DMEIntercept::writeToProperties(SGPropertyNode_ptr aProp) const ///////////////////////////////////////////////////////////////////////////// -RadialIntercept::RadialIntercept(Route* aOwner, const string& aIdent, const SGGeod& aPos, +RadialIntercept::RadialIntercept(RouteBase* aOwner, const string& aIdent, const SGGeod& aPos, double aCourseDeg, double aRadial) : Waypt(aOwner), _ident(aIdent), @@ -399,7 +388,7 @@ RadialIntercept::RadialIntercept(Route* aOwner, const string& aIdent, const SGGe setFlag(WPT_DYNAMIC); } -RadialIntercept::RadialIntercept(Route* aOwner) : +RadialIntercept::RadialIntercept(RouteBase* aOwner) : Waypt(aOwner) { } @@ -433,7 +422,7 @@ void RadialIntercept::writeToProperties(SGPropertyNode_ptr aProp) const ///////////////////////////////////////////////////////////////////////////// -ATCVectors::ATCVectors(Route* aOwner, FGAirport* aFacility) : +ATCVectors::ATCVectors(RouteBase* aOwner, FGAirport* aFacility) : Waypt(aOwner), _facility(aFacility) { @@ -444,7 +433,7 @@ ATCVectors::~ATCVectors() { } -ATCVectors::ATCVectors(Route* aOwner) : +ATCVectors::ATCVectors(RouteBase* aOwner) : Waypt(aOwner) { }