- FGTrafficRecord();
-
- void setId(int val) { id = val; };
- void setRadius(double rad) { radius = rad;};
- void setPositionAndIntentions(int pos, FGAIFlightPlan *route);
- void setRunway(string rwy) { runway = rwy;};
- void setLeg(int lg) { leg = lg;};
- int getId() { return id;};
- int getState() { return state;};
- void setState(int s) { state = s;}
- FGATCInstruction getInstruction() { return instruction;};
- bool hasInstruction() { return instruction.hasInstruction(); };
- void setPositionAndHeading(double lat, double lon, double hdg, double spd, double alt);
- bool checkPositionAndIntentions(FGTrafficRecord &other);
- int crosses (FGGroundNetwork *, FGTrafficRecord &other);
- bool isOpposing (FGGroundNetwork *, FGTrafficRecord &other, int node);
-
- bool onRoute(FGGroundNetwork *, FGTrafficRecord &other);
-
- bool getSpeedAdjustment() { return instruction.getChangeSpeed(); };
-
- double getLatitude () { return latitude ; };
- double getLongitude() { return longitude; };
- double getHeading () { return heading ; };
- double getSpeed () { return speed ; };
- double getAltitude () { return altitude ; };
- double getRadius () { return radius ; };
-
- int getWaitsForId () { return waitsForId; };
-
- void setSpeedAdjustment(double spd);
- void setHeadingAdjustment(double heading);
- void clearSpeedAdjustment () { instruction.setChangeSpeed (false); };
- void clearHeadingAdjustment() { instruction.setChangeHeading(false); };
-
- bool hasHeadingAdjustment() { return instruction.getChangeHeading(); };
- bool hasHoldPosition() { return instruction.getHoldPosition(); };
- void setHoldPosition (bool inst) { instruction.setHoldPosition(inst); };
-
- void setWaitsForId(int id) { waitsForId = id; };
-
- void setResolveCircularWait() { instruction.setResolveCircularWait(true); };
- void clearResolveCircularWait() { instruction.setResolveCircularWait(false); };
-
- string getRunway() { return runway; };
- //void setCallSign(string clsgn) { callsign = clsgn; };
- void setAircraft(FGAIAircraft *ref) { aircraft = ref;};
- void updateState() { state++; allowTransmission=true; };
- //string getCallSign() { return callsign; };
- FGAIAircraft *getAircraft() { return aircraft;};
- int getTime() { return timer; };
- int getLeg() { return leg; };
- void setTime(time_t time) { timer = time; };
-
- bool pushBackAllowed();
- bool allowTransmissions() { return allowTransmission; };
- void suppressRepeatedTransmissions () { allowTransmission=false; };
- void allowRepeatedTransmissions () { allowTransmission=true; };
- void nextFrequency() { frequencyId++; };
- int getNextFrequency() { return frequencyId; };
+ FGTrafficRecord();
+
+ void setId(int val) {
+ id = val;
+ };
+ void setRadius(double rad) {
+ radius = rad;
+ };
+ void setPositionAndIntentions(int pos, FGAIFlightPlan *route);
+ void setRunway(const std::string& rwy) {
+ runway = rwy;
+ };
+ void setLeg(int lg) {
+ leg = lg;
+ };
+ int getId() {
+ return id;
+ };
+ int getState() {
+ return state;
+ };
+ void setState(int s) {
+ state = s;
+ }
+ FGATCInstruction getInstruction() {
+ return instruction;
+ };
+ bool hasInstruction() {
+ return instruction.hasInstruction();
+ };
+ void setPositionAndHeading(double lat, double lon, double hdg, double spd, double alt);
+ bool checkPositionAndIntentions(FGTrafficRecord &other);
+ int crosses (FGGroundNetwork *, FGTrafficRecord &other);
+ bool isOpposing (FGGroundNetwork *, FGTrafficRecord &other, int node);
+
+ bool isActive(int margin);
+
+ bool onRoute(FGGroundNetwork *, FGTrafficRecord &other);
+
+ bool getSpeedAdjustment() {
+ return instruction.getChangeSpeed();
+ };
+
+ double getLatitude () {
+ return latitude ;
+ };
+ double getLongitude() {
+ return longitude;
+ };
+ double getHeading () {
+ return heading ;
+ };
+ double getSpeed () {
+ return speed ;
+ };
+ double getAltitude () {
+ return altitude ;
+ };
+ double getRadius () {
+ return radius ;
+ };
+
+ int getWaitsForId () {
+ return waitsForId;
+ };
+
+ void setSpeedAdjustment(double spd);
+ void setHeadingAdjustment(double heading);
+ void clearSpeedAdjustment () {
+ instruction.setChangeSpeed (false);
+ };
+ void clearHeadingAdjustment() {
+ instruction.setChangeHeading(false);
+ };
+
+ bool hasHeadingAdjustment() {
+ return instruction.getChangeHeading();
+ };
+ bool hasHoldPosition() {
+ return instruction.getHoldPosition();
+ };
+ void setHoldPosition (bool inst) {
+ instruction.setHoldPosition(inst);
+ };
+
+ void setWaitsForId(int id) {
+ waitsForId = id;
+ };
+
+ void setResolveCircularWait() {
+ instruction.setResolveCircularWait(true);
+ };
+ void clearResolveCircularWait() {
+ instruction.setResolveCircularWait(false);
+ };
+
+ const std::string& getRunway() {
+ return runway;
+ };
+ //void setCallSign(string clsgn) { callsign = clsgn; };
+ void setAircraft(FGAIAircraft *ref) {
+ aircraft = ref;
+ };
+ void updateState() {
+ state++;
+ allowTransmission=true;
+ };
+ //string getCallSign() { return callsign; };
+ FGAIAircraft *getAircraft() {
+ return aircraft;
+ };
+ int getTime() {
+ return timer;
+ };
+ int getLeg() {
+ return leg;
+ };
+ void setTime(time_t time) {
+ timer = time;
+ };
+
+ bool pushBackAllowed();
+ bool allowTransmissions() {
+ return allowTransmission;
+ };
+ void allowPushBack() { allowPushback =true;};
+ void denyPushBack () { allowPushback = false;};
+ void suppressRepeatedTransmissions () {
+ allowTransmission=false;
+ };
+ void allowRepeatedTransmissions () {
+ allowTransmission=true;
+ };
+ void nextFrequency() {
+ frequencyId++;
+ };
+ int getNextFrequency() {
+ return frequencyId;
+ };
+ intVec& getIntentions() {
+ return intentions;
+ };
+ int getCurrentPosition() {
+ return currentPos;
+ };
+ void setPriority(int p) { priority = p; };
+ int getPriority() { return priority; };