]> git.mxchange.org Git - flightgear.git/commitdiff
Vivian reported that the caster angle of the Hunter was experiencing
authorandy <andy>
Wed, 2 Nov 2005 18:34:06 +0000 (18:34 +0000)
committerandy <andy>
Wed, 2 Nov 2005 18:34:06 +0000 (18:34 +0000)
"jitter" when the aircraft was stopped.  This is a fundamental
characteristic of the gear model, and can't be fixed without major
surgery (and not a small amount of blinding insight).  But we can at
least clamp it so the value can't change unless the wheel is moving
with a nontrivial velocity (5cm/sec in this case).

src/FDM/YASim/Gear.cpp

index f1e38a0c9c4ab8281aaac7ccd3620290e1828fde..7950c2ef2d98263379514f099cf01cbb2a440c9e 100644 (file)
@@ -272,7 +272,11 @@ void Gear::calcForce(RigidBody* body, State *s, float* v, float* rot)
 
     if(_castering) {
         _rollSpeed = Math::sqrt(vsteer*vsteer + vskid*vskid);
-        _casterAngle = Math::atan2(vskid, vsteer);
+        // Don't modify caster angle when the wheel isn't moving,
+        // or else the angle will animate the "jitter" of a stopped
+        // gear.
+        if(_rollSpeed > 0.05)
+            _casterAngle = Math::atan2(vskid, vsteer);
         return;
     } else {
         _rollSpeed = vsteer;