Jump to content
  • Advertisement
Sign in to follow this  
Kurt-olsson

Frustrating climb and descent energy (velocity)

This topic is 1207 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem with my flight model. I miss the part with velocity acceleration during descent and extra drag during climb.

I have implemented Drag curve and Lift curve against these formulas. And it works really good. I only miss the extra energy (kinetic) when descending and loss of energy when climbing.

 

Iam not sure i have understood the resulting drag/acc to the models and cant find good resources on this.

 

I have attached an image to see if i have understood this correct.

 

Do you know if this is the correct approach?

[attachment=26178:climbdescproblem.png]

 

My lift function

 

  // L = Lift in Newton.
            // P = Airdensity kg / m3
            // V = velocity in m/s
            // S = Wingarea m2
            // Cl = Lift Coefficient - Angle of Attack lookup table (99% it is devided by ten)
            // L = (P / 2) * V^2 * Cl * S
            var L = (this.getCurrentAirDensity() / 2) * Math.pow(this.getVelocity(), 2) * this.getCoefficcientValue(ClCurve) * this.wingarea;
 
            return L;
 
My drag function
 
  // D = Drag
            // P = Airdensity kg / m3
            // V = velocity in m/s
            // S = Wingarea m2
            // Cd = Drag Coefficient - Angle of Attack lookup table (99% it is devided by ten)
            // D = Cd * S * 0.5 * P * V^2
            var D = this.getCoefficcientValue(ClDrag) * this.wingarea * 0.5 * this.getCurrentAirDensity() * Math.pow(this.getVelocity(), 2);
            return D;
Edited by KurtO

Share this post


Link to post
Share on other sites
Advertisement
The extra energy when descending doesn't have much to do with your lift or drag computations: It has to do with gravity. Perhaps you can show us some more of your Physics?

Share this post


Link to post
Share on other sites

Ok. it makes more sence that it is only gravity thats the "affecting" force when goining speed on descent.

I guess i can calculate depending on what pitch the aircraft has the amount (fraction) of that gravity is giving thrust forward.

 

This has been a tip from previous member for me.

 

But is it also gravity that makes the airspeed loss when climbing?

So then the thrust is directed backwards (a fraction of the gravity, that will say)?

Share this post


Link to post
Share on other sites


is it also gravity that makes the airspeed loss when climbing?

 

It will contribute to the total forces, whether climbing, diving or flying level. It does not, by itself, cause a decrease in airspeed.

Share this post


Link to post
Share on other sites

Ok so if i understand this correct, i will end up with this picture.

You think this looks correct?

 

[attachment=26197:climbdescproblem2.png]

Share this post


Link to post
Share on other sites

I am not sure if i did the proper flight mode lphysic because i am still searching decent drag/lift coefficent tables for my f-18.

 

first of all it will surely need automatic flight stabilization unless yeah unless...... What do i don't know is that i have never seen stable flight in my apporach (maybe cause of wrong lift drag coeff tables)

 

 

i had the same problem with a plane generating too much lift, anyway you will have to add rotation model to your flight model because it will reduce the lift.

 

lift is always acting in the up direction (prependicular to velocity vector) [unless coefficient is negative and it mainly becomes a drag vector)

drag acts opposite 

 

 

you divide the aircraft model into smaller fragments for wing its flap area and airlieron area and if theres any area between you add this area too, you must find proper airfoil drag/lift coeff table for that then you are almost good (additionally thye need to have drag/lift coeffs when flaps are deflected)

 

these coefficents are dimensionless.

 

then you need to find a proper angle of attack which can be negative too (and if you wont do that you wont be able to pitch down etc without deacceleration)

 

thrust is also important because as far as i can see its not always attached to the center of gravity so you will have to attach it to the properrel area)

gravity acts at the center of mass so you just add force to the result force.

 

 

additionally when you dont calculate wing and other elements areas you will have to remove  the fuselage width out of the wingsspan or i dont know maybe additional drag could do it

 

 

as far as i see lookup tables dont have coefficents for angles smaller than -10 and higher than 30 which is silly

 

additionally theres skin friction drag and induced drag. 

 

I dont really want to believe in that but it seems lift drag thrust weight are the only forces to consider and they always act in the same direction (unless vector thrust is applied)

 

 

anyway rotation of a model is critical, thus automatic stabilization should be implemented anyway that all seems wrong because i cant imagine a pilot that is correcting the flight because his plane is pitching up and going up constantly that is just weird - it means he has his hand on the stick all the time and its pushed a little forward to achieve level flight ) that doesnt happen on militarry aircfrafts since they have automatic flight stabilization system

Edited by WiredCat

Share this post


Link to post
Share on other sites

I dont simulate rotation in my simple 2D. But i am taking all real world values of the 737-800.

I have added a picture where i print all my values.

Lift is Correct, Drag is correct, Weight is correct,Altitude Density is correct. (not taking temperature into count right now though) Thrust is correct. But still i think the airplane climbs to easy.

 

I have one thing to solve, and that is forward acceleration on desc, and backwards weight force when climbing. Then i think i would hit the numbers like in real simulators.

 

Here is a picture of my game just after takeoff (the rotation speed was a littlebit high, but this is for flaps 0!, in real life flaps 1-15 is used.)[attachment=26199:climbdescproblem.png]

Edited by KurtO

Share this post


Link to post
Share on other sites

ok so you are getting too much lift you say or what?

there are two mains problem of that that i can tell for now with so less info ;]

firs its 

 

vel = vel+acc*dt; 

pos = pos +vel*dt;

which should be 

 

because you are referencing to the old velocity

pos = pos +vel*dt;

vel = vel+acc*dt; 

 

 

 

second and main thing is 330 m/s is about 1 mach speed

 

i dont see your velocity indicator so i can guess you are doing something wrong at startup like not applying gravity and drag at all during takeoff or what

 

i would like to see the code that moves the jet and the initial values and the values you set before right after you want to move it.

 

the simulators i guess you were using if any show the speed in knots which is 1.943844490  * vel_in_m/s

 

maybe you have a problem with SI i mean you show the weight in LBS which should be in kg etc.

 

and i truly believe 737 has stabilization flight control too that means it computer will likely place elevators at an angle to get level flight

 

 

http://en.wikipedia.org/wiki/Lift-induced_drag

 

and my topic on fligh gear forum which may help you aswell

 

http://forum.flightgear.org/viewtopic.php?f=49&t=25071

Edited by WiredCat

Share this post


Link to post
Share on other sites

Ok. I just want to share how i solved this.

 

Frist misstake.

 

My thrust and drag and lift was NOT predicular to the wings. They need to be. Once they are, the vectors iteself will create drag against the weight when climbing.

After fixing my other problem (had only one engine hehe) the aircraft climbs really really well and have the same speeds as in the real 737.

 

Problem solved

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!