FlightGear next
flightgear::OBSController Class Reference

#include <rnav_waypt_controller.hxx>

Inherits flightgear::WayptController.

Public Member Functions

 OBSController (RNAV *aRNAV, const WayptRef &aWpt)
 
bool init () override
 
virtual void update (double dt)
 
virtual double distanceToWayptM () const
 Compute distance until the waypoint is done.
 
virtual double xtrackErrorNm () const
 
virtual double courseDeviationDeg () const
 
virtual double trueBearingDeg () const
 Bearing to the waypoint, if this value is meaningful.
 
virtual bool toFlag () const
 to/from flag - true = to, false = from.
 
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.
 
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 263 of file rnav_waypt_controller.hxx.

Constructor & Destructor Documentation

◆ OBSController()

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

Definition at line 1412 of file rnav_waypt_controller.cxx.

Member Function Documentation

◆ courseDeviationDeg()

double flightgear::OBSController::courseDeviationDeg ( ) const
virtual

Reimplemented from flightgear::WayptController.

Definition at line 1458 of file rnav_waypt_controller.cxx.

◆ distanceToWayptM()

double flightgear::OBSController::distanceToWayptM ( ) const
virtual

Compute distance until the waypoint is done.

Implements flightgear::WayptController.

Definition at line 1448 of file rnav_waypt_controller.cxx.

◆ init()

bool flightgear::OBSController::init ( )
overridevirtual

Reimplemented from flightgear::WayptController.

Definition at line 1420 of file rnav_waypt_controller.cxx.

◆ position()

SGGeod flightgear::OBSController::position ( ) const
virtual

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

◆ toFlag()

bool flightgear::OBSController::toFlag ( ) const
virtual

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

◆ trueBearingDeg()

double flightgear::OBSController::trueBearingDeg ( ) const
virtual

Bearing to the waypoint, if this value is meaningful.

Default implementation returns the target track

Reimplemented from flightgear::WayptController.

Definition at line 1469 of file rnav_waypt_controller.cxx.

◆ update()

void flightgear::OBSController::update ( double dt)
virtual

Implements flightgear::WayptController.

Definition at line 1431 of file rnav_waypt_controller.cxx.

◆ xtrackErrorNm()

double flightgear::OBSController::xtrackErrorNm ( ) const
virtual

Reimplemented from flightgear::WayptController.

Definition at line 1453 of file rnav_waypt_controller.cxx.


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