Go to Post I know our driver is going to nats over the prom. I mean come on, who wouldnt? :D - karinka13 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 17-02-2006, 21:50
revolution1737 revolution1737 is offline
Robot Overlord
FRC #1691 (Revolution1737)
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Sidney
Posts: 9
revolution1737 will become famous soon enough
Trig problems

I have tried Kevin Watson's trig code with the eeprom, a cordic approach (team 226's code i think), and the default sin function in math.h and every time I come out with a wrong value when I print. I usually get 16512 or 0. I have tried switching from radians to degrees. Am I just getting unlucky or is there something I'm missing?
Code:
float meh;
angle = sin(3.14);
printf("the angle is = %d\r\n",meh );
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
speed of math.h trig functions? Jared Russell Programming 4 07-02-2006 07:13
Anyone Else Having Problems with Q&A on FIRST? Windwarrior General Forum 6 25-01-2006 10:54
Do you all have problems with.... Munkaboo Website Design/Showcase 19 03-03-2003 19:51
Radio problems -- not archiver 2000 1 23-06-2002 22:23


All times are GMT -5. The time now is 19:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi