View Single Post
  #7   Spotlight this post!  
Unread 12-08-2013, 08:35
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,025
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: Measuring angle relative to the floor

Quote:
Originally Posted by GuyM142 View Post
do you have some information about filters which I can start with?
Here's a very simple low-pass IIR filter:

Code:
filtered_value = a*filtered_value + (1-a)*new_value
"new_value" is the new reading from the accelerometer.

"filtered_value" is the filtered version of the accelerometer reading.

"a" is a tuning constant which tunes the strength of the filter. "a" has a range of 0 to 1.

When a=0, there's no filtering -- the filtered_value always equals the accelerometer reading.

As "a" approaches 1, the filtering gets more aggressive -- the filtered_value has less noise (but more phase lag).


Reply With Quote