|
Re: Encoder trouble
I'm looking at how you calculated the scaling...
8*pi = circumference of wheel
divided by encoder counts (360)
divided by feet
multiplied by gear ratio (15/22)
The result of that calculation is 0.00379
My math says 0.05 inches - same as yours except yours is in feet.
Scaling is correct.
Which brings us back to - Where is this get code. It is in a while loop. Is it in Teleop.vi? Is it in Autonomous Independent.vi? You can call Encoder:Reset before you enter the while loop if you are doing this in Autonomous.
EDIT - after looking at that get code, I see a possible problem. You are feeding the difference from this get and the last get (speed) and using that to determine your position with the help of the gyro. It would be much simpler to just reset the encoders at each turn, and add the position change in each segment of your journey, assuming you never turn and drive straight at the same time.
__________________
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
Last edited by apalrd : 16-02-2010 at 11:25.
|