Thread: Gryo Setup
View Single Post
  #15   Spotlight this post!  
Unread 27-01-2012, 07:48
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Gryo Setup

Quote:
Originally Posted by mikets View Post
The accelerometer doesn't give you "absolute heading", it gives you the G force that was applied to each axis. It's perfect for detecting tilt using the Z-axis because if you are flat on the ground, the Z-axis will read 1 G. But if you are tilted then by applying physics to split the G force vector into two vectors (one perpendicular to the accelerometer: the Z-axis, another parallel to the surface of the accelerometer), you can see the Z-axis will have a value smaller than 1 G. The more it is tilted, the smaller the Z-axis value). So to determine the tilt angle, you can do an arccosine to the Z value.
It actually gives you exactly the acceleration applied to each axis, including:
-The acceleration of gravity
-The acceleration of the robot when it accelerates/decelerates (moves)
-The acceleration of the robot when the bridge moves up/down

What happens when you move? When the bridge moves? You will get acceleration other than gravity.


Your solution assumes all of the signals represent the same gravity vector. In reality, there are more acceleration vectors which affect the accelerometer, making it a poor choice for bridge balancing while you and the bridge are moving.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack