Go to Post All the "official game hint" is is an "official red herring" - Cory [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
  #26   Spotlight this post!  
Unread 03-30-2016, 11:46 AM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Pathfinder - Fast Motion Profiling for Java and C++, Tank and Swerve Drive

Quote:
Originally Posted by Jaci View Post
The way it currently works is like so:
X+ is forward from where your robot starts.
X- is backward from where your robot starts.
Y+ is to the right of your robot where it starts.
Y- is to the left of your robot where it starts.

Positive headings are going from X+ towards Y+, Negative Headings from X+ to Y-.
Not a big deal, but I'm curious why you chose the above convention?

Quote:
Originally Posted by Jaci View Post
...From what I can tell it's a Div By Zero error, as some trigonometric functions give a 0 result for a 90 degree angle. Coupling that with the fact that Y doesn't change, it produces an error. Perhaps I can do a check for if it's 90 degrees to adjust it to something like 89.5 and print out a notice message.
It seems like there has to be a better way. Quite often, it's possible to make a small change to the order or method of computation to completely avoid those kind of errors. And if not, isn't there a way to trap floating point errors and make an alternate calculation in an exception handler?


Reply With Quote
 


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


All times are GMT -5. The time now is 04:43 AM.

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