Thread: Gyro Sensors
View Single Post
  #9   Spotlight this post!  
Unread 22-02-2004, 21:33
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: Gyro Sensors

Quote:
Originally Posted by jacob_dilles
what type of algorithom would you use to determin your relitive postition from logged yaw rate data? is there something obious that im missing?
yes, the sensor output is degrees per second - so if you simply accumulate the sensor output, subtracting the zero point each time (512 for the 10 bit ADC) - then what you are doing is integrating the sensor (multiplying times time)

and you end up with degrees - compass heading.

you would have to calculate the correct constant to get your register into actual degrees, based on the scaling factor of your yaw rate sensor, and how many times a second you add it to the accumulator

or you can leave it in whatever units it comes out to be, and use it as a relative number - for example, if you initialize the accumulator to 32000 and turn right 90°, the accumulator might increase to 45,000 or 52,823 (whatever) - you just need to do some testing and see what the units come out to be - then you will know how many counts = 1°