Accurate flight dynamic tricks

Hi all,
I’m currently in the process of converting the Zivko Edge 540 V2 that I originally made for X-Plane to Microsoft Flight Simulator (MSFS). I have the 3D model in MSFS and will be moving on to animation shortly. However, I wanted to start with the flight dynamics first.


Having spent over 4 years as a member of a Red Bull Air Race team developing the X-Plane model for training, we had it as close as we thought it could be for training in VR. The data from the plane and the sim confirmed its accuracy. I started adding our data to a new SDK project in MSFS, but it just never felt right compared to the XP version, of which I have flown countless hours.
Debug forces in the sim seemed to be in the right place, but the aircraft would stall at the wrong times, drop wings, lose power, and be unstable and erratic. The list of issues goes on. I tried creating from scratch and modifying the default Extra, but to no avail. I purchased several add-ons, including the LiveToAir Edge 540, but noticed many used target_performance.cfg files or had flight models that seemed very different from the visual model, based on the force indicators displayed and their positions.

So, I have a few questions:

  1. Can you achieve an accurate flight model from detailed real-world data?**
  2. Do you have to use unrealistic figures and tricks to replicate an aircraft’s performance and handling in MSFS?**
  3. What is everyone else’s method for achieving an accurate flight model?**

Thank you in advance for any replies and help educating me in MSFS development.

Hi @FrootLoop6795

Q1 - For weight and geometry - YES. For aerodynamics - PARTLY. Especially in the case of aerobatic, there are limits to the flightmodel SDK and internal mechanics. Some aerobatic aircraft devs reverted to using the legacy model instead to allow some more control.

Q2 - YES!

Q3 - Try & error, over and over again. The key is to understanding both real-world physics/mechanics, as well as Asobo’s way, and matching them as best as possible. For example, the stall is a weird mixture of classic tables (CL-ALPHA) and some unique “stalldef_” parameters. Still, some issues and limitations will remain.

1 Like

Thank you @ElectronVolt714
Your information is very useful and I apricate you taking the time to help me learn more. I think from what you have said, the issues I am having with the aircraft editor messing up my current flight model and the data from the aircraft not being enough to reproduce our aircraft in sim, MSFS is not currently the right choice to use and staying with X-Plane 12 is the right choice for what we are looking to achieve.
Regards
David

That’s another point you’re bringing. Don’t use the aircraft editor! It’s known to cause problems with saving and reloading. I do all my edits in a text editor. That also allows me to put in comments and do version control.

I’ve programmed the flight models for gliders in XPlane and MSFS. Modern gliders are very demanding in terms of the accuracy needed and things like flaps are hugely important so we tend to be at the hairy edge of what’s possible in any sim.

It’s certainly possible to get the flight performance you need in MSFS - the methodology (and flight model implementation) is radically different between XPlane and MSFS though so ultimately the issue is whether you’re prepared to invest the time to learn how to tweak the levers and learn the tricks of a completely different sim.

FWIW I don’t use the ‘aircraft editor’ at all - you’d have to be very early in your sim plane development career to have those text-entry boxes add any value. The most productive process for me is to edit the flight_model.cfg file as needed, use the SDK Behaviours Tool to reload the plane, and check the flight performance in-sim. The in-game debug tools are a somewhat useful to diagnose performance (particularly the stall analysis) but more important is that I instrument the aircraft to provide detailed performance figures - the most important example for me is glide ratio which is incredibly difficult to achieve for all speeds and flap settings.

Glider flight testing requires setting clear weather, deleting the wind layer in that, flying over the sea at 9am in the winter, with turbulence set to ‘none’, otherwise the atmospheric effects are too much to get the required accuracy. But we manage ok.

1 Like

Really valuable information thank you @ElectronVolt714 @B21 . I was unaware of the issues with the editor, I have been developing for Flight simulators a long time now, since FS98 and Fly/Fly II days in fact so I am happy to invest the time, I found the gizmos of interest as far as setting contact points but from what you are saying I guess using gizmos and then noting down the values as apposed to saving the resulting file would mean far less frustration, I spend my working day pretty much in VSCode the whole time so that workflow will fit MSFS dev work I guess I will persevere awhile longer to see where it leads, right now there is no delivery date to get something in the pilots hands so, no pressure.
@B21 a little off topic but with gliders I imagine you might have experience with winglets?, if so do you have a way of dealing with them? We have 3 different winglets we can fit to the aircraft and the subtle differences really would be nice to have in sim if the FD is exacting enough to model them, I know Austin told me XP didn’t model winglets as such but he is looking at it to see if it easily can.

there’s a ‘has winglets’ flag in the flightmodel.cfg, but that’ll be for a relatively simple adjustment of drag and I’m a bit dubious it does anything that couldn’t be done with other drag parameters. In general the FSX/MSFS flight model has a significant tilt towards the plane being represented as a lot of flat plates tilted at different angles into the airstream, and you add up the lift and drag values for all of them. The big change from FSX to MSFS was to radically increase the number of plates being modelled, but you can see this is quite different than a more traditional ‘aerodynamics equations’ based flight model. Hence my suspicion that any treatment of winglets will be very simplistic in MSFS.

Ultimately you learn there are some parameters that really help you get the performance curves right (drag_coef_zero_lift_mach_tabis an absolute classic) and when you’ve got the plane performing the way you want it the MSFS simulation of winds bumping into your plates actually has a pleasant feel when you’re in situations where the macro effect of that matters. But the hard part is getting the exact performance you want.

The relatively new stall parameters are really important. Again the sim is not really relying on a solid aerodynamic equation for the wing, but it’s giving you parameters you can adjust that radically affect the performance of the plane at speeds that can extend far before the stall happens. So if you don’t pay attention carefully to those parameters you might as well not bother with the carefully constructed AoA/lift curve you programmed.

You can get a good result, a big jet with big engines and big flaps will be quite forgiving in these aerodynamic settings, but for a nimble aircraft expect a lot of trial and error testing.

Hello,

there is a new Debug window in the FS2024: “Debug Aircraft Wind Tunnel” which can help you to check general aerodynamics characteristics for the particular aircraft configuration and conditions. You can also set atmosphere to calm conditions (no wind, no turbulence) via a checkbox in this window.

Hope it will help a bit to achieve desired polar and glide ratio.

3 Likes