Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4472201 - 04/28/19 11:39 PM jitter on my ch throttle pro  
Joined: Apr 2019
Posts: 3
nuggat Offline
Junior Member
nuggat  Offline
Junior Member

Joined: Apr 2019
Posts: 3
Bremen
Good evening,

for star citizen 3.5 i am using throttle+joystick from CH Products. I found the following script in the Internet. Its working
SCRIPT1
Code
//Jitter filter for CH Throttle Quadrant
//Change the Joystick and axis IDs if required
script
If (clocktick) then
  a10 = a9;
  a9 = a8;
  a8 = a7;
  a7 = a6;
  a6 = a5;
  a5 = a4;
  a4 = a3;
  a3 = a2;
  a2 = a1;
  a1 = js2.a3;
  //we calculate the average of all INPUT changes
  a20 = (a1+a2+a3+a4+a5)/5;

  //because jitter isnt big, all changes over a specific value
  //can be treated as real/wanted INPUT change
  If ([(a20 - a1) > 2] OR [(a1 - a20) > 2]) then
    cms.a1 = a1;
  //all other cases are probably just jitters
  Else
    If ([a20 > cms.a1]) then
      cms.a1 = a20 - 1;
    EndIf
    If ([a20 < cms.a1]) then
      cms.a1 = a20 + 1;
    EndIf
    If ([a20 == 255]) then
      cms.a1 = js2.a3;
    EndIf
    If ([a20 == 0]) then
      cms.a1 = js2.a3;
    EndIf
  EndIf
Endif
endScript


and i used the instruction found here --> https://drive.google.com/drive/folders/0Bxolnix8ukgRb1IyLVU3eGFTSXc

But however it doesnt work.

Further on my controllers are connected directly to my computer. The cable is about 3m long, but i can not change this.
The throttle jitters more In my game than in the test/calibrate window.

EDIT:
I created two scripts.

This script gives a smooth beginning/ending but only short. Most of this function is linear, the mid part,
SCRIPT2
Code
//Jitter filter for CH Throttle Quadrant
//Change the Joystick and axis IDs if required
//script


