Go to Post Capability and willingness are two very different things. Anybody can dance, though you could spend your lifetime unsuccessfully trying to convince them of that. - Mr. Pockets [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 14-02-2007, 21:27
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: Moderating Acceleration / Deceleration

A simple filter is one line of code. Here is a version that works with integer math:

Code:
  out = (((n-1)*out)+in)/n;
in = the input to the filter e.g. PWM value as commanded by the joystick code.
out = the filtered quantity e.g. PWM value to the wheel.
n sets the filter bandwidth. Higher values, lower bandwidth. Experiment!

Preserve the value of 'out' (make it global or static). Use separate variables for each wheel. That should get you started.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Acceleration Curve EricWilliams Programming 5 01-02-2006 16:27
Acceleration Sensor Connected, but values are odd.... Leav Electrical 7 04-02-2005 15:28


All times are GMT -5. The time now is 21:57.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi