GA Test
This commit is contained in:
parent
07cf4e93bf
commit
8c7ff0a486
4 changed files with 21 additions and 19 deletions
|
@ -537,15 +537,16 @@ void FGAIFlightPlan::pushBackWaypoint(FGAIWaypoint *wpt)
|
|||
SG_LOG(SG_AI, SG_DEBUG, "Double WP : \t" << wpt->getName() << " not added ");
|
||||
} else {
|
||||
waypoints.push_back(wpt);
|
||||
SG_LOG(SG_AI, SG_BULK, "Added WP : \t" << wpt->getName() << "\t" << wpt->getPos() << "\t" << wpt->getSpeed());
|
||||
}
|
||||
} else {
|
||||
waypoints.push_back(wpt);
|
||||
SG_LOG(SG_AI, SG_BULK, "Added WP : \t" << wpt->getName() << "\t" << wpt->getPos() << "\t" << wpt->getSpeed());
|
||||
}
|
||||
// std::vector::push_back invalidates waypoints
|
||||
// so we should restore wpt_iterator after push_back
|
||||
// (or it could be an index in the vector)
|
||||
wpt_iterator = waypoints.begin() + pos;
|
||||
SG_LOG(SG_AI, SG_BULK, "Added WP : \t" << wpt->getName() << "\t" << wpt->getPos() << "\t" << wpt->getSpeed());
|
||||
}
|
||||
|
||||
// Start flightplan over from the beginning
|
||||
|
|
|
@ -332,7 +332,7 @@ bool FGAIFlightPlan::createTakeoffTaxi(FGAIAircraft * ac, bool firstFlight,
|
|||
|
||||
// This may happen with buggy ground networks
|
||||
if (taxiRoute.size() <= 1) {
|
||||
SG_LOG(SG_AI, SG_DEBUG, "Taxiroute too short creating default taxi.");
|
||||
SG_LOG(SG_AI, SG_DEBUG, "Taxiroute too short " << apt->getId() << "creating default taxi.");
|
||||
createDefaultTakeoffTaxi(ac, apt, rwy);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
|||
FGParking *parking = gate.parking();
|
||||
if (parking && parking->getPushBackPoint() != nullptr) {
|
||||
FGTaxiRoute route = groundNet->findShortestRoute(parking, parking->getPushBackPoint(), false);
|
||||
SG_LOG(SG_AI, SG_BULK, "Creating Pushforward : \t" << parking->getPushBackPoint()->getIndex());
|
||||
SG_LOG(SG_AI, SG_BULK, "Creating Pushback : \t" << parking->getPushBackPoint()->getIndex());
|
||||
|
||||
int size = route.size();
|
||||
if (size < 2) {
|
||||
|
@ -110,7 +110,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
|||
while (route.next(node, &rte))
|
||||
{
|
||||
char buffer[10];
|
||||
snprintf (buffer, 10, "pb %d", node->getIndex());
|
||||
snprintf (buffer, 10, "pushback-%d4", (short)node->getIndex());
|
||||
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), node->geod(), dep->getElevation(), -vTaxiBackward);
|
||||
|
||||
/*
|
||||
|
@ -154,7 +154,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
|||
}
|
||||
|
||||
lastNodeVisited = pushForwardSegment->getEnd();
|
||||
double distance = pushForwardSegment->getLength();
|
||||
double distance = pushForwardSegment->getLength();
|
||||
|
||||
double parkingHeading = parking->getHeading();
|
||||
|
||||
|
@ -163,10 +163,11 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
|||
int numSegments = distance/2.0;
|
||||
for (int i = 1; i < numSegments; i++) {
|
||||
SGGeod pushForwardPt;
|
||||
|
||||
SGGeodesy::direct(parking->geod(), parkingHeading,
|
||||
((i / numSegments) * distance), pushForwardPt, az2);
|
||||
(((double)i / numSegments) * distance), pushForwardPt, az2);
|
||||
char buffer[16];
|
||||
snprintf(buffer, 16, "pushforward-%02d", i);
|
||||
snprintf(buffer, 16, "pushforward-%d4", (short)i);
|
||||
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), pushForwardPt, dep->getElevation(), vTaxiReduced);
|
||||
|
||||
wpt->setRouteIndex(pushForwardSegment->getIndex());
|
||||
|
|
|
@ -28,34 +28,34 @@
|
|||
<heavy>false</heavy>
|
||||
</aircraft>
|
||||
<flight>
|
||||
<callsign>Test_YBBN_0001</callsign>
|
||||
<callsign>gaParkYSSY1</callsign>
|
||||
<required-aircraft>TST_BN_1</required-aircraft>
|
||||
<fltrules>VFR</fltrules>
|
||||
<departure>
|
||||
<port>YBBN</port>
|
||||
<time>00:20:00</time>
|
||||
<port>YSSY</port>
|
||||
<time>00:40:00</time>
|
||||
</departure>
|
||||
<cruise-alt>50</cruise-alt>
|
||||
<arrival>
|
||||
<port>YSSY</port>
|
||||
<time>00:50:00</time>
|
||||
<port>YBBN</port>
|
||||
<time>00:52:00</time>
|
||||
</arrival>
|
||||
<repeat>01Hr</repeat>
|
||||
<repeat>03Hr</repeat>
|
||||
</flight>
|
||||
<flight>
|
||||
<callsign>Test_YSSY_1001</callsign>
|
||||
<callsign>gaParkYSSY2</callsign>
|
||||
<required-aircraft>TST_BN_1</required-aircraft>
|
||||
<fltrules>VFR</fltrules>
|
||||
<departure>
|
||||
<port>YSSY</port>
|
||||
<time>00:12:00</time>
|
||||
<port>YBBN</port>
|
||||
<time>01:20:00</time>
|
||||
</departure>
|
||||
<cruise-alt>50</cruise-alt>
|
||||
<arrival>
|
||||
<port>YBBN</port>
|
||||
<time>00:50:00</time>
|
||||
<port>YSSY</port>
|
||||
<time>01:50:00</time>
|
||||
</arrival>
|
||||
<repeat>01Hr</repeat>
|
||||
<repeat>03Hr</repeat>
|
||||
</flight>
|
||||
<flight>
|
||||
<callsign>Test_YSSY_1002</callsign>
|
||||
|
|
Loading…
Add table
Reference in a new issue