Unable to set manifold pressure in SU4

3 years ago I asked for a system to control manifold pressure and other engine parameters, but I was ignored, so I had to make a work around.

Other than that I have been constantly asking for piston engine and propeller improvements.

Note: Turns out this was about pressure and not temperature.

Hi @EPellissier ,

In my case, with FSR500, I am just running some updates loops at 120hz to write simvars while the pilot is on reverse mode and beta range on ground, the package is msfs 2020, pushed to msfs 2024 via the normal workflow.

With SU4, I see the variables jumping suddenly (as if, they stop updating for a bit, then continues), is this expected based on your understanding of what has changed?

Just trying to help you understand what we doing as 3rd party devs, lots of developers are using these loops to run their custom simulations, such as, inject custom fuel flows, custom turbo NG, ITT, and many other engine conditions using the “writeable” simvars available in MSFS.

I mostly do this via WASM, however during reverse / beta ranges on turboprops I found the core sim fighting my updates so hard, that I was forced to move to RPN at high frequency loops, this is working great in MSFS 2020, and up to SU3 in MSFS 2024.

Hope this give you guys more context.

Best,
Raul

We are not given the tools, so we have to make the tools ourselves.

The documentation states: The added bonus is that input events are only executed when they are needed, so it’s far cheaper to get an animation value using the cached value inside the input event rather than recalculating it every frame in the animation code. which is a bit different to what you wrote.

As you know we don’t have infinite resources that we can dedicate to your requests - priorities have to be set.

Best regards,

Eric / Asobo

Would you be able to provide me with a list of those SimVars that you see jumping? We have an idea to fix @MrTommymxr’s issue regarding the manifold pressure, and the mechanism could potentially be applied to other SimVars.

Best regards,

Eric / Asobo

Unfortunately we cannot really act on such assumptions - have you had reports of some of your aircraft not working as expected in SU4?

Best regards,

Eric / Asobo

1 Like

I’m working on it!

1 Like

I am sending you my XML code via Private Content :slight_smile:

Best,
Raul

1 Like

I know, and every developer has their own unique problems and solutions as well as different priority levels.

The thing with input events in FS24 is that they are not executed when they are needed. Hence why they are running slow. You can see in the example that they run at around 0.5-0.3x the normal speed. This then breaks their functionality for animations.

I used Input events for my gear simulation and sequencing, but in FS24 I had to move them to GT_ANIMs because they were moving slow and inconsistent.

[quote=“EPellissier, post:46, topic:16696”]

have an idea to fix @MrTommymxr’s issue regarding the manifold pressure,

[/quote]

If you are making a forced manifold pressure system, may I request that there be absolutely no filtering or smoothing of the set manifold pressure. The game has a smoothing system built in which disturbs the functionality of my engines. I tried using input events to control the throttle separate from the user, just like the working title FADECs. But this caused the engine to stall as the manifold pressure increased too slow. Manually setting the Avar like i do has no smoothing.

Disregard, i was not using su4.

This is still su3. I will check in a few hours

Nope the 1000hz fix doesn’t work.

Just tested 1.6.31
It’s better but still 7% low.

1 Like

I reverse engineered the Engine model so I know that for X torque I need Y manifold pressure.

So, one thing I do is that I check the manifold pressure Avar and compare it to the value I want. Then use a simple Integral calculation to create a correction factor.

In FS20 this would always hover around 4-8%, depending on framerate and other factors. In FS24 Su3 it hovers around 8-12%. After this update, the correction factor is 0%.

In Simvar Watcher I get 3 different behaviours depending on the game. Eg:

FS20:

  • Set and read Manifold pressure var match.
  • Correction value 6%.
  • Engine performance matches.

FS24 Su3:

  • Set and read Manifold pressure var do not match. Read value is 8% higher than set.
  • Correction value 8%.
  • Engine performance matches.

FS24 Su4:

  • Set and read Manifold pressure var match.
  • Correction value 0%.
  • Engine performance does not match.

In Su4, If I force 6% correction factor I get the correct engine performance, so that’s better than Su3 where 8%+ is needed.

If I may speculate:

FS20:

  • Avar is set
  • Game processes
  • Avar is read by plane and Simvar watcher

FS24 Su3:

  • Avar is set
  • Avar is read by Simvar watcher
  • Game processes
  • Avar is read by plane

FS24 Su4:

  • Avar is set
  • Avar is read by plane and Simvar watcher
  • Game processes

Hello @MrTommymxr

The deployed fix addresses the regression introduced specifically with SU4.

I have plotted manifold pressure, torque and rpms on your Da42-VI in SU3 and SU4 and couldn’t see any noticeable difference.

So my understanding is that any difference left comes from the difference of implementation between MSFS 2020 and 2024, which we discussed here:
Input events slow - [MSFS 2024] Bug Reports - MSFS DevSupport

Regards,
Sylvain

As said in my previous post, there appears to be a difference in the way the vars are read. The plane (xml) and engine model see different vars in SU4. In FS20 and SU3, the plane and engine model saw the same manifold pressure. If these don’t match, then the correction loop doesn’t work and the engine performance doesn’t match.

