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

P3D v4 Drag Chute alternative variable for animation.

Messages
180
Country
unitedkingdom
Can anyone suggest an alternative simulator variable for a Drag Chute that provides a braking effect and can be tied to a cockpit lever mouse react and animation?

The Model external drag chute deploy and stow is working with a modeldef entry.

My aircraft currently uses drag for flaps and airbrakes, so I don’t think I can use them again or can I add a separate set of airbrakes for the drag chute to use?

Thanks,
Tyler
 
What I use in my addons for aircraft that have a drag chute: set the Spoilervalue to 1500 - 2000 or so when the chute is deployed (probably an Lvar in the model ? )
Works perfect.

Tip: normally, the value of the SPoiler Avar is between 0 (retracted) and 100% (fully deployed).
However, the Spoiler can be commanded to a value 2 power 31 (so extremely high) , which indeed has the expected FDE effect and can also be read in the Avar.

So:
1500 (>K:SPOILERS_SET)
will result in
(A:SPOILERS HANDLE POSITION,percent) = 1500
and has the expected high FDE drag effect.

Not perfect of course (because of the usual model position definition of the Spoilers in the FDE), but assuming you only deploythe dragchute on the ground after touchdown, no-one will notice ....

So just tie this chute Lvar to cockpit mouse lever, and force the Spoiler value accordingly when the chute is deployed.
Just build in some protection code (e.g. chute can only be deployed on the ground); like a real aircraft probably has.
That is: I imagine in a real aircraft you cannot deploy the chute when in-flight ....LoL


Rob
 
Last edited:
1500 (>K:SPOILERS_SET)
will result in
(A:SPOILERS HANDLE POSITION,percent) = 1500
and has the expected high FDE drag effect.

Oops ...
Should be
245760 (>K:SPOILERS_SET)
of course, to set the spoiler handle to 1500%

245760 = 15 × 16384

Rob
 
Thanks Rob.

I don't understand where I would add the spoilers code into the Modeldef. I have the code below using the tailhook tag so that on the ground only, the drag chute doors open and then the drag chute deploys when the handle is pulled.

Do I add the spoilers code into this entry to provide the spoilers braking effect?

Code:
<Animation name="drag_chuteT188"             guid="ccb6d532-a977-42ec-33d7-32d3774e738c"     length="100" type="Sim" typeParam2="drag-chuteT188" typeParam="AutoPlay" />   
  <PartInfo>
 <Name>drag_chuteT188</Name>
 <AnimLength>100</AnimLength>
 <Visibility>
 <Parameter>
 <Code>
 (A:SIM ON GROUND,bool) 0 !=
 (A:TAILHOOK POSITION:1,PERCENT) 1 &gt;
 and
 if{ 1 }
els{ 0 }
 </Code>
 </Parameter>
 </Visibility>
 </PartInfo>

mlm7NE.jpg

SXjuUf.jpg
 
Hi Tyler,

Since you apperantly use the Tailhook function for chute visibility, you best add the chute/drag control in an XML gauge, added to the [VCockpit01] section in the panel.cfg.

Something like:
XML:
<Gauge Name="Chute Drag Control" Version="1.0">

<Update Frequency="6"/>

<Element>
  <Select>
    <Value>
      (A:SIM ON GROUND,bool)
      if{
        (A:TAILHOOK HANDLE,bool)
        (A:SPOILERS HANDLE POSITION,percent) 101 &lt; &amp;&amp;
        if{ 1500 163.84 * (&gt;K:SPOILERS_SET) }

        (A:TAILHOOK HANDLE,bool) !
        (A:SPOILERS HANDLE POSITION,percent) 101 &gt; &amp;&amp;
        if{ 0  (&gt;K:SPOILERS_SET) }
      }
      els{
        (A:TAILHOOK HANDLE,bool)
        if{ (>K:TOGGLE_TAIL_HOOK_HANDLE) }
      }
    </Value>
  </Select>
</Element>

</Gauge>
So:
In the air, the Tailhook is forced Off.
On the ground,
- the Spoilers are forced to 1500% (or any value you like) when the Tailhook is extended.
- the Spoilers are retracted, when you retract the Tailhook.

NOTE:
Using this, on the ground, the Chute and Spoilers (airbrakes) are NOT independant.
Because (assuming this aircraft has Airbrakes modelled visually), the Airbrakes will be visually deployed when the chute is deployed.
If you want to have Airbrakes and Chute completely independant of eachother (when using Spoiler drag for chute decelleration), you would need to add a custom animation for Airbrakes in the model.
That is: I guess you now use the standard Spoiler function for animation of the Airbrakes.

Doable, but will also need extending the above control code.

Cheers, Rob
 
Thank you Rob, that works great!

I have used the standard Spoiler function for animation of the Airbrakes and tried adding a custom animation to the modeldef as below, but blender does not seem to like it and creates an error when I try to initialize it.

From the last line in your post above, I take it that it is not as easy as that and the XML gauge needs to be extended to provide independent spoilers from the Drag Chute?

Code:
  <Animation name="l_spoiler_keyT188" guid="797b2e4d-523e-4ef9-6a4d-4e520b2bfb98" length="100" type="Sim" typeParam2="l_spoiler_keyT188" typeParam="AutoPlay" />  
  <PartInfo>
        <Name>l_spoiler_keyT188</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>SPOILERS LEFT POSITION</Variable>
                    <Scale>1</Scale>
                    <Units>percent</Units>
                    <Bias>0</Bias>
                </Sim>
            </Parameter>
        </Animation>
    </PartInfo>
   