script
  //The script executed continuously, think of it like a loop.
  //For this reason, we have to use a "clocktick" command such
  //that we only store axis value when your CH product updates.
  If (clocktick) then
    a2 = a1;
    a1 = js2.a3;
  EndIf

  //For fast reactions(jitter or fast movements),
  //use direct input. But the jitter is normaly not so high,
  //so this case is treated in the else statement.
  //At both ends the numerical order is a little bit smooth,
  //and to the mid linear but with middle raising.
  If ([(a2 - a1) > 10] OR [(a1 - a2) > 10]) then
    cms.a1 = a1;
  Else
    If ([a1 <= 1]) then
      cms.a1 = 0;
    EndIf
    If ([a1 >= 2] AND [a1 < 8]) then
      cms.a1 = 2;
    EndIf
    If ([a1 >= 8] AND [a1 < 13]) then
      cms.a1 = 10;
    EndIf
    If ([a1 >= 13] AND [a1 < 18]) then
      cms.a1 = 15;
    EndIf
    If ([a1 >= 18] AND [a1 < 23]) then
      cms.a1 = 20;
    EndIf
    If ([a1 >= 23] AND [a1 < 28]) then
      cms.a1 = 25;
    EndIf
    If ([a1 >= 28] AND [a1 < 33]) then
      cms.a1 = 30;
    EndIf
    If ([a1 >= 33] AND [a1 < 38]) then
      cms.a1 = 35;
    EndIf
    If ([a1 >= 38] AND [a1 < 43]) then
      cms.a1 = 40;
    EndIf
    If ([a1 >= 43] AND [a1 < 48]) then
      cms.a1 = 45;
    EndIf
    If ([a1 >= 48] AND [a1 < 53]) then
      cms.a1 = 50;
    EndIf
    If ([a1 >= 53] AND [a1 < 58]) then
      cms.a1 = 55;
    EndIf
    If ([a1 >= 58] AND [a1 < 63]) then
      cms.a1 = 60;
    EndIf
    If ([a1 >= 63] AND [a1 < 68]) then
      cms.a1 = 65;
    EndIf
    If ([a1 >= 68] AND [a1 < 73]) then
      cms.a1 = 70;
    EndIf
    If ([a1 >= 73] AND [a1 < 78]) then
      cms.a1 = 75;
    EndIf
    If ([a1 >= 78] AND [a1 < 83]) then
      cms.a1 = 80;
    EndIf
    If ([a1 >= 83] AND [a1 < 88]) then
      cms.a1 = 85;
    EndIf
    If ([a1 >= 88] AND [a1 < 93]) then
      cms.a1 = 90;
    EndIf
    If ([a1 >= 93] AND [a1 < 98]) then
      cms.a1 = 95;
    EndIf
    If ([a1 >= 98] AND [a1 < 103]) then
      cms.a1 = 100;
    EndIf
    If ([a1 >= 103] AND [a1 < 108]) then
      cms.a1 = 105;
    EndIf
    If ([a1 >= 108] AND [a1 < 113]) then
      cms.a1 = 110;
    EndIf
    If ([a1 >= 113] AND [a1 < 118]) then
      cms.a1 = 115;
    EndIf
    If ([a1 >= 118] AND [a1 < 123]) then
      cms.a1 = 120;
    EndIf
    If ([a1 >= 123] AND [a1 < 128]) then
      cms.a1 = 125;
    EndIf
    If ([a1 >= 128] AND [a1 < 133]) then
      cms.a1 = 130;
    EndIf
    If ([a1 >= 133] AND [a1 < 138]) then
      cms.a1 = 135;
    EndIf
    If ([a1 >= 138] AND [a1 < 143]) then
      cms.a1 = 140;
    EndIf
    If ([a1 >= 143] AND [a1 < 148]) then
      cms.a1 = 145;
    EndIf
    If ([a1 >= 148] AND [a1 < 153]) then
      cms.a1 = 150;
    EndIf
    If ([a1 >= 153] AND [a1 < 158]) then
      cms.a1 = 155;
    EndIf
    If ([a1 >= 158] AND [a1 < 163]) then
      cms.a1 = 160;
    EndIf
    If ([a1 >= 163] AND [a1 < 168]) then
      cms.a1 = 165;
    EndIf
    If ([a1 >= 168] AND [a1 < 173]) then
      cms.a1 = 170;
    EndIf
    If ([a1 >= 173] AND [a1 < 178]) then
      cms.a1 = 175;
    EndIf
    If ([a1 >= 178] AND [a1 < 183]) then
      cms.a1 = 180;
    EndIf
    If ([a1 >= 183] AND [a1 < 188]) then
      cms.a1 = 185;
    EndIf
    If ([a1 >= 188] AND [a1 < 193]) then
      cms.a1 = 190;
    EndIf
    If ([a1 >= 193] AND [a1 < 198]) then
      cms.a1 = 195;
    EndIf
    If ([a1 >= 198] AND [a1 < 203]) then
      cms.a1 = 200;
    EndIf
    If ([a1 >= 203] AND [a1 < 208]) then
      cms.a1 = 205;
    EndIf
    If ([a1 >= 208] AND [a1 < 213]) then
      cms.a1 = 210;
    EndIf
    If ([a1 >= 213] AND [a1 < 218]) then
      cms.a1 = 215;
    EndIf
    If ([a1 >= 218] AND [a1 < 223]) then
      cms.a1 = 220;
    EndIf
    If ([a1 >= 223] AND [a1 < 228]) then
      cms.a1 = 225;
    EndIf
    If ([a1 >= 228] AND [a1 < 233]) then
      cms.a1 = 225;
    EndIf
    If ([a1 >= 233] AND [a1 < 238]) then
      cms.a1 = 235;
    EndIf
    If ([a1 >= 238] AND [a1 < 243]) then
      cms.a1 = 240;
    EndIf
    If ([a1 >= 243] AND [a1 < 248]) then
      cms.a1 = 245;
    EndIf
    If ([a1 >= 248] AND [a1 < 254]) then
      cms.a1 = 253;
    EndIf
    If ([a1 >= 254]) then
      cms.a1 = 255;
    Endif
  EndIf
endScript


and the next script is at both ends a long time smooth and has at the mid a high raising.
SCRIPT3
Code
//Jitter filter for CH Throttle Quadrant
//Change the Joystick and axis IDs if required
//script

