FlightGear next
flightgear::LegWayptCtl Class Reference

Controller for leg course interception. More...

Inherits flightgear::WayptController.

Public Member Functions

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

Controller for leg course interception.

In leg mode, we want to intercept the leg between 2 waypoints(A->B). If we can't reach the the selected waypoint leg,we going direct to B.

Definition at line 246 of file rnav_waypt_controller.cxx.

Constructor & Destructor Documentation

◆ LegWayptCtl()

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

Definition at line 249 of file rnav_waypt_controller.cxx.

Member Function Documentation

◆ computeTurnAnticipation()

void flightgear::LegWayptCtl::computeTurnAnticipation ( )
inline

Definition at line 309 of file rnav_waypt_controller.cxx.

◆ courseDeviationDeg()

virtual double flightgear::LegWayptCtl::courseDeviationDeg ( ) const
inlinevirtual

Reimplemented from flightgear::WayptController.

Definition at line 540 of file rnav_waypt_controller.cxx.

◆ distanceToWayptM()

virtual double flightgear::LegWayptCtl::distanceToWayptM ( ) const
inlinevirtual

Compute distance until the waypoint is done.

Implements flightgear::WayptController.

Definition at line 525 of file rnav_waypt_controller.cxx.

◆ init()

bool flightgear::LegWayptCtl::init ( )
inlineoverridevirtual

Reimplemented from flightgear::WayptController.

Definition at line 264 of file rnav_waypt_controller.cxx.

◆ legData()

std::optional< RNAV::LegData > flightgear::LegWayptCtl::legData ( ) const
inlineoverridevirtual

Reimplemented from flightgear::WayptController.

Definition at line 509 of file rnav_waypt_controller.cxx.

◆ position()

virtual SGGeod flightgear::LegWayptCtl::position ( ) const
inlinevirtual

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 550 of file rnav_waypt_controller.cxx.

◆ toFlag()

virtual bool flightgear::LegWayptCtl::toFlag ( ) const
inlinevirtual

to/from flag - true = to, false = from.

Defaults to 'true' because nearly all waypoint controllers become done as soon as this value would become false.

Reimplemented from flightgear::WayptController.

Definition at line 535 of file rnav_waypt_controller.cxx.

◆ trueBearingDeg()

virtual double flightgear::LegWayptCtl::trueBearingDeg ( ) const
inlinevirtual

Bearing to the waypoint, if this value is meaningful.

Default implementation returns the target track

Reimplemented from flightgear::WayptController.

Definition at line 545 of file rnav_waypt_controller.cxx.

◆ update()

void flightgear::LegWayptCtl::update ( double )
inlineoverridevirtual

Implements flightgear::WayptController.

Definition at line 401 of file rnav_waypt_controller.cxx.

◆ updateInEntryTurn()

void flightgear::LegWayptCtl::updateInEntryTurn ( )
inline

Definition at line 381 of file rnav_waypt_controller.cxx.

◆ updateInTurn()

bool flightgear::LegWayptCtl::updateInTurn ( )
inline

Definition at line 339 of file rnav_waypt_controller.cxx.

◆ xtrackErrorNm()

virtual double flightgear::LegWayptCtl::xtrackErrorNm ( ) const
inlinevirtual

Reimplemented from flightgear::WayptController.

Definition at line 530 of file rnav_waypt_controller.cxx.


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