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.
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.
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.
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.
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.
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.
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.
@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?
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.