FlightGear next
|
Top level route manager class. More...
#include <route_mgr.hxx>
Inherits SGSubsystem, and flightgear::FlightPlan::Delegate.
Public Member Functions | |
FGRouteMgr () | |
~FGRouteMgr () | |
void | bind () override |
void | init () override |
void | postinit () override |
void | unbind () override |
void | update (double dt) override |
bool | isRouteActive () const |
int | currentIndex () const |
void | setFlightPlan (const flightgear::FlightPlanRef &plan) |
flightgear::FlightPlanRef | flightPlan () const |
void | clearRoute () |
flightgear::Waypt * | currentWaypt () const |
int | numLegs () const |
int | numWaypts () const |
flightgear::Waypt * | wayptAtIndex (int index) const |
SGPropertyNode_ptr | wayptNodeAtIndex (int index) const |
void | removeLegAtIndex (int aIndex) |
bool | activate () |
Activate a built route. | |
void | deactivate () |
deactivate the route if active | |
void | jumpToIndex (int index) |
Set the current waypoint to the specified index. | |
bool | saveRoute (const SGPath &p) |
bool | loadRoute (const SGPath &p) |
flightgear::WayptRef | waypointFromString (const std::string &target, int insertPosition) |
Buiild a waypoint from a string description. | |
![]() | |
virtual | ~Delegate () |
virtual void | cruiseChanged () |
virtual void | cleared () |
virtual void | activated () |
virtual void | sequence () |
Invoked when the C++ code determines the active leg is done / next leg should be sequenced. | |
virtual void | endOfFlightPlan () |
virtual void | loaded () |
Static Public Member Functions | |
static const char * | staticSubsystemClassId () |
Additional Inherited Members | |
![]() | |
Delegate () | |
Top level route manager class.
Definition at line 25 of file route_mgr.hxx.
FGRouteMgr::FGRouteMgr | ( | ) |
Definition at line 227 of file route_mgr.cxx.
FGRouteMgr::~FGRouteMgr | ( | ) |
Definition at line 249 of file route_mgr.cxx.
bool FGRouteMgr::activate | ( | ) |
Activate a built route.
This checks for various mandatory pieces of data, such as departure and destination airports, and creates waypoints for them on the route structure.
returns true if the route was activated successfully, or false if the route could not be activated for some reason
Definition at line 818 of file route_mgr.cxx.
|
override |
Definition at line 422 of file route_mgr.cxx.
void FGRouteMgr::clearRoute | ( | ) |
Definition at line 591 of file route_mgr.cxx.
int FGRouteMgr::currentIndex | ( | ) | const |
Definition at line 608 of file route_mgr.cxx.
Waypt * FGRouteMgr::currentWaypt | ( | ) | const |
Definition at line 599 of file route_mgr.cxx.
void FGRouteMgr::deactivate | ( | ) |
deactivate the route if active
Definition at line 836 of file route_mgr.cxx.
FlightPlanRef FGRouteMgr::flightPlan | ( | ) | const |
Definition at line 451 of file route_mgr.cxx.
|
override |
Definition at line 271 of file route_mgr.cxx.
bool FGRouteMgr::isRouteActive | ( | ) | const |
Definition at line 425 of file route_mgr.cxx.
void FGRouteMgr::jumpToIndex | ( | int | index | ) |
Set the current waypoint to the specified index.
Definition at line 846 of file route_mgr.cxx.
bool FGRouteMgr::loadRoute | ( | const SGPath & | p | ) |
Definition at line 439 of file route_mgr.cxx.
int FGRouteMgr::numLegs | ( | ) | const |
Definition at line 626 of file route_mgr.cxx.
|
inline |
Definition at line 56 of file route_mgr.hxx.
|
override |
Definition at line 386 of file route_mgr.cxx.
void FGRouteMgr::removeLegAtIndex | ( | int | aIndex | ) |
Definition at line 660 of file route_mgr.cxx.
bool FGRouteMgr::saveRoute | ( | const SGPath & | p | ) |
Definition at line 430 of file route_mgr.cxx.
void FGRouteMgr::setFlightPlan | ( | const flightgear::FlightPlanRef & | plan | ) |
Definition at line 456 of file route_mgr.cxx.
|
inlinestatic |
Definition at line 40 of file route_mgr.hxx.
|
override |
Definition at line 423 of file route_mgr.cxx.
|
override |
Definition at line 503 of file route_mgr.cxx.
WayptRef FGRouteMgr::waypointFromString | ( | const std::string & | target, |
int | insertPosition ) |
Buiild a waypoint from a string description.
Passed to the FlightPlan code to do the actual parsing, see that method for details of syntax.
Insert position is used to indicate which existing route waypoint(s) to use, to select between ambiguous names.
Definition at line 1218 of file route_mgr.cxx.
Waypt * FGRouteMgr::wayptAtIndex | ( | int | index | ) | const |
Definition at line 617 of file route_mgr.cxx.
SGPropertyNode_ptr FGRouteMgr::wayptNodeAtIndex | ( | int | index | ) | const |
Definition at line 1330 of file route_mgr.cxx.