April 11, 20224 yr I'm using the potentiometers of an old joystick to set the elevator trim for MSFS. The axis is set up as follows: No matter which Filter strength I set, the input to the sim is jittering quite often between values since the input value from the Joystick has a far lower resolution (the value below the axis is showing very high values, but the actual resolution of the axis is somewhere around 0-512) than the value that needs to be provided to the MSFS axis. The issue I have with this is not only the jittering trim wheel in the cockpit, but also that when using the autopilot, it's interfering with the AP (e.g. on JustFlight Piper Arrow III). Is there a way to actually filter the Joystick input sufficiently so that alternating values are not sent as changes to the sim? If there is no such way, how do I achieve that at least if AP master is turned on, the input of this axis is disabled to at least block it from interfering with AP input? This issue is one of the main reasons I bought AAO since I saw the "Filter strength" feature and it did sound like it's the one I needed, but it doesn't work as I expected.
April 11, 20224 yr Commercial Member Sounds strange. The Filter should do the trick. I will put it on the list of things to be looked at in version 2.29. Possible solution 1: If you have a spare button on that joystick, you could assign that as a Combo. Then the axis is only actuated when you keep the button pressed at the same time. It remains "silent" when the button is not pressed. Possible solution 2: But there may be another way, by using RPN scripts. This is a little more effort though. You can use an axis input to supply the axis value to an RPN script that will then process that value. Bear with me. First, create an RPN script like this Script Group: MyAxis Script Name: ElevatorTrim Script code: (L:MyAxis-ElevatorTrim) 10 / flr 10 / 32768 * -16384 + (>K:AXIS_ELEV_TRIM_SET) This script you assign to "Select simulator event" on the dialog above - and then you set Axis Min = 0 and Axis Max = 100 What will happen is, that the axis will send values from 0-100 to the script. This value will then be divided by 10, floored, so it loses the fractions, then divided by 10 again. Then it is mapped onto the range of the elevator trim axis. Now you only have 10 distinct "positions" left. You can play with the code to make it finer grained too. For example using a range of 0 - 1000 and calculating it as "10 / flr 100 /" which leaves you with 100 distinct "spots". Etc. Be mindful of the name of the script variable: that is "(L:scriptgroup-scriptname)" So if you rename the group and/or the script, you have to adjust the variable name too. The benefit of using a script is, that the control is instantaneous. When using a filter, there will always be some kind of "lag". Edited April 11, 20224 yr by Lorby_SI LORBY-SI
April 11, 20224 yr Author Thanks a lot, this seems to do the trick for now as a workaround! I changed the axis from -500 to +500 in order to have the smoothing/curve start in the middle of the trim axis and then updated your script suggestion to the following: (L:MyAxis-ElevatorTrim)·10·/·flr·100·/·32768·*·+·(>K:AXIS_ELEV_TRIM_SET) So 100 distinct spots but with negative value as input to the script 🙂 Would be interesting if you find some issue with Filters since I can't tell if earlier versions worked as I'd expect them to. But for the time being, this will help me a little even if I lose a bit of precision in trimming (which I try to gain using the smoothing/curve.
April 11, 20224 yr Author word not allowed, the fact that my posts are to be moderated makes it really hard to provide updates... So I understood the syntax a little better and the result that works for me (but I'm still working on the sensitivity): (L:MyAxis-ElevatorTrim)·4·/·flr·250·/·10000·*·(>K:AXIS_ELEV_TRIM_SET) With the range of -1000 to +1000. So in fact I'm reducing the sensitivity by factor 4 and limiting the output to +/-10000 rather than the full 16k range (since I usually wouldn't trim that hard).
April 12, 20224 yr Commercial Member 19 hours ago, CopperNu said: Would be interesting if you find some issue with Filters since I can't tell if earlier versions worked as I'd expect them to. Well, the filters are working. But they are too weak, they can only gloss over tiny imperfections (less than 0.05% of total joystick movement). I will implement a different algorithm in the next version of AAO - but no matter how strong the filter is, if the AP is too sensitive towards trim axis movement, then using the script is the better option (IMHO). Edited April 12, 20224 yr by Lorby_SI LORBY-SI
April 12, 20224 yr Author 49 minutes ago, Lorby_SI said: But they are too weak Got it 🙂 Is it written somewhere how they work? I can set some arbitrary number but don't know what it actually means and why it's capped at 30. I'd have assumed that maybe it filters noise based on time and not based on some deflection. E.g. by defining a number of milliseconds, if in this time the value changes multiple times, it is averaged. Anyway, my best bet was the following script: (A:AUTOPILOT·MASTER,·boolean)·0·==·if{ ··(L:MyAxis-ElevatorTrim)·4·/·flr·250·/·10000·*·(>K:AXIS_ELEV_TRIM_SET) } So the trim axis simply has no effect as long as AP Master is turned on. This was I can even reduce the smoothing algorithm since when flying manually the jittering/noise isn't that big of an issue. Thanks for the quick help, looking forward to any improvements here 🙂
Archived
This topic is now archived and is closed to further replies.