script
  //The script executed continuously, think of it like a loop.
  //For this reason, we have to use a "clocktick" command such
  //that we only store axis value when your CH product updates.
  If (clocktick) then
    a2 = a1;
    a1 = js2.a3;
  EndIf

  //For fast reactions(jitter or fast movements),
  //use direct input. But the jitter is normaly not so high,
  //so this case is treated in the else statement.
  //At both ends the numerical order is very smooth,
  //and to the mid has a high raising.
  If ([(a2 - a1) > 10] OR [(a1 - a2) > 10]) then
    cms.a1 = a1;
  Else
    If ([a1 <= 1]) then
      cms.a1 = 0;
    EndIf
    If ([a1 >= 2] AND [a1 < 8]) then
      cms.a1 = 1;
    EndIf
    If ([a1 >= 8] AND [a1 < 13]) then
      cms.a1 = 2;
    EndIf
    If ([a1 >= 13] AND [a1 < 18]) then
      cms.a1 = 3;
    EndIf
    If ([a1 >= 18] AND [a1 < 23]) then
      cms.a1 = 4;
    EndIf
    If ([a1 >= 23] AND [a1 < 28]) then
      cms.a1 = 5;
    EndIf
    If ([a1 >= 28] AND [a1 < 33]) then
      cms.a1 = 6;
    EndIf
    If ([a1 >= 33] AND [a1 < 38]) then
      cms.a1 = 8;
    EndIf
    If ([a1 >= 38] AND [a1 < 43]) then
      cms.a1 = 10;
    EndIf
    If ([a1 >= 43] AND [a1 < 48]) then
      cms.a1 = 12;
    EndIf
    If ([a1 >= 48] AND [a1 < 53]) then
      cms.a1 = 14;
    EndIf
    If ([a1 >= 53] AND [a1 < 58]) then
      cms.a1 = 16;
    EndIf
    If ([a1 >= 58] AND [a1 < 63]) then
      cms.a1 = 18;
    EndIf
    If ([a1 >= 63] AND [a1 < 68]) then
      cms.a1 = 20;
    EndIf
    If ([a1 >= 68] AND [a1 < 73]) then
      cms.a1 = 18;
    EndIf
    If ([a1 >= 73] AND [a1 < 78]) then
      cms.a1 = 20;
    EndIf
    If ([a1 >= 78] AND [a1 < 83]) then
      cms.a1 = 25;
    EndIf
    If ([a1 >= 83] AND [a1 < 88]) then
      cms.a1 = 30;
    EndIf
    If ([a1 >= 88] AND [a1 < 93]) then
      cms.a1 = 35;
    EndIf
    If ([a1 >= 93] AND [a1 < 98]) then
      cms.a1 = 45;
    EndIf
    If ([a1 >= 98] AND [a1 < 103]) then
      cms.a1 = 55;
    EndIf
    If ([a1 >= 103] AND [a1 < 108]) then
      cms.a1 = 65;
    EndIf
    If ([a1 >= 108] AND [a1 < 113]) then
      cms.a1 = 75;
    EndIf
    If ([a1 >= 113] AND [a1 < 118]) then
      cms.a1 = 85;
    EndIf
    If ([a1 >= 118] AND [a1 < 123]) then
      cms.a1 = 95;
    EndIf
    If ([a1 >= 123] AND [a1 < 128]) then
      cms.a1 = 105;
    EndIf
    If ([a1 >= 128] AND [a1 < 133]) then
      cms.a1 = 115;
    EndIf
    If ([a1 >= 133] AND [a1 < 138]) then
      cms.a1 = 125;
    EndIf
    If ([a1 >= 138] AND [a1 < 143]) then
      cms.a1 = 135;
    EndIf
    If ([a1 >= 143] AND [a1 < 148]) then
      cms.a1 = 145;
    EndIf
    If ([a1 >= 148] AND [a1 < 153]) then
      cms.a1 = 150;
    EndIf
    If ([a1 >= 153] AND [a1 < 158]) then
      cms.a1 = 160;
    EndIf
    If ([a1 >= 158] AND [a1 < 163]) then
      cms.a1 = 170;
    EndIf
    If ([a1 >= 163] AND [a1 < 168]) then
      cms.a1 = 180;
    EndIf
    If ([a1 >= 168] AND [a1 < 173]) then
      cms.a1 = 190;
    EndIf
    If ([a1 >= 173] AND [a1 < 178]) then
      cms.a1 = 200;
    EndIf
    If ([a1 >= 178] AND [a1 < 183]) then
      cms.a1 = 210;
    EndIf
    If ([a1 >= 183] AND [a1 < 188]) then
      cms.a1 = 220;
    EndIf
    If ([a1 >= 188] AND [a1 < 193]) then
      cms.a1 = 225;
    EndIf
    If ([a1 >= 193] AND [a1 < 198]) then
      cms.a1 = 230;
    EndIf
    If ([a1 >= 198] AND [a1 < 203]) then
      cms.a1 = 235;
    EndIf
    If ([a1 >= 203] AND [a1 < 208]) then
      cms.a1 = 240;
    EndIf
    If ([a1 >= 208] AND [a1 < 213]) then
      cms.a1 = 242;
    EndIf
    If ([a1 >= 213] AND [a1 < 218]) then
      cms.a1 = 244;
    EndIf
    If ([a1 >= 218] AND [a1 < 223]) then
      cms.a1 = 246;
    EndIf
    If ([a1 >= 223] AND [a1 < 228]) then
      cms.a1 = 248;
    EndIf
    If ([a1 >= 228] AND [a1 < 233]) then
      cms.a1 = 250;
    EndIf
    If ([a1 >= 233] AND [a1 < 238]) then
      cms.a1 = 251;
    EndIf
    If ([a1 >= 238] AND [a1 < 243]) then
      cms.a1 = 252;
    EndIf
    If ([a1 >= 243] AND [a1 < 248]) then
      cms.a1 = 253;
    EndIf
    If ([a1 >= 248] AND [a1 < 254]) then
      cms.a1 = 254;
    EndIf
    If ([a1 >= 254]) then
      cms.a1 = 255;
    Endif
  EndIf
