View Single Post
  #13   Spotlight this post!  
Unread 06-02-2013, 09:24
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
Re: Accelerometer Filtering

Have you considered a moving average? It accumulates the last x number of data samples in an array and finds the average of them in real time. We wrote one for our rangefinders, but it should apply to just about anything. It's only about sixteen lines of code (with five curly brackets, making it more like 11 lines of functional code). We're programming in C++, but syntactically it's almost the same.
Reply With Quote