View Single Post
  #1   Spotlight this post!  
Unread 05-02-2005, 00:47
Unsung FIRST Hero
miketwalker miketwalker is offline
Robot Lifeguard
FRC #1902 (Exploding Bacon)
 
Join Date: Dec 2001
Rookie Year: 2002
Location: Orlando, FL
Posts: 878
miketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond repute
Send a message via AIM to miketwalker
26.2ms loop question

I've had some very interesting results when I've been working on using loop counts as timers for distance calculations. I kept getting results being half of what I wanted. So, I threw in a timer and manually timed how many loops would go by in a minute... and after dividing my results I found that each timer tick took very close to twice the 26.2ms data stream (since I did it by hand I don't know if it was exactly twice or just close). I was wondering why this is.

I was thinking... are the loops really 52.4ms for calculations and such? Or does it vary based on how many calculations you have or something? I'd like to find out why this seems to be occuring, and if it is 52.4ms that will be a simple fix by modifying the number used, but because of precision purposes I want to find out if I'm right or not... or if the loops will take longer and longer with more and more calculations. I've never used timers to do these types of calculations so I've never run into this before. Any ideas?