endScript

Currently i use the SCRIPT3 for my Star Citizen game, because there is to much jitter in the <absolut speed limit> function. And <absolut speed limit> is useful if you want to communicate during flying. If you fly with throttle or strafe and then try to communicate, the spaceship stops to speed 0.

EDIT 2:
I made a new script which is just linear, its more accurate then the others over the whole range, but the ends sometimes dont go to 0 or 255. Therefore Calibration needed. In StarCitizen i will use a non-linear gain function to make the beginning/ending more smoothly. Then its possible to use the "speed limit absolut" for my throttle. Cheers.

SCRIPT4
Code
// CMS Script File
//
//     Game Title: StarCitizen
//     Written By: feldmann_markus@gmx.de
//           Date: 2019-04-30
//
//    Description: Jitter-Filter. Only change the Output value
//                 when the difference is greater then <a>.
script
  //Static. Maximum Jitter Value
  a1 = 2;
  //Non-Static. Will be calulated every clocktick.
  a2 = 0;



//First we calculate the "Absolute Value" between the CMS Device
//and the Joystick Device.
IF((clocktick) AND [cms.a1 - js2.a3 >= 0]) THEN
  a2 = cms.a1 - js2.a3;
Else
  a2 = js2.a3 - cms.a1;
Endif

If([a2 > a1]) then
  cms.a1 = js2.a3;
Endif

endScript

Last edited by nuggat; 05/04/19 12:29 PM.
Inline advert (2nd and 3rd post)

#4472937 - 05/04/19 12:44 PM Re: jitter on my ch throttle pro [Re: nuggat]  
Joined: Apr 2019
Posts: 3
nuggat Offline
Junior Member
nuggat  Offline
Junior Member

Joined: Apr 2019
Posts: 3
Bremen
I updated my scripts and currently SCRIPT1 is the best choice. Ingame you should choos a none linear modificator so you get a better precision at the beginning!

#4477391 - 06/10/19 06:26 AM Re: jitter on my ch throttle pro [Re: nuggat]  
Joined: Dec 2012
Posts: 4
Bucky109 Offline
Junior Member
Bucky109  Offline
Junior Member

Joined: Dec 2012
Posts: 4
NY State, USA, a bit west of W...
Another possible solution for your negative jitter issue:

https://www.youtube.com/watch?v=nMJr_bXrUOs

#4477547 - 06/11/19 04:54 AM Re: jitter on my ch throttle pro [Re: nuggat]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Solution "jitter proof":

Quote

CH Pro Throttle, CH Fighterstick, CH Combatstick, CH Pro Pedals etc. magnetoresistive sensors.

[Linked Image]td banknorth near me

The cool thing about these MR sensors is that they replace the standard CH pots 1 to 1, but contrary to them they work contactless.
That means you can simply connect these sensors to your CH mainboard and done. You will never have to worry about deteriorating or dirty pots again.
he CH Control Manager recognizes this sensor normally and you can calibrate it within the software.

https://forums.eagle.ru/showthread.php?t=220916



Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0