View Single Post
  #3   Spotlight this post!  
Unread 11-04-2003, 10:30
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
Caleb - yes, the yaw sensor output is linear.

127 is zero degrees per second turn rate

128 is 0.586 degrees per second turn rate

191 is 37.5 degrees per second turn rate

254 is 75 degrees per second turn rate

and the reason its SO EASY to use the signal for a compass heading, is the SW samples the signal at a fixed rate (about 26mS)

so when you add every sample (subtracting 127 first) then you are integrating the signal, turning degrees/second into degrees!

the only difference is its not normalized into units of degrees - it comes out something like 65 counts = 1 degree.

Its a big number, thats why you need a VAR WORD to hold it - and dont forget that PBASIC always does math with 16bit registers anyway so you dont have to do anything special to look for things like

if angle >20000
Reply With Quote