Jump to content

Flight Dynamics (Flight Simulator)


Andy Gilbert
 Share

Recommended Posts

Hi, a few may have seen my previous still-work-in-progress paragliding simulator, well i decided to set out and try and impliment some true flight physics into leadwerks using NGD and this video shows where im currently at with it.

 

So, all written in lua (prototyping), full true flight dynamics based on real data, this particular video is of a Cessna 172, it uses true airfoil data and true lift and drag coefficient tables of the NACA 2412 airfoil.

 

Although i intent to split it up further, this model uses 8 sets of airfoil geometry (including undercarridge & fueslarge as they also cause drag) but everything is set in lua tables so it would be easy to grab some real data for anther aircraft, input the values and it should come out ok, i have done this for a glider and it worked great to my surprise.

 

This is only a short (rushed) video due to filesize and time, but shows it working.

 

Somtimes the "movement" looks a little jerky, this is mainly down using a keyboard to fly, so the control movement isnt smooth but instead a sharp input of full controll surface movement (full elevator and ailerons effect).

 

Also developed a wind object that can be configured the plane takes into effect.

 

 

Thanks

Andy

  • Upvote 3

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

 

Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d

Link to comment
Share on other sites

Looks great Andy. Nice work on the physics!

 

I'm fascinated by the terrain and texture mapping used here. Am I right in thinking you are using a few high res textures for the grass and runway in the airstrip area and then a higher altitude photographic texture for the remaining surrounding landscape? It looks so natural and effective!

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

That's really good. NGD is Newton yes? Are you calculating all the forces and applying them in the physics callback?

 

And you've implemented a credible look-up flight model. Does it have proper wheels for the undercart too or not implemented yet? (I'm having real problems with that as the Apache is a tail dragger with a jointed tail wheel, has never worked right).

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Hi pixel. That's exactly what it is and this might turn into a small rant but your post made me realise something. In the video I was obviously showing the physics and I have always gone with the intentions that once the physics is near I will concentrate on scenery etc. but after watching the video back I realise that despite the scene quicky made up of just a flat terrain, single large format texture of fields and a single later of grass with a normal map it actually looks good enough for a sim. Which relates to a post I read on here a while ago that sometimes we try to much to make something look good when it isn't needed. So yes the scenery is a single flat terrain, a large texture as the base no normal map and a grass texture with normal map blended in.

 

If you look at my other videos on YouTube I have built arieal photography uav that I use to capture arieal textures.

 

Flex, thanks for the comments. It does use the physics hook for the physics. This was a recent addition due to sometimes developing on my laptop then sometimes on my main computer and inheriting the obvious issues. So yes it now uses the fixed physics update. I calculate all forces up the calculate the torque based on the indivual forces appiled to each airfoils position. Currently it doesn't use true wheels (code is there but commented out) this is due to some issues I'm having that I'm still thing to figure out.

 

Thanks

Andy

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

 

Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d

Link to comment
Share on other sites

Thanks Red.

 

Flex, also wanted to add that I try to follow your Combat Helo sim, looks real good, is it intenting to become a commercial project?

 

Andy

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

 

Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d

Link to comment
Share on other sites

Thanks Red.

 

Flex, also wanted to add that I try to follow your Combat Helo sim, looks real good, is it intenting to become a commercial project?

 

Andy

 

Yes it's going to be a commercial combat sim. The helicopter flight model works in the same way, process the dynamics using a library called HTR (the same one available for Flight Simulator X) and updating the forces in the physics hook.

 

The undercart has always been a problem. I've tried different things and nothing satisfactory yet. HTR doesn't model it as in FSX there's a flag that says "I'm on the ground now" and control is handed over to the native engine to deal with the ground dynamics.

 

I wanted to do strut compression but the A frame shape of the undercart on the Apache is difficult to work out (for me anyway). We got something working but what happened was the wheels would sometimes get left behind. Joint stiffness doesn't work at all.

 

Anyway, one of those problems to iron out later.

 

Looking forward to reading/seeing more.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Sounds really good. And also very interesting to read about the undercard being left behind. I think my last post before this one in the programming section is referring to the exact same issue when trying to use the vehicle class as a undercart chassis, but the wheels get left behind until slowed down and they catch back up again.

 

But yes a problem that ill cross when I need to.

 

Andy

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

 

Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...