void FGAIAircraft::bind() {
FGAIBase::bind();
- props->tie("controls/gear/gear-down",
- SGRawValueMethods<FGAIAircraft,bool>(*this,
- &FGAIAircraft::_getGearDown));
- props->tie("transponder-id",
- SGRawValueMethods<FGAIAircraft,const char*>(*this,
- &FGAIAircraft::_getTransponderCode));
+ tie("controls/gear/gear-down",
+ SGRawValueMethods<FGAIAircraft,bool>(*this,
+ &FGAIAircraft::_getGearDown));
+ tie("transponder-id",
+ SGRawValueMethods<FGAIAircraft,const char*>(*this,
+ &FGAIAircraft::_getTransponderCode));
}
-
-void FGAIAircraft::unbind() {
- FGAIBase::unbind();
-
- props->untie("controls/gear/gear-down");
- props->untie("transponder-id");
-}
-
-
void FGAIAircraft::update(double dt) {
FGAIBase::update(dt);
Run(dt);
{
// err is negative when we passed too high
double vert_m = vert_ft * SG_FEET_TO_METER;
- double err_m = err * SG_FEET_TO_METER;
+ //double err_m = err * SG_FEET_TO_METER;
//double angle = atan2(vert_m, dist_m);
double speedMs = (speed * SG_NM_TO_METER) / 3600;
//double vs = cos(angle) * speedMs; // Now in m/s
// If on ground, calculate heading change directly
if (onGround()) {
double headingDiff = fabs(hdg-tgt_heading);
- double bank_sense = 0.0;
+// double bank_sense = 0.0;
/*
double diff = fabs(hdg - tgt_heading);
if (diff > 180)
if (sum > 360.0)
sum -= 360.0;
if (fabs(sum - tgt_heading) > 0.0001) {
- bank_sense = -1.0;
+// bank_sense = -1.0;
} else {
- bank_sense = 1.0;
+// bank_sense = 1.0;
}
//if (trafficRef)
// cerr << trafficRef->getCallSign() << " Heading "