Coordinate Waypoint Planner
Field coordinates in, drive distances and turns out. The arithmetic between a route sketched on paper and the numbers a program 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.
Results
Total drive distance
—in
Total turning
—°
Legs
—
Longest leg
—in
Sharpest turn
°
Waypoints off the field
—
Leg by leg
| Leg | From | To | Turn | Then drive | New heading | Cumulative |
|---|
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.
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°With your numbers
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.
Where this goes next
Explore further on the full mapWhere the answers on this page can be used, and which tools could have given you the numbers it asks for.
Comes after
Autonomous Route Optimizergives you your list of stopsOdometry Ticks per InchTwo & Three-Wheel OdometryYou are here
Coordinate Waypoint Planner
Where your answer goes
Autonomous Time Estimatorcheck the whole path fits in the time autonomous gives youuses your distance againOdometry Ticks per Inchturn each leg's inches and turn angle into encoder ticks to codeuses your distance againAutonomous Route Optimizertry every order of the same stops to find the shortest routeuses your list of stops againIMU Driftsee how far a drifting gyro pushes you sideways on your longest leguses your distance againa number carries across the next question it raises