<Animation name="r_spoiler_keyT188" guid="f636af4b-de58-490e-f0e3-b01145df6e4d" length="100" type="Sim" typeParam2="r_spoiler_keyT188" typeParam="AutoPlay" />  
  <PartInfo>
    <PartInfo>
        <Name>r_spoiler_keyT188</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>SPOILERS RIGHT POSITION</Variable>
                    <Scale>1</Scale>
                    <Units>percent</Units>
                    <Bias>0</Bias>
                </Sim>
            </Parameter>
        </Animation>
    </PartInfo>

Tyler
 
Hi Tyler,

I'm not a modeller myself, but I think your problem is caused by the double <Partinfo> line in the second animation section.
But that said:

Using a custom animation using the Avars SPOILER LEFT/RIGHT POSITION doesn't solve the problem.
Since these Avars follow the Handle Avar; so when the Spoilers are commanded to 1500% , these visual spoilers are always extended. And not independant from the Chute.

Best option would be to animate the Airbrakes with an Lvar like (L:Airbrakes,bool) that is set in the gauge code ( based on detected SpoilerToggle events).
And animate the airbrakes surfaces with a "lag" , so the transition Off/On v.v. is gradual.

Personally, I wouldn't bother...
The only problem it solves , is that the visual airbrakes are always extended when the chute is deployed (but ONLY on the ground).
In the air, and on the ground with the chute stowed, the airbrakes can be extended/retracted freely.

But if you insist ...LoL... see below adapted gauge code, that maintains the new Airbrakes Lvar.
I can't tell you how to code the Partinfo (using the Lvar) in the modeldef.xml , but I know it's possible ....

XML:
<Gauge Name="Chute Drag Control" Version="1.1">

<Update Frequency="6"/>

<Element>
  <Select>
    <Value>
      (A:SPOILERS HANDLE POSITION,percent) near 0 ==
      if{ 0 (>L:Airbrakes,bool) }
      els{
        (A:SPOILERS HANDLE POSITION,percent) near 100 ==
        if{ 1 (>L:Airbrakes,bool) }
      }

      (A:SIM ON GROUND,bool) !
      (A:TAILHOOK HANDLE,bool) &amp;&amp;
      if{
        (>K:TOGGLE_TAIL_HOOK_HANDLE)
        0 (>G:Var1)
      }
      els{
        (A:TAILHOOK HANDLE,bool) (>G:Var1)
      }

      (L:Airbrakes,bool) 100 *  (G:Var1) 1500 *  +  d (A:SPOILERS HANDLE POSITION,percent) near !=
      if{ 163.84 * (&gt;K:SPOILERS_SET) }
    </Value>
  </Select>
</Element>

</Gauge>

Note though, that this code only works properly if you don't have a gauge in your panel that sets the SpoilersHandle proportionally (anywhere between 0 and 100).
So only a gauge/lever ( or keystrokes) that issue events SPOILERS_TOGGLE, SPOILERS_ON or SPOILERS_OFF.

Rob
 
Last edited:
If you use a tail hook as it was intended it is always lowered before touchdown. Usually a drag chute will be streamed after touchdown, but it can be lowered in the air.
Roy
 
Thanks again Rob for your help. I missed the additional <Partinfo> in the code and once I removed it, the modeldef initialized without any errors.

I have Extend/Retract Airbrake buttons on the throttle, so I don't know if they prevent the airbrakes closing while the drag chute is deployed with version 1.1. But, as you said, I don't think there would be a time where you would not have the airbrakes extended if you wanted to slow down on the landing run and use the drag chute.

Tyler
 
Hi Roy,

I just assigned the tailhook for the drag chute animation as my model does not have a tailhook and I had already used the spoilers animation tag.

Tyler
 
But, as you said, I don't think there would be a time where you would not have the airbrakes extended if you wanted to slow down on the landing run and use the drag chute.
As said, and as you tested, V1.0 of the gauge will suffice then for what you are trying to accomplish .......
I just tried to explain how to "refine" it further to any detail you want ....

Cheers, Rob
 
Thank you Rob.

I think I will look into XML a little more to try and understand it better.

Tyler
 
Last edited:
So I saw this thread and realize it is a bit old... But figured I would ask here anyway... So I get the concept of using either the spoiler key or the tail hook key to represent the drag chute... My question is does anyone know how to make either the spoilers or tailhook "single use per flight" where I can deploy them (the chute) anytime I wish; but once I retract the spoilers or tailhook respectively; I have to be on ground and use the sim's "repair and refuel" command before I can use them again...? Context; I was looking at using this for a SR-71 drag chute where this aircraft has no spoilers or tail hook... The only "drag producers" are the landing gear and the chute...

Thanks!
 
That should be relatively easy. Add a check variable to the 'spoilers out' line that, when set, prevents access to the spoilers command again until the check variable is reset.
 
Last edited:
Thanks for the response! Any idea what that might look like? Or can you give me an example of how I might modify one of those code examples above? Sorry gauge programming is very new to me... I have written animation .xmls and vis_conds for models in MCX that I released on MAIW but nothing else...
 
Um... sorry, no. I don't do XML gauge programming, only C/C++. Hopefully someone else will step along and help.
 
Hopefully... When look through the P3d variables list all I can find is a key for:

KEY_SIM_RESET SIM_RESET Resets aircraft state (>K:KEY_SIM_RESET)


Guessing that is just the refuel and repair variable... But the question becomes how would I make it so that after the spoilers have been extended and retracted once that is required before an additional use...?

SO for this instance my key variables are:

(A:SPOILERS HANDLE POSITION,percent) near 0 ==

(A:SPOILERS HANDLE POSITION,percent) near 100 ==

and

(>K:KEY_SIM_RESET)

but how to inter-relate them is beyond me...
 
Sim reset will reset the scenario you have loaded at your startup. It is not something you should use.
 
Back
Top