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
- A plain UTF-8 JSON file, extension
.stx, typecom.sailtactician.stx(conforms topublic.json). It is not compressed. - One file holds one or more sessions. A session is one recording: a race, a training session or a cruise.
- Units are fixed and do not follow the sailor's display settings: speed in knots, distance in metres, angles in degrees true, 0–360, clockwise from north, times in ISO 8601 UTC.
- Fields with no value are omitted, never written as
null. Treat a missing key andnullthe same way.
{
"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)
| Field | Type | Required | Meaning |
|---|---|---|---|
formatVersion | integer | yes | Always 1 today. See Versioning. |
exportedAt | timestamp | yes | When the file was written. |
appVersion | string | no | The app version that wrote it, e.g. "3.4.0". |
sessions | array | yes | One 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
| Field | Type | Meaning |
|---|---|---|
session | object | Metadata about the recording: see Session. |
trackPoints | array | GPS fixes in ascending time order: see Track points. |
motionEvents | array | Capsizes 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
| Field | Type | Meaning |
|---|---|---|
id | UUID string | Required. 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. |
title | string | The sailor's name for the session. |
sessionType | string | Required. race, practice (shown as "Training") or cruise. Treat unknown values as race. |
startedAt | timestamp | Required. When recording began. For a race, that is the start of the countdown, not the gun. |
endedAt | timestamp | Required. When recording ended. |
durationSeconds | integer | endedAt − startedAt, as recorded. |
raceStartAt | timestamp | The gun. Absent for cruises, imported tracks and countdowns that were abandoned. |
raceEndAt | timestamp | When the sailor finished. |
countdownDurationSeconds | integer | Length of the start sequence (e.g. 300 for five minutes). |
finishPosition | integer | Finishing place, if entered. |
notes | string | The 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.
trimmedStartAt/trimmedEndAt(timestamps): the edges of the part the sailor keeps. Points outside them are still in the file and are hidden, not deleted. Both ends are inclusive.- The race is the points from
raceStartAt(ortrimmedStartAt, whichever is later) totrimmedEndAt(or the last point). That is what the app's statistics are computed over. - The pre-start is the points from the first visible one up to
raceStartAt. It is where start analysis comes from, and it is not part of the race. - With no
raceStartAt, the whole visible window is the session.
A comparison share of a trimmed race already has the hidden points removed, and carries no trim fields.
Summary statistics
| Field | Type | Meaning |
|---|---|---|
distanceMeters | number | Distance sailed. |
avgSpeedKnots / maxSpeedKnots | number | Speed over the race window. |
tackCount / gybeCount | integer | Required. Maneuvers detected. |
capsizeCount | integer | Required. 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
| Field | Type | Meaning |
|---|---|---|
windDirection | number | The direction the wind blows from, in degrees true. Set by the sailor, or taken from a windward mark. |
estimatedWindDirectionAtStart | number | An estimate frozen at recording time. Ignore it. It is often reversed, and it is kept only for compatibility. |
windSpeed / gustSpeed | number | Knots, when known. Usually absent. |
temperature | number | °C, when known. |
weatherConditions | string | Free text. |
Rules for wind:
- An absent
windDirectionmeans no wind was set.0means due north. Never treat0as "unset". - A forecast wind is never written to the file. If
windDirectionis present, the sailor stated it or it came from a windward mark. - With no wind, the best estimate comes from the course: the bearing from the start line's midpoint to the windward mark, when there is one at least 75 m away. Estimating the wind from the track's own course distribution recovers the axis well and the end badly: on real races it came out reversed about half the time. If you do this, check it against the course.
Start line
| Field | Type | Meaning |
|---|---|---|
startLinePinLat / startLinePinLng | number | Pin end of the line. |
startLineBoatLat / startLineBoatLng | number | Committee-boat end. |
startLineBias | number | Degrees 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 field | Values |
|---|---|
role | windward, offset, wing, reach, leeward, leewardGateLeft, leewardGateRight, windwardGateLeft, windwardGateRight, finish, pin (pinned on the water, type not yet known), unknown |
source | captured (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) |
rounding | port or starboard |
- The dates in
courseJSONare not ISO strings.capturedAt,pinnedAtandconfirmedAtare numbers of seconds since 2001-01-01T00:00:00Z (Apple's reference date). To get Unix time, add 978307200. - Don't trust an
inferredmark. It is the app's guess at a rounding, never confirmed, and the app itself never uses one for wind or laylines. Apinmark has a reliable position and an unknown role. - Expect new roles, sources and keys. Treat an unknown role as
unknownand an unknown source asestimated, and skip a mark with no position rather than rejecting the course.
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
| Field | Type | Meaning |
|---|---|---|
recordingSource | string | watch (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. |
recordingRateHz | integer | The rate the track was actually recorded at, measured from its timestamps: 1, 2, 5 or 10. |
sourceRecordingHz | number | For 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. |
deviceModel | string | The recording device, or for an import, the maker or app named in the file. |
osVersion / appVersion | string | Of the device that recorded it. |
batteryAtStart / batteryAtEnd | integer | Percent. |
boatClassId | string | A 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. |
editedAt | timestamp | When the sailor last edited the session. |
visibility | string | Required. Always private today. |
venueId, userLocationId | string | Unused. Ignore them. |
Sharing identity
Written only when a sailor shares a race with another sailor for comparison, never on a plain export:
| Field | Meaning |
|---|---|
sailorName | The sailor's display name, if they chose to include it. |
boatName | The boat, e.g. "MC Scow · USA 4732". |
ownerId | A 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
| Field | Type | Meaning |
|---|---|---|
timestamp | timestamp | Required. |
latitude / longitude | number | Required. WGS 84 degrees. |
speedKnots | number | Speed over ground. |
cog | number | Course over ground, degrees true. |
heading | number | Where 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. |
gpsAccuracy | number | Horizontal accuracy in metres. Absent on watch recordings and most imports. |
heartRate | number | Beats per minute, from the watch. |
heelAngle | number | Degrees, signed: positive is starboard side down. Mounted phone only. |
trimAngle | number | Degrees, positive is bow up. Mounted phone only. |
Points are in ascending time order. Several things to know before using them:
- Don't assume one point a second. The rate can be 1, 2, 5 or 10 Hz, and there can be gaps. Anything that adds up time or distance per point has to use the real gap between points.
- Discard poor fixes. The app ignores points with
gpsAccuracyworse than 25 m, keeps points with no accuracy at all, and refuses to count a step between two points that implies more than about 48 knots or spans a dropout (more than three times the usual interval). coghas already been checked. Receivers keep reporting their last confident course at drifting speeds. The app replaces a course that disagrees with the track's own bearing by more than 60°, socogcan be trusted more than a raw receiver value, but at very low speed it is still weak.- Heel is a magnitude when you summarise it. Average
abs(heelAngle). A signed average over a beat with even tacks comes out near zero for a boat that was pressed hard all the way. - Tack convention: with the wind coming over the starboard side, the boat is on starboard tack. Upwind on starboard, the course is about
windDirection − angle, and on port aboutwindDirection + angle.
Motion events
| Field | Type | Meaning |
|---|---|---|
eventType | string | capsize or knockdown. |
timestamp | timestamp | When it happened. |
durationSeconds | number | How long the boat was over. |
confidence | string | high, medium or low. |
peakAcceleration | number | Peak acceleration during the event, from the phone's motion sensor. |
detectionMethod | string | How 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:
- Write the bundle shape with
formatVersion: 1and asessionsarray. - Give each session a UUID
id, asessionType,startedAt,endedAt,visibility: "private", andtackCount,gybeCountandcapsizeCount(0is fine: they are recomputed). - Write
trackPointsin time order, with timestamps in the format above (milliseconds for the widest compatibility). - Leave out what you don't know. Never write
0for an unknown wind: absent means unknown. - Don't set
recordingSourcetowatchorphonefor data that wasn't recorded by the app. Use your ownimport-<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
formatVersionchanges only for a change that would break existing readers. Everything so far, including the trim fields, the course, training results, sharing identity andsourceRecordingHz, was added within version 1 as optional fields.- Readers must ignore keys they don't recognise. New optional fields will keep arriving in version 1.
- Fields marked internal above (
workoutResultJSON's shape,venueId,userLocationId,estimatedWindDirectionAtStart) may change or disappear without a version bump. - Older files may lack any optional field. A file written before the app supported course marks has no
courseJSON, and so on.
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:
- Always: the full GPS track (where and when you sailed), times, and the session's settings.
- If recorded: heart rate (removed from comparison shares), heel and trim.
- Only on a comparison share: your name if you chose to include it, your boat, and the random
ownerId. - Never: your Apple ID, email, contacts, or anything about other sessions.
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.