File format · version 1

The STX file format

Sail Tactician Exchange: the app's lossless export, described field by field.

STX is the file Sail Tactician writes when you export or share a race. It is the app's lossless format: everything a session holds survives a round trip through it, including the full-rate GPS track, the start line, the course marks, the trim and training results. GPX, CSV, KML and TCX exports are also available, but they drop most of that.

This page is for anyone reading STX files without the app: scripts, scoring tools, converters and AI assistants. A JSON Schema for the file is at stx.schema.json.

Reading this as an AI assistant? STX holds raw data: positions, speeds and course over ground, with no derived analysis. Tacks, legs, sailed angles and wind shifts all have to be computed, and the rules below are how you avoid getting them backwards. If the sailor used Ask AI in the app, you already have the app's own analysis of the race, and you should prefer it to recomputing from STX.

At a glance

{
  "formatVersion": 1,
  "exportedAt": "2026-08-23T17:52:00.000Z",
  "appVersion": "3.4.0",
  "sessions": [
    {
      "session": {
        "id": "5A4D7E00-0000-4000-8000-00000000C0A1",
        "title": "Sample race",
        "sessionType": "race",
        "startedAt": "2026-08-23T17:52:01.000Z",
        "endedAt": "2026-08-23T18:22:36.000Z",
        "raceStartAt": "2026-08-23T17:55:00.000Z",
        "raceEndAt": "2026-08-23T18:21:36.000Z",
        "windDirection": 70,
        "boatClassId": "mc-scow",
        "startLinePinLat": 39.38463, "startLinePinLng": -83.91024,
        "startLineBoatLat": 39.38362, "startLineBoatLng": -83.90976,
        "courseJSON": "{\"schemaVersion\":1,\"marks\":[{\"id\":\"07880621-FB19-4F55-A2BF-0ECDE57CAC2D\",\"role\":\"windward\",\"latitude\":39.38666,\"longitude\":-83.90006,\"source\":\"captured\",\"rounding\":\"port\"}]}",
        "tackCount": 0, "gybeCount": 0, "capsizeCount": 0,
        "visibility": "private",
        "recordingSource": "watch"
      },
      "trackPoints": [
        { "timestamp": "2026-08-23T17:52:01.000Z", "latitude": 39.383726, "longitude": -83.910435,
          "speedKnots": 2.86, "cog": 167.5, "heartRate": 135 }
      ],
      "motionEvents": []
    }
  ]
}

A complete example is the app's own sample race, sample-race.stx: a 30-minute, two-lap race on Cowan Lake with a gun, a start line, a windward and a leeward mark, and heart rate. It is the best file to test a reader against.

File structure

The bundle (top level)

FieldTypeRequiredMeaning
formatVersionintegeryesAlways 1 today. See Versioning.
exportedAttimestampyesWhen the file was written.
appVersionstringnoThe app version that wrote it, e.g. "3.4.0".
sessionsarrayyesOne entry per session.

Readers should also accept two older shapes, as the app does: a bare array of session entries ([ {session, trackPoints, motionEvents}, … ]) and a single bare session entry ({session, trackPoints, motionEvents}). The app no longer writes either shape.

A session entry

FieldTypeMeaning
sessionobjectMetadata about the recording: see Session.
trackPointsarrayGPS fixes in ascending time order: see Track points.
motionEventsarrayCapsizes and knockdowns: see Motion events. Usually empty.

All three are required. Write an empty array rather than leaving one out.

Session

Fields are grouped by purpose. Unless it says required, a field may be absent.

Identity and timing

FieldTypeMeaning
idUUID stringRequired. Stable id for the session. Importing the same id twice is treated as the same race, so keep the id when you rewrite a file, and generate a new random UUID only for a genuinely new session.
titlestringThe sailor's name for the session.
sessionTypestringRequired. race, practice (shown as "Training") or cruise. Treat unknown values as race.
startedAttimestampRequired. When recording began. For a race, that is the start of the countdown, not the gun.
endedAttimestampRequired. When recording ended.
durationSecondsintegerendedAt − startedAt, as recorded.
raceStartAttimestampThe gun. Absent for cruises, imported tracks and countdowns that were abandoned.
raceEndAttimestampWhen the sailor finished.
countdownDurationSecondsintegerLength of the start sequence (e.g. 300 for five minutes).
finishPositionintegerFinishing place, if entered.
notesstringThe sailor's free-text notes.

The race window (read this before computing anything)

A race recording starts when the countdown starts, so the track holds the pre-start as well as the race. On top of that, the sailor may have trimmed the session to hide the sail out and back.

A comparison share of a trimmed race already has the hidden points removed, and carries no trim fields.

Summary statistics

FieldTypeMeaning
distanceMetersnumberDistance sailed.
avgSpeedKnots / maxSpeedKnotsnumberSpeed over the race window.
tackCount / gybeCountintegerRequired. Maneuvers detected.
capsizeCountintegerRequired. Capsizes detected.

These are the figures the app last calculated. They are a convenience, not the truth: the app recomputes all of them from the track on import, and they depend on the wind, so a wind edited after export changes the tack and gybe counts. If you need exact figures, compute them from trackPoints.

Wind and weather

FieldTypeMeaning
windDirectionnumberThe direction the wind blows from, in degrees true. Set by the sailor, or taken from a windward mark.
estimatedWindDirectionAtStartnumberAn estimate frozen at recording time. Ignore it. It is often reversed, and it is kept only for compatibility.
windSpeed / gustSpeednumberKnots, when known. Usually absent.
temperaturenumber°C, when known.
weatherConditionsstringFree text.

