GIRC Path Calculations

(ATTN Google Searchers: Click here for Generation Starship Orinoco.)

The user guides the robot in GIRC by creating a path. The path is composed of segments which are created by mouse clicks. The program calculates the length (or distance traveled) for the path segment and also the heading.

“Heading relative to what?” you ask, and that’s a good question. I assumed that the positive x-axis would be zero degrees and that the angle would increase going counterclockwise. Instead, it appears in the display that the angles are calculated going clockwise from the positive x-axis. I don’t know if that’s a property of Processing’s trig functions or if I did the formulas wrong. I’ll find out.

Anyhow, the distance looks right.

(NOTE: The TURN value is currently showing the segment number.)

About engineerzero

Once and future engineer.
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s