I am working on a pet project to write a game with flight physics. It will not be a simulator but instead much simpler.
What I have done so far
I have created winged components that generate lift and drag using the basic formulas I found online. I apologize if some of the debug info is not standard terminology.
The green arrows in the image show the force and magnitude begin applied. The yellow lines are the relative airflow.
What I cannot get working and understand
At first all the components used the same forward speed calculated by looking at the CG. Just an easy way to see what speed the plane was moving. The plane flew straight when "thrown" level and if will self correct if thrown with a slight roll angle.
The problem starts when each component starts calculating its individual forward speed. Even with dihedral applied to wings the plane will start rolling to the left more and more.
You can see that the left wing has a slightly higher AOA as the result of the dihedral. BUT it has a lower velocity than the right wing because the plane is yawing (I think). This lower velocity causes the right wing to produce more lift and the plane rolls more to the left. The more it rolls left the more the right wing speeds up causing it to produce even more lift.
I have tired to increase the rudder, but that didnt help at all. Removing the rudder causes the plane to over correct, and then to roll to the left too.
Can any body explain what is suppose to happen when a plane rolls. From what I see the plane rolls left, it pitches slightly down. The right wing "swings" forward faster than the left causing more lift.....