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:
parent
313b31ad9a
commit
c242809a3c
1 changed files with 2 additions and 4 deletions
|
@ -1101,9 +1101,7 @@ 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;
|
headingError = headingDiff;
|
||||||
if (fabs(headingError) < 1.0) {
|
if (fabs(headingError) < 1.0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue