if (m_velocity.Length() < m_stallSpeed)
{
m_gravity = m_stallSpeed - m_speed.Current;
if (MathHelper.ToDegrees(m_orientation) < 90.0f || 270.0f < MathHelper.ToDegrees(m_orientation))
{
m_orientation += 0.01f;
}
else if (MathHelper.ToDegrees(m_orientation) > 90.0f)
{
m_orientation -= 0.01f;
}
else
{
m_orientation = MathHelper.ToRadians(270);
}
}
else
{
m_gravity = 0;
}
This works, but it sucks. I've been studying a bit of aerodynamics to get a better idea on how flight works. Before I pose my question, I'll put down my rudimentary understanding and implementation idea:
A flying craft has five forces working on it:
1. Drag -- Wind resistance
2. Thrust -- Created by engines
3. Gravity/weight -- Downward force attracting craft to ground
4. Lift - A force vector which is dependent on angle of attack and thrust
5. Current Velocity - The kinetic direction of travel regardless of orientation and thrust (momentum)
So, when an aircraft flies too slow, it "stalls" because the generated upward lift isn't enough to overcome the force of gravity.
The question is: How do you calculate the angle of attack?
The angle of attack is the air flow direction across a wing section. But if an airplane flies at an inclined upward angle for long enough, doesn't the air flow direction become directly across the wing section, thus causing the angle of attack to become zero? Thus, any upward climb of an airplane becomes mostly from the engines pushing the plane upwards rather than from lift generated by its wings, right?
It seems that, given wing shape, there'd be a sweet spot for thrust and angle of attack to maintain the highest ratio of wing lift to thrust lift ratio...
....Am I trying to over-engineer this?






