Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

Throttle axis linearity issue

molletts opened this issue ยท 2 comments

commented

When moving the throttle axis of the joystick, the vehicle throttle snaps to idle as the axis passes its centre of travel.

This sounds like it might be a mis-application of the dead-zone (although I have the dead-zone set to zero in the configuration).

Moving the joystick's throttle axis smoothly from idle to full-power (or vice-versa) will result in a smooth increase/decrease of the aircraft's throttle until the axis nears its midpoint. The aircraft throttle will then abruptly close and stay at idle until the axis is a short way past its midpoint, at which time it will return to its correct position and resume tracking the joystick axis.

The behaviour is also reflected in the axis position bar for the throttle in the configuration dialog.

[Looking at getJoystickAxisState(), I think it is the dead-zone being mis-applied. Specifically, if pollBounds == 0 then the "are we out of the dead-zone" test coming up false needs to result in the function returning 50 rather than 0 as this is the mid-point of the return range (0 .. 100) when pollBounds == 0.]

[EDIT: Ideally, I suppose, perhaps the throttle axis should be a special case and shouldn't have a dead-zone at all, or if it does, it should be applied to the "idle" end of travel rather than the centre of travel like the other axes.]

commented

I think this is a gap based on my testing and how others work. When I did the testing on the joystick system I was using a PS3 controller, where 0 was a the end of the stroke and 100 was at the beginning. Because of this, a value of 0 was at the beginning of the stroke and not the end, so I didn't notice this. It is for sure a bug, and a well-reported one at that. Thanks mate!

commented

To clarify, the PS3 controller has two shoulder buttons. The left causes a -Z input of -1.0 to be fired, and the right causes a +Z of 1.0. So when no buttons are pressed it means that the value of Z is 0, and when the right is pressed it's -1.0. I used that setup to test, which meant that normally I have no throttle when at 0 and full when at 1.0. I did not think that some flight sticks might use a -1.0 for their min bounds and run all the way up to 1.0 for a span of 2.0 units.