FlightGear next
GPS Class Reference

Model a GPS radio. More...

#include <gps.hxx>

Inherits SGSubsystem, flightgear::RNAV, and flightgear::FlightPlan::Delegate.

Public Member Functions

 GPS (SGPropertyNode *node, bool defaultGPSMode=false)
 
 GPS ()
 
virtual ~GPS ()
 
void init () override
 
void reinit () override
 
void bind () override
 
void unbind () override
 
void update (double delta_time_sec) override
 
void shutdown () override
 
SGGeod position () override
 
double trackDeg () override
 True track in degrees.
 
double groundSpeedKts () override
 Ground speed (along the track) in knots.
 
double vspeedFPM () override
 Vertical speed in ft/minute.
 
double magvarDeg () override
 Magnetic variation at current position.
 
double selectedMagCourse () override
 device selected course (eg, from autopilot / MCP / OBS) in degrees
 
double overflightDistanceM () override
 minimum distance to switch next waypoint.
 
double overflightArmDistanceM () override
 minimum distance to a waypoint for overflight sequencing.
 
double overflightArmAngleDeg () override
 angle for overflight sequencing.
 
bool canFlyBy () const override
 
double maxFlyByTurnAngleDeg () const override
 maximum angle in degrees where flyBy is permitted.
 
std::optional< LegDatapreviousLegData () override
 device leg previous waypoint position(eg, from route manager)
 
std::optional< double > nextLegTrack () override
 
double turnRadiusNm (double groundSpeedKnots) override
 compute the turn radius (based on standard rate turn) for a given ground speed in knots.
 
- Public Member Functions inherited from flightgear::RNAV
double turnRadiusNm ()
 compute turn radius based on current ground-speed
 
- Public Member Functions inherited from flightgear::FlightPlan::Delegate
virtual ~Delegate ()
 
virtual void departureChanged ()
 
virtual void arrivalChanged ()
 
virtual void cruiseChanged ()
 
virtual void activated ()
 
virtual void sequence ()
 Invoked when the C++ code determines the active leg is done / next leg should be sequenced.
 
virtual void loaded ()
 

Static Public Member Functions

static const char * staticSubsystemClassId ()
 

Friends

class SearchFilter
 

Additional Inherited Members

- Protected Member Functions inherited from flightgear::FlightPlan::Delegate
 Delegate ()
 

Detailed Description

Model a GPS radio.

Input properties:

/position/longitude-deg /position/latitude-deg /position/altitude-ft /environment/magnetic-variation-deg /systems/electrical/outputs/gps /instrumentation/gps/serviceable

Output properties:

/instrumentation/gps/indicated-longitude-deg /instrumentation/gps/indicated-latitude-deg /instrumentation/gps/indicated-altitude-ft /instrumentation/gps/indicated-vertical-speed-fpm /instrumentation/gps/indicated-track-true-deg /instrumentation/gps/indicated-track-magnetic-deg /instrumentation/gps/indicated-ground-speed-kt

/instrumentation/gps/wp-distance-nm /instrumentation/gps/wp-bearing-deg /instrumentation/gps/wp-bearing-mag-deg /instrumentation/gps/TTW /instrumentation/gps/course-deviation-deg /instrumentation/gps/course-error-nm /instrumentation/gps/to-flag /instrumentation/gps/odometer /instrumentation/gps/trip-odometer /instrumentation/gps/true-bug-error-deg /instrumentation/gps/magnetic-bug-error-deg

Definition at line 60 of file gps.hxx.

Constructor & Destructor Documentation

◆ GPS() [1/2]

GPS::GPS ( SGPropertyNode * node,
bool defaultGPSMode = false )

Definition at line 104 of file gps.cxx.

◆ GPS() [2/2]

GPS::GPS ( )

◆ ~GPS()

GPS::~GPS ( )
virtual

Definition at line 132 of file gps.cxx.

Member Function Documentation

◆ bind()

void GPS::bind ( )
override

