• 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 Joystick doesn't reset

Messages
1,468
Country
italy
Code:
<Element>
      <Select>
         <Value>(A:STALL WARNING, bool) 1 == (A:SIM ON GROUND, bool) 0 == and (A:AUTOPILOT MASTER, bool) 0 == and
if{ 1 (>L:stall_identified,bool) (>K:JOYSTICK_CALIBRATE) 8000 (>K:AXIS_ELEV_TRIM_SET) }</Value>
      </Select>
   </Element>

<Element>
      <Select>
         <Value>(L:stall_identified,bool) 1 == (A:STALL WARNING, bool) 0 == and (A:SIM ON GROUND, bool) 0 == and
if{ 0 (>L:stall_identified,bool) (>K:JOYSTICK_CALIBRATE) }</Value>
      </Select>
   </Element>
In the second element the joystick (>K:JOYSTICK_CALIBRATE) doesn't re-enable whereas (>L:stall_identified,bool) is correctly reset to zero. It doesn't make sense. So something must be wrong. Any ideas? Thanks

PS Is there any way of testing the joystick function? There doesn't seem to be an A:var to tell me the stick is enabled or not.
 
The problem is with your first element. After the three conditions, STALL WARNING, SIM ON GROUND, and AUTOPILOT MASTER are satisfied, then it constantly fires (>K:JOYSTICK_CALIBRATE), which is a toggle, and that will mess things up (a 'race' condition). There needs to be an expression associated with the event trigger that prohibits the event from firing more than one time. It's the same situation that Roman Stoviak pointed out a few days ago in the Setting Fuel Flow Order thread. Your second element does it correctly.
Code:
(L:Condition_A, enum) 1 == (L:Condition_B, enum) 0 == and (L:Condition_C, enum) 0 == and
   if{ 1 (>L:Condition_C, enum) (>K:JOYSTICK_CALIBRATE) }

You need that 1 (>L:Condition_C, enum) in line 2.

On the A:Var for joystick, I never thought about it until you posted the question, but I see these (A:YOKE X INDICATOR, position) and (A:YOKE Y INDICATOR, position) and they change values whenever the joystick yoke moves. You could test if these vars change from cycle to cycle and if they don't, the joystick is probably disabled (certainly so if you are moving it).

Alternatively, once you solve the race condition, you could do something like add
1 (>L:Joystick_Cal, enum) after the first (>K:JOYSTICK_CALIBRATE) and then
2 (>L:Joystick_Cal, enum) after the second (>K:JOYSTICK_CALIBRATE)
and keep track of the value of (L:Joystick_Cal, enum).

Bob
 
Last edited:
Thanks
bob,
I'll have a look and see how it goes. On your second point I might be able to check for a null value. With it being disabled that perhaps would make sense.
 
This now seems to work in a predictable manner:-
Code:
<!-- Stall Recovery Protection - Stick Push -->
<Element>
      <Select>
         <Value>(A:STALL WARNING, bool) 1 == (A:SIM ON GROUND, bool) 0 == and (A:AUTOPILOT MASTER, bool) 1 == and (A:INCIDENCE

ALPHA,degrees) 16 &gt; and
if{  0 (&gt;K:AUTOPILOT_OFF) 700 (>K:AXIS_ELEV_TRIM_SET) }</Value>
      </Select>
   </Element>

<Element>
      <Select>
         <Value>(A:STALL WARNING, bool) 1 == (A:PLANE ALT ABOVE GROUND,feet) 1000 &gt; and (A:AUTOPILOT MASTER, bool) 0 == and

(L:stall_identified,bool) 0 == and (A:INCIDENCE ALPHA,degrees) 10 &gt; and
if{ 1 (>L:stall_identified,bool) (>K:JOYSTICK_CALIBRATE) 11000 (>K:AXIS_ELEV_TRIM_SET) }</Value>
      </Select>
   </Element>

<Element>
      <Select>
         <Value>(L:stall_identified,bool) 1 == (A:STALL WARNING, bool) 0 == and (A:SIM ON GROUND, bool) 0 == and
if{ 0 (>L:stall_identified,bool) (>K:JOYSTICK_CALIBRATE) }</Value>
      </Select>
   </Element>

Note the deflection difference between a stall with the AP engaged and manually flying. While flying manually if the nose drops by not much the PF might correct it by pulling on the stick. So a greater deflection is needed to take the aircraft away from pilot control temporarily. Of course if the pilot was flying properly he/she would never get near the stall (but one has to cater for those trained by AF:stirthepo )
 
interesting.. so this sets a nose down trim until the stall warning is over? If you disable the joystick during the stall, won't that also disable rudder function (for many joysticks)? You want the rudder during stall.

Very cool!!

Bob
 
Last edited:
interesting.. so this sets a nose down trim until the stall warning is over? If you disable the joystick during the stall, won't that also disable rudder function (for many joysticks)? You want the rudder during stall.

Very cool!!

Bob

Correct, the control column functions are "all" disabled temporarily. Yes it's true that one needs the rudder to avoid a spin for example. But, the stall recovery is rapid enough to avoid that. Never more than 5 seconds. I'll now have to activate the stick pusher isolation switch so that stalls can be practised manually!
The other point of interest with the VC10 is that even though it is a T tail it won't super stall. If it is left to stall naturally it will always go nose down. Clever aerodynamics at the wing root and also assisted by the engines which have an affect on the airflow similar to the tail plane.
 
Back
Top