Rules for wind:

Start line

FieldTypeMeaning
startLinePinLat / startLinePinLngnumberPin end of the line.
startLineBoatLat / startLineBoatLngnumberCommittee-boat end.
startLineBiasnumberDegrees the line is skewed off square to the wind, as computed at the time.

Either end may be absent on its own.

Course marks: courseJSON

courseJSON is a string holding JSON, not an object. Parse it a second time:

{
  "schemaVersion": 1,
  "confirmedAt": 785615400.0,
  "marks": [
    {
      "id": "07880621-FB19-4F55-A2BF-0ECDE57CAC2D",
      "role": "windward",
      "latitude": 39.386657, "longitude": -83.900062,
      "source": "captured",
      "rounding": "port",
      "capturedAt": 785615000.0,
      "pinnedAt": [785615000.0]
    }
  ]
}
Mark fieldValues
rolewindward, offset, wing, reach, leeward, leewardGateLeft, leewardGateRight, windwardGateLeft, windwardGateRight, finish, pin (pinned on the water, type not yet known), unknown
sourcecaptured (at the mark, on the water), estimated (placed by eye on a map), confirmed (found in the track and accepted by the sailor), inferred (found in the track, not accepted)
roundingport or starboard

Training: workoutName, workoutResultJSON

workoutName is the drill's name, and workoutResultJSON is a string of JSON holding its scored reps. The result's shape is internal and may change. Read it if it helps, but don't build anything that depends on it.

Recording and device

FieldTypeMeaning
recordingSourcestringwatch (or absent: older watch recordings), phone, sample, or import-gpx / import-csv / import-tcx / import-fit / import-vkx / import-nmea for a file the sailor imported. Treat this as a prefix list: new import- values will appear.
recordingRateHzintegerThe rate the track was actually recorded at, measured from its timestamps: 1, 2, 5 or 10.
sourceRecordingHznumberFor an import that was filled to 1 Hz, the original device's rate (e.g. 0.2). The extra points between the device's own fixes are interpolated.
deviceModelstringThe recording device, or for an import, the maker or app named in the file.
osVersion / appVersionstringOf the device that recorded it.
batteryAtStart / batteryAtEndintegerPercent.
boatClassIdstringA built-in class (e.g. mc-scow, ilca-7) or custom-<uuid> for a sailor's own boat, which means nothing outside their app. Use boatName for display.
editedAttimestampWhen the sailor last edited the session.
visibilitystringRequired. Always private today.
venueId, userLocationIdstringUnused. Ignore them.

Sharing identity

Written only when a sailor shares a race with another sailor for comparison, never on a plain export:

FieldMeaning
sailorNameThe sailor's display name, if they chose to include it.
boatNameThe boat, e.g. "MC Scow · USA 4732".
ownerIdA random id that is the same across one sailor's devices. It identifies nothing outside the app.

A comparison share also removes heart rate from every track point.

Track points

FieldTypeMeaning
timestamptimestampRequired.
latitude / longitudenumberRequired. WGS 84 degrees.
speedKnotsnumberSpeed over ground.
cognumberCourse over ground, degrees true.
headingnumberWhere the boat is pointing, degrees (true where the device knows it). Present only when the phone was mounted on the boat: otherwise it would be the direction of a pocket.
gpsAccuracynumberHorizontal accuracy in metres. Absent on watch recordings and most imports.
heartRatenumberBeats per minute, from the watch.
heelAnglenumberDegrees, signed: positive is starboard side down. Mounted phone only.
trimAnglenumberDegrees, positive is bow up. Mounted phone only.

Points are in ascending time order. Several things to know before using them:

Motion events

FieldTypeMeaning
eventTypestringcapsize or knockdown.
timestamptimestampWhen it happened.
durationSecondsnumberHow long the boat was over.
confidencestringhigh, medium or low.
peakAccelerationnumberPeak acceleration during the event, from the phone's motion sensor.
detectionMethodstringHow it was detected, e.g. motion.

The raw motion data is never stored, only these events.

Timestamps

Every timestamp field (everything outside courseJSON) is ISO 8601. The app writes UTC with milliseconds, 2026-08-23T17:52:01.000Z, and reads that, whole seconds (2026-08-23T17:52:01Z) or a numeric offset (+02:00).

App versions up to 3.4.0 read only the millisecond form. To make a file that older versions import correctly, write milliseconds. The app drops a track point whose timestamp it can't parse.

Writing STX

To make a file the app will import:

  1. Write the bundle shape with formatVersion: 1 and a sessions array.
  2. Give each session a UUID id, a sessionType, startedAt, endedAt, visibility: "private", and tackCount, gybeCount and capsizeCount (0 is fine: they are recomputed).
  3. Write trackPoints in time order, with timestamps in the format above (milliseconds for the widest compatibility).
  4. Leave out what you don't know. Never write 0 for an unknown wind: absent means unknown.
  5. Don't set recordingSource to watch or phone for data that wasn't recorded by the app. Use your own import-<name> value.

The app treats every import, STX included, as the sailor's own race unless it carries another sailor's ownerId, and it recomputes all statistics on import.

Versioning and compatibility

Old files and windDirection: 0

Versions of the app before the legacy-wind fix wrote 0 when no wind had been set. If a session has windDirection: 0 and no editedAt, and startedAt is before 1 July 2026, the 0 probably means unset. Newer files never do this.

Privacy

What an STX file can contain:

A comparison share of a trimmed race leaves out the part trimmed away, usually the sail to and from the dock. A plain export keeps the whole recording along with the trim.