Repository navigation
Home
Sail racing around virtual marks. Every mark is a line that a boat crosses, checked by GPS on the boat, instead of a buoy that someone has to lay and watch. Try it at unmarked.mortbay.org.
To need less on the water. A race normally needs volunteers and boats to lay marks, run a start and take finish times. With virtual marks a club can run a race with no committee boat and no laid marks, or with fewer of them, and can still mix real marks and committee boats in where it wants.
To make new formats possible. Once a mark costs nothing to lay, a course need not wait for a committee:
- Practice and records. A course can be left open, so a boat can sail it whenever it likes. Best times on each exact version of a course are kept as records.
- Self-timed starts. A boat's clock starts when it crosses the start line.
- Circuits, joined anywhere. A course can be a loop with several entry lines. A boat starts at one and finishes by crossing it again, so it can start and finish near its home waters. That makes a new kind of interclub racing possible.
- Dynamic courses. The committee can move or shorten a course during a race and publish the change to the fleet. Partly built: the boat is told, but keeps sailing the course it joined.
- Distance handicaps. Instead of multiplying elapsed time by a TCF, each boat gets its own position for a handicap line, so a boat with a higher TCF sails further. Everyone starts together and the first boat home wins.
No mark-room. A line has no zone and no inside or outside at an overlap, so RRS 18 never applies at a virtual mark. Boats meeting near a line use the Part 2 right-of-way rules, much as they already do at a start line whose ends they cannot see. This is a deliberate safety choice.
There are two halves, and the line between them is the architecture:
- The boat runs a web page on a phone. It reads the phone's GPS, decides when a line has been crossed and in which direction, times the crossing, and keeps its own record of the race. All of that happens on the phone, with no network.
- The server on shore hands out courses before the start and collects the boats' records afterwards. In between it can act as a part-time race committee: start sequences, postponements, course changes, a radio-like channel and a fleet feed. Every part of that is optional; the server can be switched off mid-race and no boat's crossings or times change.
The boat is trusted entirely. Every position and instant comes from it, and nothing checks whether it told the truth: the quality checks defend against a bad GPS receiver, not a dishonest sailor. That costs less than it sounds, because elapsed time is the difference between two readings of the same clock, so a wrong clock cancels out.
Nothing is scored here. The system publishes courses, runs the committee's side of a race, and collects what boats did. Results are a finishing order by elapsed time, with corrected time beside it; places, penalties and series points belong to the club's own scoring software.
- A club describes its water in one YAML file per series: named points, lines between them, and courses that cross those lines in order. The course editor draws them on a chart (officers only).
- It snapshots and publishes a course. A snapshot is an unchangeable copy identified by a hash of its geometry; boats are only ever handed a published snapshot, so editing a mark on race morning changes nothing on the water until someone publishes again.
- It may define a race: a date, divisions, and a course and start for each division.
- A boat joins on the boat page, choosing club, series and race (or just a course, for practice or a record attempt), and is handed the whole course. The test client is the same page on a simulated boat you steer by clicking a chart.
- The committee runs the start from the race screen (officers only). It publishes start times; each boat runs its own countdown.
- The boat sails. Each GPS fix is checked, and a crossing is accepted only once fixes on both sides confirm it; its time is interpolated to the moment the boat's track cut the line.
- The record goes in when the course is finished, and appears on the results page. What each fleet was handed, and when, is on the public event log.
| Page | What it covers |
|---|---|
| crossing-detection | the algorithm that decides a race: lines, sense and extent, GPS quality control, confirmation, interpolated timing |
| course-model | lines, courses and cycles; how legs are measured; distance handicaps; snapshots, revisions and publishing; records and results |
| client-server-dialog | the protocol between boat and server: trust, versioning, messages, starts, and what is not built |
| boat-client | the rules the boat's screens follow: when the approach screen takes over, start lines, timing, the simulator |
| course-editor | how the editor draws a course's track and writes the YAML file back without losing its comments |
| deployment | the officers' login, and installing on a Raspberry Pi |
| open-questions | what is not decided yet |
The source is at github.com/gregw/sail-unmarked.
| Term | Meaning |
|---|---|
| line | a virtual mark: two ends, port and starboard, each finite or infinite |
| infinite end | a bearing rather than a place: the line runs on through the given point without limit |
| forward / reverse | which way a line must be crossed: forward leaves the port end to port and the starboard end to starboard |
| step | one position in a course: one line to cross, or a gate of alternatives |
| leg | the water between two steps, measured midpoint to midpoint |
| cycle | a closed course; a boat starts at an entry line and finishes by crossing it again |
| variant | one design of a course — Div 1, the short course; a template variant can never be raced |
| snapshot / revision | an unchangeable capture of a variant / the hash of its geometry |
| publish | choose which snapshot boats are handed |
| division | a group of boats in a race, sailing one course variant |
| latch | a confirmed crossing in the required direction; once latched it stands |
| record | a boat's account of one run of a course: the one thing that leaves the system |