class SGRoute;
class SGPath;
+class FGAirport;
+typedef SGSharedPtr<FGAirport> FGAirportRef;
+
/**
* Top level route manager class
*
SGRoute* _route;
time_t _takeoffTime;
time_t _touchdownTime;
-
+ FGAirportRef _departure;
+ FGAirportRef _destination;
+
// automatic inputs
SGPropertyNode_ptr lon;
SGPropertyNode_ptr lat;
SGPropertyNode_ptr active;
SGPropertyNode_ptr airborne;
- SGPropertyNode_ptr currentWp;
SGPropertyNode_ptr wp0;
SGPropertyNode_ptr wp1;
SGPropertyNode_ptr _pathNode;
+ SGPropertyNode_ptr _currentWpt;
+
+
+ /**
+ * Signal property to notify people that the route was edited
+ */
+ SGPropertyNode_ptr _edited;
+
+ /**
+ * Signal property to notify when the last waypoint is reached
+ */
+ SGPropertyNode_ptr _finished;
void setETAPropertyFromDistance(SGPropertyNode_ptr aProp, double aDistance);
void update_mirror();
- bool near_ground();
void currentWaypointChanged();
* Parse a route/wp node (from a saved, property-lsit formatted route)
*/
void parseRouteWaypoint(SGPropertyNode* aWP);
+
+ /**
+ * Check if we've reached the final waypoint.
+ * Returns true if we have.
+ */
+ bool checkFinished();
+
+// tied getters and setters
+ const char* getDepartureICAO() const;
+ const char* getDepartureName() const;
+ void setDepartureICAO(const char* aIdent);
+
+ const char* getDestinationICAO() const;
+ const char* getDestinationName() const;
+ void setDestinationICAO(const char* aIdent);
+
public:
FGRouteMgr();