Can anyone enlighten me on setting up reverse in a Kingair (which might be useful in other aircraft). I have a DIY quadrant with Hall sensors. I use Hubhop to give me a preset based on the range of data my levers produce. I either input the data in as discovered from full throttle to idle stop in cockpit, or from full power to reverse position stop which is less in the range of values. Then I tried in Mobiflight standard presets, "Toggle" reverse thrust and "Hold" reverse thrust. My throttles have a stop past idle with a lift lever to get to that low end stop. At the extreme, a microswitch is activated which should activate the reverse preset. But, I have not been able in the Kingair to achieve reverse or see the Kingair levers move in cockpit to that stop. If I move the levers with my mouse, yes, reverse is activated though. Does anyone have a recent solution to this?
#reverse thrust in Mobiflight
1 messages · Page 1 of 1 (latest)
Are you using THROTTLE_SET? I find in most aircraft that reverse thrust can be set with negative THROTTLE_SET values.
Ok, tried this for throttle setup...
And this for reverser microswitch....
Also tried TOGGLE but neither pulled the throttle from IDLE to REVERSE
That value of 660 is the limit for travel to IDLE, value in debug goes to 620 when I put the physical lever past IDLE to REVERSE.
If I use 620, the levers dont reach IDLE (sensor range is 620-850)
Throttle lever config in first image above
I noticed the code you used for the throttle lever is range limited 0 to 16383
So it's irrelevant if the idle position is 660 and your physical lever can still go to 620. The range filter will not let any values outside the range.
Thus, 0 (idle) is the minimum position given by your code.
Is the physical lever idle detent at the 660 position?
Is 620 the value when fully down into the reverse thrust region?
as a test, just change the 0 max to -4096 max
some tweaking of the math may be necessary
Now I tested with my TQ and just setting the THROTTLE_SET to negative values, moves the King Air levers down into reverse thrust. It should only be a matter of calibrating the correct values for your lever.
I can also engage reverse with one button press, which is the way I normally do it, because my TQ has no idle detents. I prefer to keep the levers in the normal thrust region from idle to full, and just activate reverse with one button. Pressing again or moving the levers automatically disengages the reverse thrust.
Here, try this code I just cooked up for your lever
@ 660 - 86.2263 * s0 0 >= if{ l0 0 max 16383 min } els{ l0 1.2 * -4096 max 0 min } (>K:THROTTLE1_SET)
@orchid oasis just looking through your questions, the physical minimum at the end of lever travel is 620 (reverse), the maximum is 850, idle stop is at 660.
Try the code just above
Just firing up the SIM now, as soon as that is running ...
The code separates the positive normal thrust from the negative reverse thrust due to the physical detent being at 660 and the min position being 620. A different scale factor is required to move the lever from 0 to -4096 (max reverse thrust)
I wish I understood this code used in mobiflight much better than I do! 😬 The suggested code above works superbly and the lever moves as it should all the way back into reverse.
I thought that the negative scale would be the case, but had no idea how to achieve that negative value.... great result, now to have a play with a few suitable aircraft. Need a coffee at this early hour in the day (7:00am).. 🫤
Read the RPN guide in the msfs SDK site, if interested in understanding the scripting language better.
Thanks for the suggestion, I will do that!
@orchid oasis if you have time, could you put your expression logic above into plain language, and how those numbers, particularly the 82.2263 and 1.2 are derived. That way I can have a go at working backwards and might be able to underst the expression.
Ok, here is a quick rundown of the code
@ 660 - 86.2263 * s0 0 >= if{ l0 0 max 16383 min } els{ l0 1.2 * -4096 max 0 min } (>K:THROTTLE1_SET)
the first part comes directly from the Hubhop potentiometer tool with an arduino potentiometer range of 660 to 850 and an event range of 0 to 16383. This takes care of the positive part of normal thrust.
BTW,
(16383-0)/(850-660)=86.2263
because the range of the hall sensor is actually 620 to 850, the code can actually go into negative values when below the 660 level. However, 620 - 660 gives -40 which multiplied times 86.2263 is -3449, close but not quite close enough to the -4096 that corresponds to the full reverse thrust value required to be input to the simulator.
Because of this discrepancy in the positive versus negative regions of the scale, a correction on the negative side is required. This correction is 4096/3449 = 1.19. In other words, 1.19 is the number that when multiplied times 3449 results in 4096.
ok, summing up, so the code splits the analog input into the positive region and negative regions
@ 660 - 86.2263 * will yield a number 0 to 16383 when the analog input is in the range 660 to 850. This result is stored in register 0 with the instruction s0
The instruction l0 means: load register 0 to the top of the stack
0 >= if{ l0 0 max 16383 min } checks to see if the result is greater than or equal to zero. If true then the result is checked for range compliance and sent to (>K:THROTTLE1_SET)
If the result is less than zero (the lever moved into the negative region), the els clause is executed instead
els{ l0 1.2 * -4096 max 0 min } (>K:THROTTLE1_SET)
the result scale is corrected by applying the correction factor 1.2 (rounded from 1.19), checked for range compliance -4096 to 0, and sent to (>K:THROTTLE1_SET)
The rounded scale factor of 1.2 ensures that you will have a small deadzone at the full reverse position, as any number lower than -4096 is corrected to -4096 by the range check function.
Note -3449*1.2 = -4138 corrected to -4096