Jump to content
  • Advertisement
Sign in to follow this  
deltaKshatriya

Question about aircraft physics.

This topic is 2461 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'm not entirely sure how climbs work. In my simulation, when the aircraft is put into a climb angle, the aircraft requires more velocity to climb, and then it seems to curve when doing so. When put into a dive, the aircraft goes into a curved climb, due to the lift of the wings. Is this because of too much lift, or is this an inaccurate simulation?: I've got straight motion flight down though...any ideas?

Share this post


Link to post
Share on other sites
Advertisement
I'll admit I don't know much about aircraft wing physics other than regular college math, but it is hard to answer your question without looking at the equations you're using for calculating your motion.

A quick Google led me to a site (http://www.ajdesigner.com/phpwinglift/wing_lift_equation_force.php) that list a few equations for calculating different wing forces. These equations are in the scalar format, so you might want to find (or make) vector versions to include the direction.

A general observation: you mention that your aircraft climbs instead of diving. Are you sure you're using the right wing surface (it should be the top surface) for calculating dives? It looks like your lift force continues to point upwards even when you're diving.

Cheers
~dd~

Share this post


Link to post
Share on other sites
I'm using the local up vector for the wing for adding lift. That's the exact equation that I'm using for my calculations as well. The aircraft goes into a sort of curved climb, as if the lift on the wings is actually pushing the aircraft on that trajectory.

Share this post


Link to post
Share on other sites
Yea, I change the lift coeffiicient of the tail stabilizers to get the effect of an elevator. I'm still working on getting the aircraft into a dive, by use of elevator, but I've got most of that figured out...

Share this post


Link to post
Share on other sites
I think you need to explain exactly what you're trying to do, what you've done already, and a bit more about the problem - things are a bit unclear at the moment.

Here's my current pet project - probably quite relevant :)

Share this post


Link to post
Share on other sites
Alright, so I'm trying to get a basic flight simulation working. I've figured out how to calculate lift on the wings, from the equation that darkdesigns posted a link to. Currently, the simulation works when in straight flight. Whenever the aircraft changes it's angle to go into a climb or a dive, instead of diving, the aircraft's lift pushes the aircraft into a curved climb. When put into a climb, the aircraft for some reason needs more velocity to go into a climb, and when climbing, the climb is curved, as the lift of the aircraft's wings is pushing it into a curved trajectory. I'm not entirely sure if this is due to an extremely high lift, or if I am doing something wrong all together. The lift force is added to the local up vector of the wing, and the thrust is added to the local forward vector of the aircraft, and the drag is added to the local back vector of the aircraft. I hope this explanation helps a bit...

Share this post


Link to post
Share on other sites
The first thing is that the lift force is always perpendicular to the airflow relative to the wing. Similarly the drag force is aligned with the airflow relative to the wing. This is not the same as the local wing/aircraft vectors.

What that means in practice is that you first calculate the airflow relative to the wing (taking into account the background wind, if there is any, as well as the velocity of the wing itself). Then you ignore the component that's going along the span of the wing. So you calculate:

x = direction from leading edge to trailing edge of the wing
y = direction upwards perpendicular to the wing
z = direction along the wing

u = airflow component in the x direction
v = airflow component in the y direction
w = airflow along the wing's span - ignore this for now

Then calculate angle of attack = alpha = atan2(u, v)

You can find tables of coefficient of lift versus angle of attack, but for starters you can just approximate that CL is proportional to alpha - approximately CL = alpha * 0.1 (when alpha is in degrees) for a simple symmetric aerofoil. Beyond +/- 12 degrees or so the wing will stall and then things are different!


The airflow speed is simply sqrt(u^2 + v^2)

You can then find simple equations to give the lift force (e.g. that link) and drag force. For starters, just use

CD = CL * CL * CDInducedFrac
CDInducedFrac="0.2"
dragForce = Area * 0.5f * speedSq * CD;

The drag force acts along the direction (u, v, 0) in the space of the wing (so you need to transform it into world space).

The lift force acts at 90 degrees to this - so along the direction (-v, u, 0) in the space of the wing.

To model control surfaces you can do this by either adding an offset to the CL curve - so CL = control * constant + alpha * 0.1, or you can make your controls "tilt" the whole wing - effectively just adding a little offset to the angle of attack that's calculated.

Hope this helps and is clear enough (sorry, a bit rushed).

Share this post


Link to post
Share on other sites

Alright, so I'm trying to get a basic flight simulation working. I've figured out how to calculate lift on the wings, from the equation that darkdesigns posted a link to. Currently, the simulation works when in straight flight. Whenever the aircraft changes it's angle to go into a climb or a dive, instead of diving, the aircraft's lift pushes the aircraft into a curved climb. When put into a climb, the aircraft for some reason needs more velocity to go into a climb, and when climbing, the climb is curved, as the lift of the aircraft's wings is pushing it into a curved trajectory. I'm not entirely sure if this is due to an extremely high lift, or if I am doing something wrong all together. The lift force is added to the local up vector of the wing, and the thrust is added to the local forward vector of the aircraft, and the drag is added to the local back vector of the aircraft. I hope this explanation helps a bit...


Isn't this to be expected? Look at the following video. I know this tiny thing might actually work a little different though. ;) Maybe your airplane is not heavy enough?

Share this post


Link to post
Share on other sites
Alright, so the lift does not always act as the local up vector of the wing.........MrRowl's explanation certainly clears up things, it's just that I haven't really made any of the airflow things simulated in this project....so my next question is how is airflow calculated for the components mentioned?

And as for MadHed's video, for some reason, when climbing, the aircraft requires an increase in velocity....I have no idea why that is, but it seems that MrRowl has shown that my physics are a bit off.....

EDIT:

Actually I think I get how the airflow works, but if there I just want to clarify how it is calculated....

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!