props->tie("controls/gear/gear-down",
SGRawValueMethods<FGAIAircraft,bool>(*this,
&FGAIAircraft::_getGearDown));
- props->tie("callsign",
- SGRawValueMethods<FGAIAircraft,const char *>(*this,
- &FGAIAircraft::_getCallSign));
- //props->setStringValue("callsign", callsign.c_str());
}
FGAIBase::unbind();
props->untie("controls/gear/gear-down");
- props->untie("callsign");
}
return _performance->gearExtensible(this);
}
-const char * FGAIAircraft::_getCallSign() const {
- return callsign.c_str();
-}
-
void FGAIAircraft::loadNextLeg() {
}
-void FGAIAircraft::setCallSign(const string& s) {
- callsign = s;
-}
-
-
void FGAIAircraft::doGroundAltitude() {
if (fabs(altitude_ft - (tgt_altitude_ft+groundOffset)) > 1000.0)
altitude_ft = (tgt_altitude_ft + groundOffset);
if (finite(calc_bearing)) {
double hdg_error = calc_bearing - tgt_heading;
- if (fabs(hdg_error) > 1.0) {
+ if (fabs(hdg_error) > 0.01) {
TurnTo( calc_bearing );
}
if (fabs(speed_diff) > 10) {
prevSpeed = speed;
- fp->setLeadDistance(speed, tgt_heading, curr, next);
+ if (next) {
+ fp->setLeadDistance(speed, tgt_heading, curr, next);
+ }
}
}