1
0
Fork 0

Fix for AIAircraft headings.

Nick Vatamaniuc: fix AI aircraft not updating waypoint headings when using custom flightplans.

(Commented out log-line following a non-parenthesised if() test causing problems)
This commit is contained in:
James Turner 2013-06-03 16:48:40 +01:00
parent 313b31ad9a
commit c242809a3c

View file

@ -1101,10 +1101,8 @@ void FGAIAircraft::updateHeading() {
}
}
}
if (trafficRef)
//cerr << trafficRef->getCallSign() << " Heading "
// << hdg << ". Target " << tgt_heading << ". Diff " << fabs(sum - tgt_heading) << ". Speed " << speed << "Heading change rate : " << headingChangeRate << " bacnk sence " << bank_sense << endl;
hdg += headingChangeRate * dt * sqrt(fabs(speed) / 15);
hdg += headingChangeRate * dt * sqrt(fabs(speed) / 15);
headingError = headingDiff;
if (fabs(headingError) < 1.0) {
hdg = tgt_heading;