View Single Post
  #3   Spotlight this post!  
Unread 27-01-2006, 09:48
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Accelerometer integration

to get the real equation you have to remember that acceleration is a vector - it has magnitude and direction

when the bot is not moving the magnitude is 1g, and its pointing straight down

when the bot is accelerating forward at 1g on a level surface, the magnitude the sensor will read is (1^2 + 1^2)^ 0.5 = SQRT(2) and the direction will be 45° forward from -Z.

so the forward magnitude of the robots total acceleration vector should always be = SQRT(sensor^2 - 1^2) [units = g's]. You must keep track of the direction through the SQ and SQRT calculations.

note that 1^2 assumes the sensor reading has been scaled so that 9.8M/S^ = 1g. also, if the robot is not on a level surface you must know the angle that it is tilting to separate out gravity and motor acceleration.