Definition at line 188 of file gps.cxx.

◆ canFlyBy()

bool GPS::canFlyBy ( ) const
overridevirtual

Reimplemented from flightgear::RNAV.

Definition at line 536 of file gps.cxx.

◆ groundSpeedKts()

double GPS::groundSpeedKts ( )
overridevirtual

Ground speed (along the track) in knots.

Implements flightgear::RNAV.

Definition at line 460 of file gps.cxx.

◆ init()

void GPS::init ( )
override

Definition at line 137 of file gps.cxx.

◆ magvarDeg()

double GPS::magvarDeg ( )
overridevirtual

Magnetic variation at current position.

Implements flightgear::RNAV.

Definition at line 470 of file gps.cxx.

◆ maxFlyByTurnAngleDeg()

double GPS::maxFlyByTurnAngleDeg ( ) const
overridevirtual

maximum angle in degrees where flyBy is permitted.

Turns larger than this value will always be executed as fly-over to avoid a very large cut.

Reimplemented from flightgear::RNAV.

Definition at line 495 of file gps.cxx.

◆ nextLegTrack()

std::optional< double > GPS::nextLegTrack ( )
overridevirtual

Reimplemented from flightgear::RNAV.

Definition at line 500 of file gps.cxx.

◆ overflightArmAngleDeg()

double GPS::overflightArmAngleDeg ( )
overridevirtual

angle for overflight sequencing.

Implements flightgear::RNAV.

Definition at line 485 of file gps.cxx.

◆ overflightArmDistanceM()

double GPS::overflightArmDistanceM ( )
overridevirtual

minimum distance to a waypoint for overflight sequencing.

Implements flightgear::RNAV.

Definition at line 480 of file gps.cxx.

◆ overflightDistanceM()

double GPS::overflightDistanceM ( )
overridevirtual

minimum distance to switch next waypoint.

Implements flightgear::RNAV.

Definition at line 475 of file gps.cxx.

◆ position()

SGGeod GPS::position ( )
overridevirtual

Implements flightgear::RNAV.

Definition at line 446 of file gps.cxx.

◆ previousLegData()

std::optional< RNAV::LegData > GPS::previousLegData ( )
overridevirtual

device leg previous waypoint position(eg, from route manager)

Reimplemented from flightgear::RNAV.

Definition at line 509 of file gps.cxx.

◆ reinit()

void GPS::reinit ( )
override

Definition at line 182 of file gps.cxx.

◆ selectedMagCourse()

double GPS::selectedMagCourse ( )
overridevirtual

device selected course (eg, from autopilot / MCP / OBS) in degrees

Implements flightgear::RNAV.

Definition at line 490 of file gps.cxx.

◆ shutdown()

void GPS::shutdown ( )
override

Definition at line 387 of file gps.cxx.

◆ staticSubsystemClassId()

static const char * GPS::staticSubsystemClassId ( )
inlinestatic

Definition at line 78 of file gps.hxx.

◆ trackDeg()

double GPS::trackDeg ( )
overridevirtual

True track in degrees.

Implements flightgear::RNAV.

Definition at line 455 of file gps.cxx.

◆ turnRadiusNm()

double GPS::turnRadiusNm ( double groundSpeedKnots)
overridevirtual

compute the turn radius (based on standard rate turn) for a given ground speed in knots.

Implements flightgear::RNAV.

Definition at line 721 of file gps.cxx.

◆ unbind()

void GPS::unbind ( )
override

Definition at line 280 of file gps.cxx.

◆ update()

void GPS::update ( double delta_time_sec)
override

Definition at line 320 of file gps.cxx.

◆ vspeedFPM()

double GPS::vspeedFPM ( )
overridevirtual

Vertical speed in ft/minute.

Implements flightgear::RNAV.

Definition at line 465 of file gps.cxx.

Friends And Related Symbol Documentation

◆ SearchFilter

friend class SearchFilter
friend

Definition at line 99 of file gps.hxx.


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