- #1
Gibbon
- 23
- 0
Hi, ok.. i know I am probably expecting way to much off you guys here but its my only last resort before i give up!
Ill explain.. I am a avid aviation fan as well as an avid game developer whilst also being a fulltime software developer. So i program in delphi at work and what i want as a hobbiest, mostly Lua with C++.
My recent project i am trying to achieve for fun, learning and hobbiest reasons is a "realistic" flight simulation. I am using leadwerks engine (so the 3D part is done), that uses the "Newton game dynamics" library, so the physics calulatiions are done.
And so.. as silly as it sounds all i need to do in order to get a basic 3d model to act like a plane... is give the model the correct forces in order for it to move and act like a plane.
I say its silly because... i cannot seem to do it. And i think its because i am having problems understand the equations needed for this.
I fly planes myself, Rc planes and Rc helicopters i have done for years, I've built my own RC plane designs and I've built all my model helicopters that i fly. So.. i do undertsand flight and the physics... this is why it upsets me! As I am a programmer and flyer yet cannot seem to put these two together!
I know its not easy, but a lot of the work has been done for me.
So.. i am after in computer terms the equation needed for lift, drag and trust.
I know the equations.. i must have read them 100 times now, i also have the book "Physics for game developers" which explains it in there also.. but my lack of math knowledge let's me down. I've refreshed my mind with algebra and Trig as i am very serious about givving this ago, and honestly won't be wasting your time.
Ok, so what i know already...
I know that the lift equation is :
lift = CL*(r*V)/2*A
CL = 2 * pi * AoA
Break down:
V = ? (i don't know how to work out instant velocity in programming)
AoA = is fine, i can get the local angle in degrees or radians.
CL = 2 *... ETC : What is the 2?
Drag = totally confused me because: D = .5 * Cd * r * V^2 * A (thats fine its the Cd)
Cd = Cd = Cd0 + Cl^2 / ( pi * Ar * e) : Ok so what is Cd0 and what e (efficiency factor)?
So.. I am stuck. I have at the moment... a 3d model that i can generate a velocity (by just uping a value) which generates a force from front of the model making it move.
I also seem to successfull give my model lift by using the lift equation and obviosuly changing the AoA of my model, but then once up, it really doesn't act very plane like.
I can roll, pitch and yaw the model by adding a torque force according to each local axis.
This is done currently with gravity turned off, as when i turn it on i cannot seem to get the model off the ground as it seems the only lift comes from AoA and as I am on the ground the AoA is 0!
Does anyone (and again i know its not simple else eveyrone would be doing it) understand "where i am" with this, and possibly suggest any good advise or good "simplish" articles i can read that may help.
I appriciated your help and thanks for reading.
Andy
Ill explain.. I am a avid aviation fan as well as an avid game developer whilst also being a fulltime software developer. So i program in delphi at work and what i want as a hobbiest, mostly Lua with C++.
My recent project i am trying to achieve for fun, learning and hobbiest reasons is a "realistic" flight simulation. I am using leadwerks engine (so the 3D part is done), that uses the "Newton game dynamics" library, so the physics calulatiions are done.
And so.. as silly as it sounds all i need to do in order to get a basic 3d model to act like a plane... is give the model the correct forces in order for it to move and act like a plane.
I say its silly because... i cannot seem to do it. And i think its because i am having problems understand the equations needed for this.
I fly planes myself, Rc planes and Rc helicopters i have done for years, I've built my own RC plane designs and I've built all my model helicopters that i fly. So.. i do undertsand flight and the physics... this is why it upsets me! As I am a programmer and flyer yet cannot seem to put these two together!
I know its not easy, but a lot of the work has been done for me.
So.. i am after in computer terms the equation needed for lift, drag and trust.
I know the equations.. i must have read them 100 times now, i also have the book "Physics for game developers" which explains it in there also.. but my lack of math knowledge let's me down. I've refreshed my mind with algebra and Trig as i am very serious about givving this ago, and honestly won't be wasting your time.
Ok, so what i know already...
I know that the lift equation is :
lift = CL*(r*V)/2*A
CL = 2 * pi * AoA
Break down:
V = ? (i don't know how to work out instant velocity in programming)
AoA = is fine, i can get the local angle in degrees or radians.
CL = 2 *... ETC : What is the 2?
Drag = totally confused me because: D = .5 * Cd * r * V^2 * A (thats fine its the Cd)
Cd = Cd = Cd0 + Cl^2 / ( pi * Ar * e) : Ok so what is Cd0 and what e (efficiency factor)?
So.. I am stuck. I have at the moment... a 3d model that i can generate a velocity (by just uping a value) which generates a force from front of the model making it move.
I also seem to successfull give my model lift by using the lift equation and obviosuly changing the AoA of my model, but then once up, it really doesn't act very plane like.
I can roll, pitch and yaw the model by adding a torque force according to each local axis.
This is done currently with gravity turned off, as when i turn it on i cannot seem to get the model off the ground as it seems the only lift comes from AoA and as I am on the ground the AoA is 0!
Does anyone (and again i know its not simple else eveyrone would be doing it) understand "where i am" with this, and possibly suggest any good advise or good "simplish" articles i can read that may help.
I appriciated your help and thanks for reading.
Andy
Last edited: