+ // And the elevator control in the approach. This works just
+ // like the tail incidence computation (it's solving for the
+ // same thing -- pitching moment -- by diddling a different
+ // variable).
+ const float ELEVDIDDLE = 0.0001f;
+ _approachElevator.val += ELEVDIDDLE;
+ runApproach();
+ _approachElevator.val -= ELEVDIDDLE;
+
+ _model.getBody()->getAngularAccel(tmp);
+ float apitch1 = tmp[1];
+ float elevDelta = -apitch0 * (ELEVDIDDLE/(apitch1-apitch0));
+
+ // Now apply the values we just computed. Note that the
+ // "minor" variables are deferred until we get the lift/drag
+ // numbers in the right ballpark.
+