Thread: Syntax Error!
View Single Post
  #10   Spotlight this post!  
Unread 04-02-2006, 02:22
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: Syntax Error!

The conversion factor is roughly 0.01745 I'll use that instead of defining it, it works, it's easier, unless there's some reason that I shouldn't. I'm pretty new to programming, and I'm always glad to learn.

tilt_angle_rad = (0.01745) * (((TILT_SERVO - 144) * 25)/50);

but anyways, we already checked and the angle is correct. Yet I'm getting like -166.25 meters for the light that is like 2.5 meters away.... My friend said it maybe that it may be overflow, so I changed everything from floating points to integers, I'll test, see how it goes. Thanks alot of the help!

What does the f after the 180.0 and the pi mean?
__________________
www.sabrerobotics.com

Last edited by Denz : 04-02-2006 at 02:26.