updateAltitudes();
updateVerticalSpeed();
matchPitchAngle();
+ UpdateRadar(manager);
}
void FGAIAircraft::ProcessFlightPlan( double dt, time_t now ) {
- //if (! fpExecutable(now))
- // return;
-
// the one behind you
FGAIFlightPlan::waypoint* prev = 0;
// the one ahead
handleFirstWaypoint();
return;
} // end of initialization
-
+ if (! fpExecutable(now))
+ return;
dt_count = 0;
if (! leadPointReached(curr)) {
// experimental: Use fabs, because speed can be negative (I hope) during push_back.
if (lead_dist < fabs(2*speed)) {
- //don't skip over the waypoint
- lead_dist = fabs(2*speed);
- //cerr << "Extending lead distance to " << lead_dist << endl;
+ //don't skip over the waypoint
+ lead_dist = fabs(2*speed);
+ //cerr << "Extending lead distance to " << lead_dist << endl;
}
//prev_dist_to_go = dist_to_go;
// This waypoint marks the fact that the aircraft has passed the initial taxi
// departure waypoint, so it can release the parking.
- if (prev->name == "park2")
+ if (prev->name == "park2") {
dep->getDynamics()->releaseParking(fp->getGate());
+ cerr << trafficRef->getCallSign() << "releasing parking " << fp->getGate() << endl;
+ }
// This is the last taxi waypoint, and marks the the end of the flight plan
// so, the schedule should update and wait for the next departure time.
if (nextDeparture < (now+1200)) {
nextDeparture = now + 1200;
}
- fp->setTime(nextDeparture);
+ fp->setTime(nextDeparture); // should be "next departure"
}
return true;
std::string type = scEntry->getStringValue("type", "aircraft");
if (type == "tanker") { // refueling scenarios
- FGAITanker* aircraft = new FGAITanker;
- aircraft->readFromScenario(scEntry);
- attach(aircraft);
+ FGAITanker* tanker = new FGAITanker;
+ tanker->readFromScenario(scEntry);
+ attach(tanker);
} else if (type == "aircraft") {
FGAIAircraft* aircraft = new FGAIAircraft;
aircraft->readFromScenario(scEntry);
* is to have a clean generic AIAircraft class without any special functionality. In your
* scenario specification use 'tanker' as the scenario type to use this class.
*
- * @author Thomas Förster <t.foerster@biologie.hu-berlin.de>
+ * @author Thomas F�ster <t.foerster@biologie.hu-berlin.de>
*/
class FGAITanker : public FGAIAircraft {
bool contact; // set if this tanker is within fuelling range
virtual void Run(double dt);
-
+ virtual void update (double dt);
};
#endif