* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
**************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "AIFlightPlan.hxx"
#include <simgear/math/sg_geodesy.hxx>
#include <Airports/runways.hxx>
#include <Environment/environment.hxx>
-void FGAIFlightPlan::createPushBack(bool firstFlight, FGAirport *dep,
+void FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
+ bool firstFlight, FGAirport *dep,
double latitude,
double longitude,
double radius,
{
double lat, lon, heading;
FGTaxiRoute *pushBackRoute;
+ // Active runway can be conditionally set by ATC, so at the start of a new flight, this
+ // must be reset.
+ activeRunway.clear();
+
if (!(dep->getDynamics()->getGroundNetwork()->exists())) {
//cerr << "Push Back fallback" << endl;
- createPushBackFallBack(firstFlight, dep, latitude, longitude,
+ createPushBackFallBack(ac, firstFlight, dep, latitude, longitude,
radius, fltType, aircraftType, airline);
} else {
if (firstFlight) {
dep->getDynamics()->getParking(gateId, &lat, &lon, &heading);
}
if (gateId < 0) {
- createPushBackFallBack(firstFlight, dep, latitude, longitude,
+ createPushBackFallBack(ac, firstFlight, dep, latitude, longitude,
radius, fltType, aircraftType, airline);
return;
// some special considerations for the last point:
wpt->name = string("PushBackPoint");
wpt->speed = 15;
+ //for (wpt_vector_iterator i = waypoints.begin(); i != waypoints.end(); i++) {
+ // cerr << "Waypoint Name: " << (*i)->name << endl;
+ //}
} else {
//cerr << "Creating direct forward departure route fragment" << endl;
double lat2, lon2, az2;
* This is the backup function for airports that don't have a
* network yet.
******************************************************************/
-void FGAIFlightPlan::createPushBackFallBack(bool firstFlight, FGAirport *dep,
+void FGAIFlightPlan::createPushBackFallBack(FGAIAircraft *ac, bool firstFlight, FGAirport *dep,
double latitude,
double longitude,
double radius,