Go to Post If mecanum wheels are the answer, I have found that I have asked myself the wrong question. - jwfoss [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 16-02-2005, 01:31
Zalumaskov's Avatar
Zalumaskov Zalumaskov is offline
Premier
no team
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Place
Posts: 12
Zalumaskov is on a distinguished road
Overflow?

My robot's pos_x and pos_y variables seem to overflow over time but not because of incrementing...
If I don't move the robot the pos_x and pos_y stay 0 for a while then suddenly become 32767 (max int value?)

pos_x += sin(heading_radians) * dist;
pos_y += cos(heading_radians) * dist;


I'm using the float trig functions in math.h that comes with the new compiler. Is this happening because the float functions take too much time? Would Int Trig solve this?

thanks for your help!
__________________
I would change the world but I don't have the source code.
 


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
ADXRS150 gyro yaw rate sensor Brian M. Electrical 13 17-10-2004 02:28
printf isn't printf-ing. Help! Meandmyself Programming 14 15-02-2004 16:27


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

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