View Single Post
  #3   Spotlight this post!  
Unread 12-02-2013, 21:47
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Getting final vector from left & right drive encoders

Download the code samples here: http://www.chiefdelphi.com/media/papers/2553. Look in the exampleRobotCode folder and open Periodic Tasks.vi. Near the bottom of the fast loop you'll see calculations that is stored into global variables called "Heading" and "AvgDist". These do exactly what you're looking for. As a bonus, you'll also find "CalcXY.vi" which calculates your x,y coordinate position on the field.

Note: The global "EncTrack" is the distance that separates the encoder wheels.
__________________
-
An ounce of perception is worth a pound of obscure.