FlightGear next
flightgear::HoldCtl Class Reference

#include <rnav_waypt_controller.hxx>

Inherits flightgear::WayptController.

Public Member Functions

 HoldCtl (RNAV *aRNAV, const WayptRef &aWpt)
 
void setHoldCount (int count)
 
void exitHold ()
 
bool init () override
 
void update (double) override
 
double distanceToWayptM () const override
 Compute distance until the waypoint is done.
 
SGGeod position () const override
 Position associated with the waypt.
 
double xtrackErrorNm () const override
 
double courseDeviationDeg () const override
 
std::string status () const override
 Allow waypoints to indicate a status value as a string.
 
- Public Member Functions inherited from flightgear::WayptController
virtual ~WayptController ()
 
virtual double timeToWaypt () const
 Compute time until the waypoint is done.
 
virtual double trueBearingDeg () const
 Bearing to the waypoint, if this value is meaningful.
 
virtual double targetTrackDeg () const
 
bool isDone () const
 Is this controller finished?
 
virtual bool toFlag () const
 to/from flag - true = to, false = from.
 
virtual std::optional< RNAV::LegDatalegData () const
 
WayptRef waypoint () const
 

Additional Inherited Members

- Static Public Member Functions inherited from flightgear::WayptController
static WayptControllercreateForWaypt (RNAV *rnav, const WayptRef &aWpt)
 Static factory method, given a waypoint, return a controller bound to it, of the appropriate type.
 
- Protected Member Functions inherited from flightgear::WayptController
 WayptController (RNAV *aRNAV, const WayptRef &aWpt)
 
void setDone ()
 
void setSubController (WayptController *sub)
 
- Protected Attributes inherited from flightgear::WayptController
WayptRef _waypt
 
double _targetTrack
 
RNAV_rnav
 
std::unique_ptr< WayptController_subController
 

Detailed Description

Definition at line 282 of file rnav_waypt_controller.hxx.

Constructor & Destructor Documentation

◆ HoldCtl()

flightgear::HoldCtl::HoldCtl ( RNAV * aRNAV,
const WayptRef & aWpt )

Definition at line 958 of file rnav_waypt_controller.cxx.

Member Function Documentation

◆ courseDeviationDeg()

double flightgear::HoldCtl::courseDeviationDeg ( ) const
overridevirtual

Reimplemented from flightgear::WayptController.

Definition at line 1266 of file rnav_waypt_controller.cxx.

◆ distanceToWayptM()

double flightgear::HoldCtl::distanceToWayptM ( ) const
overridevirtual

Compute distance until the waypoint is done.

Implements flightgear::WayptController.

Definition at line 1223 of file rnav_waypt_controller.cxx.

◆ exitHold()

void flightgear::HoldCtl::exitHold ( )

Definition at line 1077 of file rnav_waypt_controller.cxx.

◆ init()

bool flightgear::HoldCtl::init ( )
overridevirtual

Reimplemented from flightgear::WayptController.

Definition at line 975 of file rnav_waypt_controller.cxx.

◆ position()

SGGeod flightgear::HoldCtl::position ( ) const
overridevirtual

Position associated with the waypt.

For static waypoints, this is simply the waypoint position itself; for dynamic points, it's the estimated location at which the controller will be done.

Implements flightgear::WayptController.

Definition at line 1228 of file rnav_waypt_controller.cxx.

◆ setHoldCount()

void flightgear::HoldCtl::setHoldCount ( int count)

Definition at line 1072 of file rnav_waypt_controller.cxx.

◆ status()

std::string flightgear::HoldCtl::status ( ) const
overridevirtual

Allow waypoints to indicate a status value as a string.

Useful for more complex controllers, which may have capture / exit states

Reimplemented from flightgear::WayptController.

Definition at line 1278 of file rnav_waypt_controller.cxx.

◆ update()

void flightgear::HoldCtl::update ( double dt)
overridevirtual

Implements flightgear::WayptController.

Definition at line 1012 of file rnav_waypt_controller.cxx.

◆ xtrackErrorNm()

double flightgear::HoldCtl::xtrackErrorNm ( ) const
overridevirtual

Reimplemented from flightgear::WayptController.

Definition at line 1248 of file rnav_waypt_controller.cxx.


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