Negative flaps getting reported incorrectly

Version:

1.33.8.0

Frequency:

Consistently

Severity:

Not up to me to decide, it would affect anyone writing flight assistance/autopilot code using SimConnect.

Context:

This happens for the Maule M7-235, installed via the marketplace.

Bug description:

Based on How do I get the actual current flaps angle? it looks like there’s a bug in the way MSFS determines flaps angle, vs how SimConnect does the same. When the Maule is loaded in, with the flaps lever set to notch 0, the in-game HUD displays a flaps angle of -7 degrees. According to the folks who made it, that is the correct angle. However, when querying this value using SimConnect’s TRAILING EDGE FLAPS LEFT ANGLE the reported angle is 0. Additionally, querying the flaps at notch 0 (which should be 0 degrees flaps in the Maule) the SimConnect value is yields 0.15 radians, i.e. 9 degrees.

To confirm that something odd is going on I also tested this with the Asobo Pipistrel Virus SW121, which reports a flaps angle of -5 degrees when the flaps lever is at notch 0 in-game, and querying the angle using TRAILING EDGE FLAPS LEFT ANGLE for this plane works fine, reporting -0.087[…] radians, which maps to -5 degrees.

Given that the game itself knows the correct angle for the Maule, it feels like somehow MSFS might be calculating the flaps angle differently in-game, compared to what SimConnect has access to, which is probably a bug irrespective of whether the folks who made the Maule forgot something or not. If MSFS itself can show the correct value, SimConnect should be able to, as well.

Repro steps:

  • Start a flight on the ground with the Maule M7-235
  • ensure the flaps lever is at notch 0
  • go to the external view, with the HUD set to “full”
  • observe that the flaps angle gets reported as -7 degrees
  • in the SimConnect watcher fetch the TRAILING EDGE FLAPS LEFT ANGLE using radians as unit
  • observe that the reported value is zero.

Repeat this with the Pipistrel, and observe that both the in-game HUD and SimConnect report -5 (with SimConnect reporting the value in radians, -0.0872…)

Attachments:

Pipstrel:

Maule:

The numbers displayed in the HUD are purely lookup strings (flap index → display string) from cockpit.cfg, with no relation to the flap degrees.

This is very useful in allowing you to manipulate the flight model to get flap angle values that ‘work’ without the sim pilot needing to know what tricks you’re using under the hood. Flaps have been very simply modelled in the MS flightsim frachise for a very long time so this is needed (e.g. using zero flap to fake out negative flap). The gliding update added new flaps parameters but few devs have updated to those yet.

Hello @TheRealPomax

This is not a bug with MSFS.

The TRAILING EDGE FLAPS LEFT ANGLE simvar will return a value based on what’s configured in flight_model.cfg.
The external HUD will map that value using what’s configured in the FLAPS_LEVEL section of cockpit.cfg if that section exists. If not, it will fall back to the AIRCRAFT FLAPS HANDLE ANGLE gamevar.

In the case of an aircraft where what’s set in flight_model.cfg and cockpit.cfg does not match, you want to do something similar to what’s done for the HUD.
You can check the Digital_Altimeter.js and Analogic_Altimeter.js files provided with fs-base-ui to see the HUD implementation.

Regards,
Sylvain

1 Like

Hmm, where would I find those? Because I don’t seem to have those in my samples directory anywhere.

fs-base-ui is a package distributed with the base game files.
You can use a tool like Everything to locate such files easily.