#ifndef _GROUNDNETWORK_HXX_
#define _GROUNDNETWORK_HXX_
+#include <osg/Geode>
+#include <osg/Geometry>
+#include <osg/MatrixTransform>
+#include <osg/Shape>
+
+
#include <simgear/compiler.h>
#include <simgear/route/waypoint.hxx>
#include "parking.hxx"
#include <ATC/trafficcontrol.hxx>
+
class FGTaxiSegment; // forward reference
class FGAIFlightPlan; // forward reference
class FGAirport; // forward reference
int startNode;
int endNode;
double length;
- double course;
- double headingDiff;
+ double heading;
+ SGGeod center;
bool isActive;
bool isPushBackRoute;
FGTaxiNode *start;
startNode(0),
endNode(0),
length(0),
- course(0),
- headingDiff(0),
+ heading(0),
isActive(0),
isPushBackRoute(0),
start(0),
startNode (other.startNode),
endNode (other.endNode),
length (other.length),
- course (other.course),
- headingDiff (other.headingDiff),
+ heading (other.heading),
+ center (other.center),
isActive (other.isActive),
isPushBackRoute (other.isPushBackRoute),
start (other.start),
startNode = other.startNode;
endNode = other.endNode;
length = other.length;
- course = other.course;
- headingDiff = other.headingDiff;
+ heading = other.heading;
+ center = other.center;
isActive = other.isActive;
isPushBackRoute = other.isPushBackRoute;
start = other.start;
void setStart(FGTaxiNodeVector *nodes);
void setEnd (FGTaxiNodeVector *nodes);
void setPushBackType(bool val) { isPushBackRoute = val; };
- void setTrackDistance();
+ void setDimensions(double elevation);
FGTaxiNode * getEnd() { return end;};
FGTaxiNode * getStart() { return start; };
double getLength() { return length; };
int getIndex() { return index; };
-
+ double getLatitude() { return center.getLatitudeDeg(); };
+ double getLongitude() { return center.getLongitudeDeg(); };
+ double getHeading() { return heading; };
bool isPushBack() { return isPushBackRoute; };
int getPenalty(int nGates);
FGTaxiSegment *getAddress() { return this;};
bool operator<(const FGTaxiSegment &other) const { return index < other.index; };
- bool hasSmallerHeadingDiff (const FGTaxiSegment &other) const { return headingDiff < other.headingDiff; };
+ //bool hasSmallerHeadingDiff (const FGTaxiSegment &other) const { return headingDiff < other.headingDiff; };
FGTaxiSegment *opposite() { return oppositeDirection; };
void setCourseDiff(double crse);
routes = rts;
distance = dist;
currNode = nodes.begin();
+ currRoute = routes.begin();
// depth = dpth;
};
void checkHoldPosition(int id, double lat, double lon,
double heading, double speed, double alt);
+
+
public:
FGGroundNetwork();
~FGGroundNetwork();
virtual bool hasInstruction(int id);
virtual FGATCInstruction getInstruction(int id);
+ bool checkTransmissionState(int minState, int MaxState, TrafficVectorIterator i, time_t now, AtcMsgId msgId,
+ AtcMsgDir msgDir);
bool checkForCircularWaits(int id);
+ virtual void render();
+
};