19#include <simgear/structure/SGReferenced.hxx>
20#include <simgear/structure/SGSharedPtr.hxx>
21#include <simgear/props/props.hxx>
110 {
return const_cast<RouteBase*
>(_owner); }
149 virtual std::string
ident()
const;
196 bool matches(
const SGGeod& aPos)
const;
198 virtual std::string
type()
const = 0;
257 unsigned short _flags = 0;
258 mutable double _magVarDeg = 0.0;
261typedef std::vector<WayptRef>
WayptVec;
271 virtual std::string
ident()
const = 0;
278 const WayptVec& aRoute, std::ostream& aStream);
static void dumpRouteToKML(const WayptVec &aRoute, const std::string &aName)
static void loadAirportProcedures(const SGPath &aPath, FGAirport *aApt)
static void dumpRouteToKMLLineString(const std::string &aIdent, const WayptVec &aRoute, std::ostream &aStream)
virtual std::string ident() const =0
Abstract base class for waypoints (and things that are treated similarly by navigation systems).
virtual unsigned int flags() const
virtual std::string icaoDescription() const
icaoDescription - description of the waypoint in ICAO route plan format
RouteUnits _altitudeUnits
double speed(RouteUnits aUnits=DEFAULT_UNITS) const
friend class NavdataVisitor
RouteBase * owner() const
double altitudeFt() const
RouteRestriction _altRestrict
std::optional< double > _constraintAltitude
some restriction types specify two altitudes, in which case this is the second value,...
virtual FGPositioned * source() const
The Positioned associated with this element, if one exists.
virtual RouteRestriction altitudeRestriction() const
virtual std::string type() const =0
static WayptRef createFromString(RouteBase *aOwner, const std::string &s, const SGGeod &vicinity)
Create a waypoint from the route manager's standard string format:
void setAltitude(double aAlt, RouteRestriction aRestrict, RouteUnits aUnits=DEFAULT_UNITS)
void setConstraintAltitude(double aAlt)
RouteRestriction _speedRestrict
void setFlag(WayptFlag aFlag, bool aV=true)
bool matches(Waypt *aOther) const
Test if this element and another are 'the same', i.e matching ident and lat/lon are approximately equ...
static WayptRef createFromProperties(RouteBase *aOwner, SGPropertyNode_ptr aProp)
Factory method.
virtual bool initFromProperties(SGPropertyNode_ptr aProp)
Persistence helper - read node properties from a file.
virtual bool flag(WayptFlag aFlag) const
Test if the specified flag is set for this element.
virtual double headingRadialDeg() const
return the assoicated heading or radial for this waypoint.
static void registerFactory(const std::string aNodeType, FactoryFunction *aFactory)
virtual void writeToProperties(SGPropertyNode_ptr aProp) const
Persistence helper - save this element to a node.
void saveAsNode(SGPropertyNode *node) const
virtual std::string ident() const
Identifier assoicated with the waypoint.
virtual SGGeod position() const =0
static WayptRef fromLatLonString(RouteBase *aOwner, const std::string &target)
virtual double magvarDeg() const
Magentic variation at/in the vicinity of the waypoint.
Waypt * FactoryFunction(RouteBase *aOwner)
virtual RouteRestriction speedRestriction() const
void setSpeed(double aSpeed, RouteRestriction aRestrict, RouteUnits aUnits=DEFAULT_UNITS)
double constraintAltitude(RouteUnits aUnits=DEFAULT_UNITS) const
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...
double convertAltitudeUnits(RouteUnits aSrc, RouteUnits aDest, double aValue)
RouteRestriction restrictionFromString(const std::string &aStr)
SGSharedPtr< Waypt > WayptRef
SGSharedPtr< Airway > AirwayRef
double convertSpeedUnits(RouteUnits aSrc, RouteUnits aDest, double aAltitudeFt, double aValue)
bool isMachRestrict(RouteRestriction rr)
@ WPT_DYNAMIC
waypoint position is dynamic, i.e moves based on other criteria, such as altitude,...
@ WPT_PSEUDO
waypoint generated by VNAV / speed management profile, for step climbs or top of descent
@ WPT_MAP
missed approach point
@ WPT_MISS
segment is part of missed approach
@ WPT_HIDDEN
waypoint should not be shown in UI displays, etc this is used to implement FMSs which delete waypoint...
@ WPT_TRANSITION
transition to/from enroute structure
@ WPT_FAF
final approach fix
@ WPT_IAF
initial approach fix
@ WPT_GENERATED
waypoint was created automatically (not manually entered/loaded) for example waypoints from airway ro...
@ WPT_OVERFLIGHT
must overfly the point directly
@ WPT_VIA
waypoint prodcued by expanding a VIA segment
std::vector< WayptRef > WayptVec
@ RESTRICT_DELETE
ignore underlying restriction (on a leg)
@ RESTRICT_COMPUTED
data is computed, not a real restriction
@ SPEED_COMPUTED_MACH
variant on above to encode a Mach value
@ SPEED_RESTRICT_MACH
encode an 'AT' restriction in Mach, not IAS