#include <Airports/dynamics.hxx>
#include <Airports/simple.hxx>
#include <Radio/radio.hxx>
+#include <signal.h>
using std::sort;
if ((*i) != pos) {
SG_LOG(SG_ATC, SG_ALERT,
"Error in FGTrafficRecord::setPositionAndIntentions at " << SG_ORIGIN);
- cerr << "Pos : " << pos << " Curr " << *(intentions.begin()) << endl;
- for (intVecIterator i = intentions.begin();
- i != intentions.end(); i++) {
- cerr << (*i) << " ";
- }
- cerr << endl;
}
intentions.erase(i);
} else {
int size = route->getNrOfWayPoints();
//cerr << "Setting pos" << pos << " ";
//cerr << "setting intentions ";
- for (int i = 0; i < size; i++) {
+ for (int i = 2; i < size; i++) {
int val = route->getRouteIndex(i);
- //cerr << val<< " ";
- if ((val) && (val != pos)) {
- intentions.push_back(val);
- //cerr << "[set] ";
- }
+ intentions.push_back(val);
}
- //cerr << endl;
- //while (route->next(&legNr, &routeNr)) {
- //intentions.push_back(routeNr);
- //}
- //route->rewind(currentPos);
}
- //exit(1);
}
/**
* Check if another aircraft is ahead of the current one, and on the same