Coordinate Waypoint Planner
Turns a list of field positions into the distances and turns your code needs.
Inputs
Measure from one corner of the field. X across,Y up the field, both in inches, both 0 to 144. Headings are compass style: 0° faces +Y, 90° faces +X.
Which way the robot faces before it moves.
Reversing often turns a 170° spin into a 10° nudge.
Drive the route
The field from above, with your waypoints in the order you listed them and a straight leg between each pair. The robot is the triangle, pointing the way it faces. Slide it along and watch it swing at each waypoint: every one of those swings is a turn the route pays for, and a route with fewer corners is usually the faster one.
Not to scale.
Results
Total drive distance
—in
Total turning
—°
Legs
—
Longest leg
—in
Sharpest turn
°
Waypoints off the field
—
To use it: Enter each point you want to drive to, in field coordinates.
Easy to miss: Driving backwards is often a smaller turn than driving forwards. The tool checks both.
Worked example
With your numbers
Leg by leg
| Leg | From | To | Turn | Then drive | New heading | Cumulative |
|---|
How this is calculated
Each leg is a right triangle between two points, so the distance and the direction both fall out of the coordinates:
distance = √((x₂ − x₁)² + (y₂ − y₁)²) heading = atan2(x₂ − x₁, y₂ − y₁) turn = heading − current heading, folded to ±180°Folding to ±180° is what stops the plan telling you to spin 350° left when 10° right would do. If reversing is allowed, each leg is also checked facing backwards, and whichever needs less turning wins.
Coordinates beat dead reckoning
Writing a route as "forward 24, turn right 90, forward 36" bakes every number into the order of the steps. Move one goal and the rest of the route has to be recalculated by hand.
Coordinates hold the intent instead. Change one waypoint and everything downstream updates, which is also why odometry-based programs are easier to adjust than distance-based ones.
What this does not model
Straight lines between points, with a stop and a point turn at each one. That is the simplest thing to program and the easiest to debug, but it is not the fastest way round a field. A route that curves through its waypoints covers slightly more ground in noticeably less time, because it never stops.
Nothing here knows where the field obstacles are either. A straight line between two waypoints may pass through a goal.
Sources & assumptions
The field is 144" square, which is used only for the off-field check. Everything else is trigonometry on your own coordinates.
Assumes point turns at each waypoint and no wheel slip. Real distances drift, so treat these as the numbers to start from and then correct against the robot.
Save this run, and compare
Keeps what is on screen so you can change something and see both sides of the change. Saved in this browser only, never uploaded.
Make a notebook page
Turns this calculation into a dated engineering notebook page: the setup, data, results, figures, working and sources, numbered and cited. You add the goal, the decision and the reflection in your own words, plus photos and sketches. Print it, paste it into Google Docs, or download a Word file or slides.