• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Another spoiler question

Another trick I use is to place all script that requires frequent evaluation in an <Update> section, wrapped in some timer script. For example:

Code:
  <Update Hidden="Yes">
    <!-- 1 SECOND UPDATE -->
    (P:Absolute time,seconds) 1 % 1 > !
    if{
          (* everything that requires frequent updating *)
      }
  </Update>
 
Very interesting.

This could be why big glass cockpit screens were taking up so much system resources, lowering frame rates in the sim...
 
I don't think so, not if well programmed. This problem is usually related to systems behind the scenes and 'fudges' like this one to make limiters and such like. Glass screens are usually slow just because they require a large rendering area, they don't usually need to be continuously sending key events.
 
Oddly enough, my "fudge" of limiting to a 1 Hz update rather than simply accepting the default 18 Hz update demonstrably increases frame rate by a rather significant factor. ;)
 
That it does. I usually end up with a set of updates like that: some every couple of seconds, some every second, some three times a second( don't ask) and one or two at the full refresh rate.
 
I don't really worry about the code repeating unless the phrase has a K: variable in it - then I make sure it executes only once. Seems reasonable to me.
 
I don't really worry about the code repeating unless the phrase has a K: variable in it - then I make sure it executes only once. Seems reasonable to me.

Repeated setting of (>L:var,unit) types can and do cause FLOODING on a Multi-Player server though...

They are particularly difficult to identify and isolate though, since they are all sent as "unidentified events..."
 
Thanks Guys,
Useful info! All I'm doing is to model the overspeed situation. For example to initiate an emergency dive the spoilers are hung out to dry and right through the dive the airspeed needle must be over the wasp. If you don't pay attention to your attitude then as you get down below 30,000ft the airspeed excellerates rapidly putting you well outside the Vno. So in order to not tear the wings off and to save themselves the spoilers blow back. Also if a careless pilot decided to extend the spoilers in order to reduce his airspeed from 345kts or above they won't fully extend.
Have just come back from a few days in the UK which included a round trip to Cyprus in a rear four engined airliner with a T tail. Fully laden we unstuck from Brize Norton at only 2,300ft down the runway. Now, what was the name of that aircraft??? :-))
vololiberista
 
I have tried
Code:
<Value>(A:SPOILER HANDLE POSITION,position) 4097 &gt; (A:AIRSPEED INDICATED,Knots) 345 &gt; AND if{  4096 (>K:SPOILERS_SET) }</Value>
It doesn't have any effect at all :-((((((((
vololiberista
 
That's odd that setting L: variables would cause flooding in Multiplayer, since it appears that none of those actually work on the other person's plane! :)
 
That's odd that setting L: variables would cause flooding in Multiplayer, since it appears that none of those actually work on the other person's plane! :)

Tom, they don't work unless the other user's aircraft uses the same L:var...

And sending an L:var once or even twice every few minutes does no harm...

...but sending any variable, L: or A: repeatedly eighteen times per second is a REAL problem as it wastes bandwidth! :eek:
 
Last edited:
Repeated setting of (>L:var,unit) types can and do cause FLOODING on a Multi-Player server though...

They are particularly difficult to identify and isolate though, since they are all sent as "unidentified events..."

http://www.robbiemcelrath.com/blackbox/?download

This is a great tool, setup takes a few tries, but it can and will identify any to every A-Z:Var on the specified gauge(s) in realtime, great for many aspects of gauge design, and identifying proper/improper functions and finding wasteful transmissions.
 
Sol - ved!
But I'm curious as to how or if as said above it can flood the system.
vololiberista
Code:
<Update>
(A:AIRSPEED INDICATED,knots) 345 &gt; if{ 4191 (>K:SPOILERS_SET) }
</Update>



NO !!! Please don't do that !!!!

If Indicated speed is greater than 345 knots, you will FLOOD k:Spoiler_SET key events at Gauge update rate !
Every time you test and find that speed is greater than 345 knots, you go and set the Spoiler to 4191, even if it already there. !!

Use Logic that only sends K:SPOILER_SET if spoiler needs to be Moved.

ie

If (Airspeed > 345)
{
if (Spoiler # 4191) Spoiler_SET = 4191;
}
else // when AIrspeed <= 345 Knots
{
if (Spoiler # 0 ) Spoiler_SET = 0;
}
 
Last edited:
NO !!! Please don't do that !!!!

If Indicated speed is greater than 345 knots, you will FLOOD k:Spoiler_SET key events at Gauge update rate !
Every time you test and find that speed is greater than 345 knots, you go and set the Spoiler to 4191, even if it already there. !!

Use Logic that only sends K:SPOILER_SET if spoiler needs to be Moved.

ie

If (Airspeed > 345)
{
if (Spoiler # 4191) Spoiler_SET = 4191;
}
else // when AIrspeed <= 345 Knots
{
if (Spoiler # 0 ) Spoiler_SET = 0;
}

Try:
Code:
<update>
 
(A:Spoilers Left Position,radians) 4191 &gt;  (A:Spoilers Right Position, radians) 4191 &gt; || (A:AIRSPEED INDICATED,knots) 345 &lt; &&  if{ (A:Spoilers Left Position,radians) (A:Spoilers Right Position, radians) + 2 / (&gt;L:SPOILERS_POSITION_PREVIOUS,radians) }

(L:SPOILERS_SET,radians) (&gt;K:SPOILERS_SET)  

(A:Spoilers Left Position,radians) 4191 &gt;  (A:Spoilers Right Position, radians) 4191 &gt; || (A:AIRSPEED INDICATED,knots) 345 &gt;= && if{ 4191 (&gt;K:SPOILERS_SET,radians) }

(A:Spoilers Left Position,radians) 4191 == (A:Spoilers Right Position, radians) 4191 == || (A:AIRSPEED INDICATED,knots) 345 &lt; &&   if{ (L:SPOILERS_POSITION_PREVIOUS,radians) (&gt;L:SPOILERS_SET,radians) }  

</update>

OK now that I know better what you are trying to do... please try this code. It should set the limit on the spoilers only if spoilers are set above the limit setting at your proposed speed. Sets the limit once, then returns spoilers to pilot's previous setting before the limit was engaged. Not sure if the ,radians unit entry is correct, that you may have to play with. But this code should do what you want and should not flood the server. Anyone dissagree?

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This code is incorrect, close but not really. It's actually way more complicated, but solved. See my code on pg 3.
 
Last edited:
Another thing is I really am trying hard to figure out why ( K : Events ) are even sent out to a multi-player server online, I can understand for the purpose of slaving several computers in a rig for a single cockpit. But you are already sending out all the readable ( A : vars ) that give more than the required info. A mult-player server should read user aircraft the way FSX reads data from AI planes, but include some more ( A : vars ) . That's about the size of it. Is there some plauseable reason for this or was this just a very big "oops" in the production of FSX?
 
Back
Top