Hello,
I am currently trying to integrate an airplane into one of the demos of my IrrODE project. I have come to a point where my poor mathematical knowledge is not enough: the plane is moving into a direction and facing a direction. These do not have to be the same, but I need to apply a force that brings these 2 directions together, so I need to calculate the angles between the two vectors for heading and velocity. Can anyone give me a hint on how to do this? Thanks a lot.
Help for Airplane
Help for Airplane
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
You can find something here: Turn to target in 3D
Just look at the functions at the beginning.
Also this might be of some help: Free Flight (space flight) functions
Problem with airplane movement and flight is that you have to apply whole set of physical values in to calculation like gravitation, drag, angle of attack and so on ...generally result is that airplane is not moving in to exact direction it is facing. Its all about vectors so you should know and understand trigonometry and matrices and/or quaternions well.
Just look at the functions at the beginning.
Also this might be of some help: Free Flight (space flight) functions
Problem with airplane movement and flight is that you have to apply whole set of physical values in to calculation like gravitation, drag, angle of attack and so on ...generally result is that airplane is not moving in to exact direction it is facing. Its all about vectors so you should know and understand trigonometry and matrices and/or quaternions well.
Problem is, for angle to be of some use, it have to be related to some defined coordinate system (or in other words, laying in plane defined by those coordinates) ...either local or global ...which means, you need to find more than just one angle ...mostly you need 2 or even 3 angles, so you can rotate your object with eulers.
During flight you have 4 forces which are affecting the airplane. (Lift, weight, thrust and drag)
The lift vector is the normal vector of the wings.
The weight vector is always pointing to the ground (it's NOT always
the opposite of lift(only in straight and level flight)).
The thrust vector is always pointing to the front.
The drag vector is pointing into the opposite direction than the movement
and it's length depends on the velocity (relative to the frontal wind component ) and the surface of the airplane.
The length of the lift vector is proportional to the length of the thrust vector (depends on the wing).
I hope it helps.
The lift vector is the normal vector of the wings.
The weight vector is always pointing to the ground (it's NOT always
the opposite of lift(only in straight and level flight)).
The thrust vector is always pointing to the front.
The drag vector is pointing into the opposite direction than the movement
and it's length depends on the velocity (relative to the frontal wind component ) and the surface of the airplane.
The length of the lift vector is proportional to the length of the thrust vector (depends on the wing).
I hope it helps.
porcus >> generally true with few small exceptions:
-weight is not force ...gravity is.
-lift vector can be generated by any surface not just wings and then wings itself can be V shaped instead of level. In any case lift vector of airplane is sum of all of them.
-drag is affected also by drag coefficient which depend on smoothenes of surface and shape of airplane (simply speaking). Some shapes are aerodynamically more efficient than others and some surfaces generate less drag than others (shark skin).
Then resulting movement vector is sum of lift, weight, thrust and drag.
-weight is not force ...gravity is.
-lift vector can be generated by any surface not just wings and then wings itself can be V shaped instead of level. In any case lift vector of airplane is sum of all of them.
-drag is affected also by drag coefficient which depend on smoothenes of surface and shape of airplane (simply speaking). Some shapes are aerodynamically more efficient than others and some surfaces generate less drag than others (shark skin).
Then resulting movement vector is sum of lift, weight, thrust and drag.