Thread: Deadband Help
View Single Post
  #9   Spotlight this post!  
Unread 16-02-2013, 19:22
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Deadband Help

Quote:
Originally Posted by MoMo View Post
How would you adjust the dead band in this?
Let "J" be your joystick value, in the range -1 to +1.

Let "d" be your desired +/- deadband.

Let "out" be your modified joystick command (incorporating the deadband).


Then:

Code:
if (J>d) out = (J-d)/(1-d);

else if (J>-d) out = 0;

else out = (J+d)/(1-d);

"d" is the deadband tuning parameter in the range 0 <= d < 1


Last edited by Ether : 17-02-2013 at 09:32. Reason: corrected typo
Reply With Quote