• 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.

FS2004 Is there a way to reduce the thrust at runtime?

Messages
22
Country
italy
Dears,

I am trying to simulate things like bleed air, icing and other things that eventually come down to a reduced trust. As manipulating the throttle is not really what i need, and it's not easy to handle with autothrottles, I was thinking if there is a way to modify the "trust_scalar" at runtime; otherwise something that increases the drag might work... Or, for prop aircraft, something related to the prop efficiency..... maybe by means of manipulating some FSUIPC offsets this is eventually possible. Any idea?
I tried to adopt fake spoilers for this purposes and to increase the drag with some XML gauges.... but no, that's not working: for some reasons the key to set the spoiler handle position is failing unpredictably, ending up in not moving the spoilers at all. Only the keys SPOILER_ON and SPOILER_OFF seems reliable, but that's too much of a on/off effect... i need some "graduality". So a gauge handling extra drag in this way is not feasible.
 
Quoting from my own document (sd2gau):

There are serious problems with the spoiler settings;
1. KEY_SPOILERS_SET is utterly snafu when on the ground. Don’t use it. (Note: seems to be fixed in FSX but not thoroughly tested).
2. KEY_AXIS_SPOILER_SET starts to get unreliable at extreme ranges, so you will need to trap them at those points.
3. KEY_SPOILER_ARM_SET,[value] simply bangs you through to full deployment and ignores [value]
4. KEY_SPOILER_ARM_ON does the same.

For ground settings use KEY_AXIS_SPOILER_SET . This code example is taken from an AGS (automatic ground spoiler) setup where pos is the extension setting for the spoilers:-

Code:
void setSpoilers(int pos)
{
if(!pos)send_key_event(KEY_SPOILERS_OFF,0); //Trap the lower end
else if(pos>16000)send_key_event(KEY_SPOILERS_ON,0); //Trap the upper end
else send_key_event(KEY_AXIS_SPOILER_SET,pos); //Anything in between
return;
}

Wade Chafe adds the following comments regarding KEY_SPOILERS_SET:

‘The thing is KEY_SPOILERS_SET sets the position of the spoiler handle, not the spoilers themselves. When the handle is armed the value returned from HANDLE_POS is 4701 so I guess they needed the variable to relate the handle position, thus anything below 4800 has no effect. I've also found some of the XML variables to be more reliable. The relationship between setting KEY_SPOILERS_SET and actual spoiler position is:
Code:
spoilers_value_to_set = spoilers_needed/sqrt(2.0)+4800;
'
 
Last edited:
Hi,

1. KEY_SPOILERS_SET is utterly snafu when on the ground. Don’t use it. (Note: seems to be fixed in FSX but not thoroughly tested).
2. KEY_AXIS_SPOILER_SET starts to get unreliable at extreme ranges, so you will need to trap them at those points.

Thanks for the feedback. Actually i tried these both.... won't change much... both unreliable and not only at the extreme or on the ground... i would say unpredictably unreliably in each situation. I tried the KEY_AXIS_SPOILERS_SET at mid range and sometimes it works, sometimes not... i even tried to first always extend spoilers fully, then trying to reduce them.... none... won't work reliably.... seems like certain values are working, certain not.... so if you "sweep" spoilers you can get something, if you are insisting on certain values, no change. I eventually gave up on them :(
No other smart way to increase drag/reduce power at runtime?
 
That's a bit odd. I used the spoilers to simulate water drag for various parts of the takeoff/landing run on the B-314 Clipper and it works perfectly.

Ah. A possible thought. Check spoiler_extension_time under [airplane_geometry] in the aircraft.cfg file. If it's too long then yes, it will give you problems because you may be trying to set a second value before the previous value has been reached.
 
Will need to check that, but it looks strange. If I "sweep" (i.e. change potentially prior to reach the spoiler position) it works.... or at least, the spoilers move. If I send static values, it works 1 times over 3.
Furthermore, the command should control the axis, not the actual spoiler position. So what's the relation with the actual speed of spoiler movement?
What I might be doing is flooding the key: i simply check disparities between desired and actual position, and in case write the key..... I might put a timer to prevent the flooding...

PS: should the system work, how would you suggest to combine it with planes that actually have spoilers?
 
I suggest you look at the SDK for FS2004 to see what that sim allowed you to do with spoilers. From FSX onwards you can set variable amounts of spoiler extension.
Roy
 
SDK only speaks of KEY_SPOILERS_SET and KEY_AXIS_SPOILER_SET.... both control only the handle. The first goes 0->16383, the second from -16383->+16383. BTW, the same as following versions, including P3D.
 
In FS9 i used to set the spoiler by

XML:
       (L:SpoilM_Axis_Set,number) (>K:SPOILERS_SET)

(L:SpoilM_Axis_Set,number) is calculated by different condition
e.g . hydraulic fehler, position of spoilerlever, shut off valves, spoiler blow down, ...

XML:
  1000 (>K:SPOILERS_SET)    spoiler NO Armed
  4800 (>K:SPOILERS_SET)    arms spoiler position
  5384 (>K:SPOILERS_SET)    gives full spoiler on ground spoiler armed
  5800 (>K:SPOILERS_SET)    start with this value
 16384 (>K:SPOILERS_SET)    max value
  7384 (>K:SPOILERS_SET)    for example

++++++++++++++
also i use because i have my own spoilerlogic

<!-- Switch Off MS Event -->
      (A:SPOILERS ARMED,bool)
      if{
        (&gt;K:SPOILERS_ARM_OFF)
        }
 
I think I found how to make spoilers work. The problem is that sometimes the values are ignored.... not clear why... making the desired % spoiler values oscillating a bit, seems to work.... it's like the spoiler axis needs to be pinged with different values for it to trigger. The code below, seems to work.... refinements are possible (like to refresh it every seconds or so)
XML:
    (G:Var1) 1 + (>G:Var1)

    233 (L:desired_spoilers, number) * 6981 - (G:Var1) + (>K:AXIS_SPOILER_SET)

    (G:Var1) 2 == if{ 0 (>G:Var1) }
 
Last edited:
Back
Top