View Single Post
  #9   Spotlight this post!  
Unread 28-03-2007, 08:52
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Joystick filtering gone horribly wrong...help!

We use excel. We use 3 points 0 127 to define one curve, and 3 points above 127 to define the 127 - 255 curve. Then you graph those points and have excel do a trendline and give you the equation.

Now you can just change your 3 datapoint values around and the trendline graph will automatically give you the new equation. You can either type the equation into excel and have it give you the values for a lookupt table (it becomes a simple copy/paste) or you can multiply the equation by 10, 100, or 1000 to remove the floats and simply use the equations with integer math in your program.

Once you have the excel spreadsheet set up, it takes about 30 seconds to change the curves then update your program.

Last edited by Tom Line : 28-03-2007 at 09:05.