Thread: gyro.h help
View Single Post
  #2   Spotlight this post!  
Unread 11-02-2009, 11:37
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: gyro.h help

Quote:
Originally Posted by carlos_85 View Post
i see that 2000 is the result to divide 1/0,0005 but i don't understand it.
I don't know what you don't understand. You correctly see that to convert v/dd/s into dd/s/v, you take the multiplicative inverse. (Here, dd stands for decidegrees, a fancy name for tenths of a degree.)

Quote:
5L, what is this?
It's a C constant, with a value of 5 and a type of long integer. The L is used to keep the compiler from using a regular integer or even a char, which could result in an overflow of an intermediate result.