Two quick videos before going to bed...
I worked on the Autopilot today... trying to get rid of the shimmering/stuttering effect in the yoke whenever the autopilot was in control. I solved this problem by fixing a long time bug which had the animations of the control surfaces and moving parts tied to the joystick rather than the actual physical damped values set by the flight model.
The way the controls are moved in a different manner for each airplane is done via a simple delayed response with non linear interpolation from the joystick inputs multiplied by a scalar on the input value. The delay is independant for each control surface, so the longer the delay, the slower the aircraft will respond to a user input from the joystick.
An aircraft with a fast response would be an aerobatic airplane, and an airplane with a slower response could be a Cessna, Piper, or even slower for an airliner...
But the jitteriness was not only due to that animation bug, there was another problem with the PID controllers... linked again to the chaining of two pid... the first pid had issues when calculating the derivative for small corrections, which made it output spikes, which in turn caused even more disturbance in the following PID...
I also made some changes to the wind/turbulence system, and the following video shows the Autopilot in action in severe turbulences. I could watch this video for hours... I love how the controls move on their own to counter the wind forces :-)
The second video shows the failure of the autopilot, I had set it to a low speed, with heavy turbulences... it shows how a turbulence that was a tiny bit too strong knocked the plane over and threw it in a spin... It's funny to see how the autopilot is still trying to recover hopelessly during the spin :-)
Just one note though, the airplane doesn't have an spin-out system, I just disconnected the autopilot and got out of it before it was too late!
Autopilot fighting... from Matt on Vimeo.
Severe Turbulences with Autopilot from Matt on Vimeo.