This will now be proven by the screenshot below

Fs20:

  • Set: 2.551
  • Correction: 6%
  • Plane reads: 2.592
  • Simvarwatcher reads: 2.591

Result: Correct engine performance.

Fs24 SU3:

  • Set: 2.552
  • Correction: 8%
  • read: 2.559
  • Simvarwatcher reads: 2.764 (2.552*1.083 = 2.763)

Result: Correct engine performance.

Fs24 SU4:

  • Set: 2.552
  • Correction: 0%
  • read: 2.552
  • Simvarwatcher reads: 2.552

Result: Incorrect engine performance.

If the engine model is not getting the correct manifold pressure, then the performance doesn’t match.

In your screenshots there is still a measurable difference from ~216 to ~209.

Here is the correction loop + read value.

(L:FADEC_SET_MAP_FIX:1) (L:FADEC_SET_MAP:1) (A:RECIP ENG MANIFOLD PRESSURE:1, bar) - 0.01 * + 1 max 1.15 min (>L:FADEC_SET_MAP_FIX:1)

(A:RECIP ENG MANIFOLD PRESSURE:1, bar) (>L:FADEC_SET_MAP_READ:1)

For testing I am locking the correction factor to 6%

However the zoom and menu issues still exist

Also at lower settings, less correction factor is needed, disrupting the engine tuning.

I see what you mean here. So it’s a bit more complicated than what you suggest but there’s a bit of truth in there.

There is more than one source to the issue here:

  • Your implementation in MSFS 2020 already is framerate dependent. Your fix lvar varies from 6 to 9%, depending on my graphics settings (so torque varying between 300 and 308 Nm)

  • You introduced some specific lvars for MSFS 2024, but the detection does not always work. For example if you restart a flight, your FIX_FS24 lvar is not reset to 1. Your writing of manifold pressure in a component update then no longer occurs.

  • The manifold pressure simvar you write fights with the sim own evaluation:

    • If you don’t write it for a lapse of time, the value will converge back towards the sim computed one. Your configuration of engines.cfg is such that the sim will output a very low manifold pressure, so this can cause big fluctuations in the simvar value.
    • If you write it more often than the sim does, your fix is evaluated with your own output value rather than the one from the sim
  • The reading, fix evaluation and writing of the manifold pressure simvar are in separate components, in different xml files. With the changes made in SU4, in regard of parallelization, this means the sequence in which those are evaluated is subject to changes.

So, you have:

  • a 30Hz update component that reads the manifold pressure simvar
  • an input event that writes the manifold pressure simvar corrected with your fix
  • a 100Hz update component that also writes the manifold pressure simvar corrected with your fix

What happens is that you are writing the simvar more often than the sim, especially your 100Hz component. So you end up “poisoning” your own 30Hz fix evaluation with the value you wrote yourself instead of the output of the sim.

We don’t really have a way to handle such designs with a feedback loop at the moment, where we could guarantee a consistent sequence between reading, writing and updating the sim.
However, there are several ways to mitigate this to get closer to the behavior you are expecting:

  • Read the manifold pressure, evalute your fix and write the simvar in the same update component.
    For example, if you move everything to your 100Hz component, you’ll notice the behavior is a little bit more consistent, although it still suffers from being framerate dependant (low framerate means low simulation update, means the value you write plays a bigger role than the sim)

  • Move this in a ASOBO_GT_Anim_Code component. This will be updated with a frequency that roughly matches the simulation update. You will therefore more consistently read the output from the sim, rather than the value you wrote yourself the precedent cycle.

  • As mentionned above, the value oscillates between what you write and what the sim outputs, which in your case is a very low manifold pressure. Configure your engines.cfg so that it outputs a manifold pressure that is a bit less aberrant, and this will reduce the gap your fix needs to fill.

Regards,
Sylvain

@FlyingRaccoon we do the same using an Update to read the variable and feed it to an interim L:var. Then the Lvar is fed to an Avar through an InputEvent to match the sim rate.

This approach worked in 2020 and 2024SU3. I will re-test it in SU4, but do you see any reason for us to switch to 100Hz updates or Anim_Code_Template?

1 Like

In Fs20, Input events run faster than the native frame rate. The event updates when the manifold pressure updates. I can achieve ~3-4x the native framerate with input events.

I never experienced this. Additionally this value is now statesaved.

In Fs24 the component frequency is now stable, with the in game calculations running at 100hz. Setting the map at 100hz was the most stable.

This no longer works in Su4, because the plane now reads the manifold pressure before it is processed by the game, as shown by my screenshots.

I cant do that because idle and low power settings will now be inaccurate.

None of these suggestions fix the camera or menu issue either.

Also a 1% difference in manifold pressure causes 2-3% power change. Aircraft engine/props are certified within 3% of eachother. This update equivalently removes the airworthiness certificate on my aircraft.

1 Like

As this is now “by_design”, does this mean we get and official method to perform these actions?

1 Like