+public:
+ 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) const;
+
+ bool onRoute(FGGroundNetwork *, FGTrafficRecord &other);
+
+ bool getSpeedAdjustment() const {
+ return instruction.getChangeSpeed();
+ };
+
+ double getLatitude () const {
+ return latitude ;
+ };
+ double getLongitude() const {
+ return longitude;
+ };
+ double getHeading () const {
+ return heading ;
+ };
+ double getSpeed () const {
+ return speed ;
+ };
+ double getAltitude () const {
+ return altitude ;
+ };
+ double getRadius () const {
+ return radius ;
+ };
+
+ int getWaitsForId () const {
+ return waitsForId;
+ };
+
+ void setSpeedAdjustment(double spd);
+ void setHeadingAdjustment(double heading);
+ void clearSpeedAdjustment () {
+ instruction.setChangeSpeed (false);
+ };
+ void clearHeadingAdjustment() {
+ instruction.setChangeHeading(false);
+ };
+
+ bool hasHeadingAdjustment() const {
+ return instruction.getChangeHeading();
+ };
+ bool hasHoldPosition() const {
+ 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() const {
+ 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() const {
+ return aircraft;
+ };
+ int getTime() const {
+ return timer;
+ };
+ int getLeg() const {
+ return leg;
+ };
+ void setTime(time_t time) {
+ timer = time;
+ };
+
+ bool pushBackAllowed() const;
+ bool allowTransmissions() const {
+ return allowTransmission;
+ };
+ void allowPushBack() { allowPushback =true;};
+ void denyPushBack () { allowPushback = false;};
+ void suppressRepeatedTransmissions () {
+ allowTransmission=false;
+ };
+ void allowRepeatedTransmissions () {
+ allowTransmission=true;
+ };
+ void nextFrequency() {
+ frequencyId++;
+ };
+ int getNextFrequency() const {
+ return frequencyId;
+ };
+ intVec& getIntentions() {
+ return intentions;
+ };
+ int getCurrentPosition() const {
+ return currentPos;
+ };
+ void setPriority(int p) { priority = p; };
+ int getPriority() const { return priority; };
+};