Fleet race aggregate — start, leg, and race stats for one race
Returns the start-line, per-leg, and full-race stats that power the printable Fleet Race report and the fleetRaceInfo view in the web UI. Single race per call; for cross-race comparisons, list event(key).races and call this for each.
Preconditions: the race must have a proper course defined (at minimum start line + finish line). Per-leg fields require all marks to be set. fleetRaceInfo errors at the resolver if the course is incomplete.
boatKeys is optional — omit to get every boat in the event; pass to restrict.
Query
query FleetRaceView($raceKey: ID!, $boatKeys: [ID!]) {
race(key: $raceKey) {
key
name
fleetRaceInfo(boatKeys: $boatKeys) {
boats { key name }
startData {
boat { key }
lineCross
lineCrossRank
belowLineGun
belowLineGunRank
sogGun
sogGunRank
sogLine
sogLineRank
lineLength
crossLineDistToStbdRelative
sogGunMinus5Relative
sogGunPlus5Relative
distanceCrossToBiasPointRelative
lastManeuverSec
lastManeuverTimeToKill
laneXteMax
}
legsData {
legNumber
type
boats { ...legBoatStats }
}
raceData {
boats { ...legBoatStats }
}
}
}
}
fragment legBoatStats on FleetRaceLegBoatData {
boat { key }
distance
distanceRank
duration
durationRank
avgTws
avgTwd
avgSogKts
avgSogKtsRank
maxSogKts
maxSogKtsRank
minSogKts
minSogKtsRank
avgVmcKts
avgVmcKtsRank
maxVmcKts
maxVmcKtsRank
minVmcKts
minVmcKtsRank
legStartTime
legStartTimeRank
legEndTime
legEndTimeRank
timeToLeader
foilingTimePerc
foilingTimePercRank
tacks
tacksRank
gybes
gybesRank
maneuvers
maneuversRank
liftInfos {
referenceType
referenceTwdAvg
liftAvg
liftAvgRelative
liftMin
liftMinTime
liftMax
liftMaxTime
liftedRatio
}
}
Variables:
{ "raceKey": "Race_…", "boatKeys": null }
Aggregating across multiple races
fleetRaceInfo is per-race. To cover a regatta, fetch the race list first and call this query per race in parallel:
query EventRaces($eventKey: ID!) { event(key: $eventKey) { races { key } } }
Field meanings
Response top-level
boats— flat list of participating boats (boatKeysif you passed it, otherwise every boat in the event).startData— per-boat start-line analysis. One entry per boat.legsData— per-leg breakdown. One entry per leg of the course.raceData.boats— per-boat aggregates across the whole race, in the sameFleetRaceLegBoatDatashape as a single leg.
Every quantitative field has a paired …Rank (1 = best in fleet for that metric).
startData per boat
Linear / timing:
lineCross(s) — seconds after the gun the bow crossed the line. Negative = early (OCS).belowLineGun(m) — bow distance below the line at the gun. Negative = over.sogGun,sogLine(knots) — SOG at the gun and at the moment of line cross.sogGunMinus5Relative,sogGunPlus5Relative— SOG 5 s before / after the gun, expressed as a ratio ofsogGun(so 1.0 = same as gun).
Line position:
lineLength(m) — start-line length. Race-level constant, repeated per boat.crossLineDistToStbdRelative— where on the line the boat crossed, normalised. 0 = stbd / RC end, 1 = port / pin end.distanceCrossToBiasPointRelative— distance from cross point to the favoured end (relative to line length). 0 = at bias point.
Pre-start handling:
lastManeuverSec(s) — seconds before the gun of the last tack/gybe.lastManeuverTimeToKill(s) — TTK at that moment (or at gun−60 s, whichever is later).laneXteMax(m) — max XTE during the final lane (last maneuver or gun−60 s, whichever is later).
legsData entries
legNumber— 1-based leg index.type—PointOfSailenum:Upwind/Downwind/Reach.boats— per-boat stats for this leg (FleetRaceLegBoatData).
FleetRaceLegBoatData (used by legsData[].boats and raceData.boats)
distance/duration(m / s) — sailed, not theoretical.avgTws,avgTwd— averages over the leg.avgSogKts,minSogKts,maxSogKts(knots) — SOG distribution over the leg.avgVmcKts,minVmcKts,maxVmcKts(knots) — VMC (velocity made on course toward next mark).legStartTime,legEndTime(ISO strings) — when this boat entered / exited the leg. ForraceData.boats,legEndTimeis the boat's finish time.timeToLeader(s) — seconds behind the boat leading at leg end.foilingTimePerc(0..1) — fraction of leg time foiling. Needs aFoilingmetric in the data.tacks,gybes,maneuvers— counts of each over the leg.liftInfos— wind-shift analysis vs a reference TWD.referenceTypetells you what the reference is;liftAvg/liftMin/liftMaxare degrees;liftedRatio(0..1) is the fraction of leg time on a lifted vs. headed shift.
Notes
- All boats appear in
boats[]even if they didn't sail. MissingstartData/legsDataentries mean that boat's data wasn't available for that race or leg. - Single-boat input is valid; rank fields trivially come back as 1.
- For "rank delta between leg 1 and finish" (common ask), use the per-boat
legsData[0].boats[i].legEndTimeRankvsraceData.boats[i].legEndTimeRank. - For "where on the line was the bias?" — sort the fleet by
distanceCrossToBiasPointRelativeand look at the cluster.