FlightGear next
flightgear::Hold Class Reference

#include <waypoint.hxx>

Inherits flightgear::BasicWaypt.

Public Member Functions

 Hold (const SGGeod &aPos, const std::string &aIdent, RouteBase *aOwner)
 
 Hold (RouteBase *aOwner)
 
void setHoldRadial (double aInboundRadial)
 
void setHoldDistance (double aDistanceNm)
 
void setHoldTime (double aTimeSec)
 
void setRightHanded ()
 
void setLeftHanded ()
 
double inboundRadial () const
 
bool isLeftHanded () const
 
bool isDistance () const
 
double timeOrDistance () const
 
virtual double headingRadialDeg () const
 return the assoicated heading or radial for this waypoint.
 
- Public Member Functions inherited from flightgear::BasicWaypt
 BasicWaypt (const SGGeod &aPos, const std::string &aIdent, RouteBase *aOwner)
 
 BasicWaypt (RouteBase *aOwner)
 
virtual SGGeod position () const
 
virtual std::string ident () const
 Identifier assoicated with the waypoint.
 
std::string icaoDescription () const override
 icaoDescription - description of the waypoint in ICAO route plan format
 
- Public Member Functions inherited from flightgear::Waypt
virtual ~Waypt ()
 
RouteBaseowner () const
 
virtual FGPositionedsource () const
 The Positioned associated with this element, if one exists.
 
double altitudeFt () const
 
double speed (RouteUnits aUnits=DEFAULT_UNITS) const
 
double altitude (RouteUnits aUnits=DEFAULT_UNITS) const
 
double constraintAltitude (RouteUnits aUnits=DEFAULT_UNITS) const
 
double speedKts () const
 
double speedMach () const
 
virtual RouteRestriction altitudeRestriction () const
 
virtual RouteRestriction speedRestriction () const
 
void setAltitude (double aAlt, RouteRestriction aRestrict, RouteUnits aUnits=DEFAULT_UNITS)
 
void setSpeed (double aSpeed, RouteRestriction aRestrict, RouteUnits aUnits=DEFAULT_UNITS)
 
void setConstraintAltitude (double aAlt)
 
virtual bool flag (WayptFlag aFlag) const
 Test if the specified flag is set for this element.
 
virtual unsigned int flags () const
 
void setFlag (WayptFlag aFlag, bool aV=true)
 
void saveAsNode (SGPropertyNode *node) const
 
bool matches (Waypt *aOther) const
 Test if this element and another are 'the same', i.e matching ident and lat/lon are approximately equal.
 
bool matches (FGPositioned *aPos) const
 Test if this element and positioned are the same, i.e matching ident and lat/lon are approximately equal.
 
bool matches (const SGGeod &aPos) const
 Test if this element and a position 'the same' this can be defined by either position, ident or both.
 
virtual double magvarDeg () const
 Magentic variation at/in the vicinity of the waypoint.
 

Protected Member Functions

bool initFromProperties (SGPropertyNode_ptr aProp) override
 Persistence helper - read node properties from a file.
 
void writeToProperties (SGPropertyNode_ptr aProp) const override
 Persistence helper - save this element to a node.
 
virtual std::string type () const
 
- Protected Member Functions inherited from flightgear::Waypt
 Waypt (RouteBase *aOwner)
 

Additional Inherited Members

- Static Public Member Functions inherited from flightgear::Waypt
static WayptRef createFromProperties (RouteBase *aOwner, SGPropertyNode_ptr aProp)
 Factory method.
 
static WayptRef createFromString (RouteBase *aOwner, const std::string &s, const SGGeod &vicinity)
 Create a waypoint from the route manager's standard string format:
 
static WayptRef fromLatLonString (RouteBase *aOwner, const std::string &target)
 
- Protected Types inherited from flightgear::Waypt
typedef WayptFactoryFunction(RouteBase *aOwner)
 
- Static Protected Member Functions inherited from flightgear::Waypt
static void registerFactory (const std::string aNodeType, FactoryFunction *aFactory)
 
- Protected Attributes inherited from flightgear::BasicWaypt
SGGeod _pos
 
std::string _ident
 
- Protected Attributes inherited from flightgear::Waypt
double _altitude = 0.0
 
std::optional< double > _constraintAltitude
 some restriction types specify two altitudes, in which case this is the second value, corresponding to AltitudeCons in the level-D XML procedures format.
 
RouteUnits _altitudeUnits = ALTITUDE_FEET
 
double _speed = 0.0
 
RouteUnits _speedUnits = SPEED_KNOTS
 
RouteRestriction _altRestrict = RESTRICT_NONE
 
RouteRestriction _speedRestrict = RESTRICT_NONE
 

Detailed Description

Definition at line 144 of file waypoint.hxx.

Constructor & Destructor Documentation

◆ Hold() [1/2]

flightgear::Hold::Hold ( const SGGeod & aPos,
const std::string & aIdent,
RouteBase * aOwner )

◆ Hold() [2/2]

flightgear::Hold::Hold ( RouteBase * aOwner)

Definition at line 276 of file waypoint.cxx.

Member Function Documentation

◆ headingRadialDeg()

virtual double flightgear::Hold::headingRadialDeg ( ) const
inlinevirtual

return the assoicated heading or radial for this waypoint.

The exact meaning varies by type - for a hold it's the inbound radial, for a DME intercept it's the heading to hold, and so on.

Reimplemented from flightgear::Waypt.

Definition at line 170 of file waypoint.hxx.

◆ inboundRadial()

double flightgear::Hold::inboundRadial ( ) const
inline

Definition at line 158 of file waypoint.hxx.

◆ initFromProperties()

bool flightgear::Hold::initFromProperties ( SGPropertyNode_ptr aProp)
overrideprotectedvirtual

Persistence helper - read node properties from a file.

Reimplemented from flightgear::BasicWaypt.

Definition at line 310 of file waypoint.cxx.

◆ isDistance()

bool flightgear::Hold::isDistance ( ) const
inline

Definition at line 164 of file waypoint.hxx.

◆ isLeftHanded()

bool flightgear::Hold::isLeftHanded ( ) const
inline

Definition at line 161 of file waypoint.hxx.

◆ setHoldDistance()

void flightgear::Hold::setHoldDistance ( double aDistanceNm)

Definition at line 288 of file waypoint.cxx.

◆ setHoldRadial()

void flightgear::Hold::setHoldRadial ( double aInboundRadial)

Definition at line 283 of file waypoint.cxx.

◆ setHoldTime()

void flightgear::Hold::setHoldTime ( double aTimeSec)

Definition at line 294 of file waypoint.cxx.

◆ setLeftHanded()

void flightgear::Hold::setLeftHanded ( )

Definition at line 305 of file waypoint.cxx.

◆ setRightHanded()

void flightgear::Hold::setRightHanded ( )

Definition at line 300 of file waypoint.cxx.

◆ timeOrDistance()

double flightgear::Hold::timeOrDistance ( ) const
inline

Definition at line 167 of file waypoint.hxx.

◆ type()

virtual std::string flightgear::Hold::type ( ) const
inlineprotectedvirtual

Reimplemented from flightgear::BasicWaypt.

Definition at line 176 of file waypoint.hxx.

◆ writeToProperties()

void flightgear::Hold::writeToProperties ( SGPropertyNode_ptr aProp) const
overrideprotectedvirtual

Persistence helper - save this element to a node.

Reimplemented from flightgear::BasicWaypt.

Definition at line 323 of file waypoint.cxx.


The documentation for this class was generated from the following files: