Skip to content

DataField screen

Garmin
Status 🟡 (see Known deviations)
Code apps/garmin-datafield/source/SailEverView.mc, apps/garmin-datafield/source/DataModel.mc, apps/garmin-datafield/source/Chart.mc, apps/garmin-datafield/source/CogCalculator.mc, apps/garmin-datafield/source/BaroIndicator.mc

Verified against code: 2026-10-11

Purpose

One screen with everything a sailor glances at: speed and its recent curve, course and the angle of the last tack or jibe, distance and average speed, pressure and its trend, position, clock, timer, GPS and battery status. It is read at a glance on deck, so it uses black text on white, large numbers for the key values and orange for labels.

Layout / behaviour

Grid

The screen is cut into a grid of 4 columns and 5 rows. cellWidth = round(w / 4) and cellHeight = round(h / 5), where w and h are the field's width and height in pixels (integer division first, so fractions below are rounded to whole pixels). spacer = round(h / 22) sizes the small icons.

All positions below are fractions of the field width (x) and height (y). x 0.50 is the centre. "Anchor" is the point the text is aligned to.

 y 0.00 ┌──────────────────────────────────────┐
        │   ▂▄█ GPS     12:34      [███ ] batt │  row 1: status
 y 0.20 ├─────────────┬──────────┬─────────────┤
        │       +92°  │   6.4    │ Ø 5.3       │  rows 2–3
        │        CoG  │  (SOG)   │ nM          │
        │       245°  │ ▁▃▅▇▆▅▃  │ 12.34       │  black panel with speed curve
 y 0.60 ├─────────────┴──────────┴─────────────┤
        │ ▼   hPa  47° 12.345' N               │  row 4: pressure and position
        │    1013  13° 24.567' E               │
 y 0.80 ├──────────────────────────────────────┤
        │             1:23:45                  │  row 5: timer
 y 1.00 └──────────────────────────────────────┘

Drawing order (later items draw on top): background, grid and black panel, GPS bars, clock, battery, speed curve, SOG, tack/jibe angle, COG, average speed, distance, pressure, position, timer, labels, pressure trend arrow.

Background and grid

Element Position Size Colour Notes
Background whole field — white 0xFFFFFF Always white. The activity's background colour setting is ignored.
Line under row 1 y 0.20, x 0.00–1.00 1 px black
Line under row 3 y 0.60, x 0.00–1.00 1 px black
Line under row 4 y 0.80, x 0.00–1.00 1 px black
Black panel x 0.30–0.70, y 0.20–0.60 1.6 × cellWidth by 2 × cellHeight black Holds the SOG and the speed curve.

Row 1: status (y 0.00–0.20)

Element Position Font / size Colour Content & format Constraints
GPS bars 3 bars from x 0.19 (left edge), bottoms aligned at y ≈ 0.18 bar width spacer (≈ 0.045 h), 1 px gap; heights 1, ≈ 1.5 and 2 × spacer, rising left to right lit: blue 0x00AAFF; unlit: light grey 0xAAAAAA Bar 1 lit at GPS quality ≥ 2 (poor), bar 2 at ≥ 3 (usable), bar 3 at 4 (good). Quality is Activity.Info.currentLocationAccuracy. null counts as 0: all bars grey.
Clock centre x 0.50, y 0.12 FONT_LARGE black H:MM, 24-hour, hour without leading zero, minutes with (7:05, 14:30) Ignores the watch's 12-hour setting.
Battery outline top-left x 0.675, y 0.11 width cellWidth / 2.2 (≈ 0.114 w), height cellWidth / 4 (≈ 0.0625 w) light grey 0xAAAAAA, 1 px outline —
Battery fill inside the outline, inset 2 px width = battery % / 100 × outline width − 4 px, height = outline height − 4 px blue 0x00AAFF State of charge from System.getSystemStats().battery No number, no low-battery colour. See Known deviations for low charge.

Rows 2–3, left column: course (x 0.00–0.30)

Element Position Font / size Colour Content & format Constraints
Tack/jibe angle right-aligned at x 0.275, y 0.27 FONT_SYSTEM_TINY black Signed whole degrees: +92° (turn to starboard, clockwise), -92° (turn to port) Hidden while the value is 0, i.e. no turn of more than 30° (see Course).
CoG label right-aligned at x 0.275, y 0.40 FONT_SYSTEM_TINY orange 0xFF5500 Text CoG Always shown.
COG right-aligned at x 0.275, y 0.52 FONT_LARGE black Whole degrees 0–359 with °, no leading zeros (7°, 245°) - when there is no valid course.

Rows 2–3, centre: speed (black panel, x 0.30–0.70)

Element Position Font / size Colour Content & format Constraints
SOG, up to 9.9 kn centre x 0.50, y 0.36 FONT_SYSTEM_NUMBER_HOT white Knots, one decimal (6.4). No unit. Used while SOG ≤ 9.9. The digits overlap the top of the speed curve.
SOG, above 9.9 kn centre x 0.50, y 0.34 FONT_NUMBER_MEDIUM white Knots, one decimal (12.3) Smaller font so three digits fit.
Speed curve x 0.30–0.70 (minus 1 px), y 0.40–0.60 one vertical bar per pixel column bars blue 0x00AAFF on the black panel See Speed curve

Rows 2–3, right column: distance (x 0.70–1.00)

Element Position Font / size Colour Content & format Constraints
Ø label left-aligned at x 0.725, y 0.27 FONT_SYSTEM_TINY orange 0xFF5500 Text Ø (average) Always shown.
Average speed left-aligned at x 0.725 + width of Ø in FONT_SYSTEM_TINY, y 0.27 FONT_SYSTEM_TINY black Knots. Below 10: one decimal (5.3). From 10: no decimal (12). No unit. 0 → 0.0.
nM label left-aligned at x 0.725, y 0.40 FONT_SYSTEM_TINY orange 0xFF5500 Text nM (nautical miles) Always shown.
Distance left-aligned at x 0.725, y 0.52 FONT_LARGE black Nautical miles. Below 10: two decimals (3.47). 10 to below 100: one decimal (34.7). From 100: no decimal (347). 0 → 0.00.

Row 4: pressure and position (y 0.60–0.80)

Element Position Font / size Colour Content & format Constraints
Pressure trend arrow box from x 2 × spacer (≈ 0.091 h), y 0.70 − 8 px; box width spacer (≈ 0.045 h), height 1.3 × spacer (≈ 0.059 h) filled triangle blue, yellow 0xFFAA00 or red 0xFF0000 See Pressure trend arrow x is derived from the height; the same on all (square) supported screens.
hPa label right-aligned at x 0.325, y 0.66 FONT_SYSTEM_TINY orange 0xFF5500 Text hPa Always shown.
Pressure right-aligned at x 0.325, y 0.74 FONT_SYSTEM_TINY black Whole hPa, no decimals (1013) 0 without a barometer reading.
Latitude left-aligned at x 0.375, y 0.66 FONT_SYSTEM_TINY black Degrees and decimal minutes: 47° 12.345' N. Degrees without leading zeros, minutes with 3 decimals and no leading zero (5.120'), then N or S. 0° 0.000' N until the first position. 0 counts as N.
Longitude left-aligned at x 0.375, y 0.74 FONT_SYSTEM_TINY black Same format, E or W: 13° 24.567' E 0° 0.000' E until the first position. 0 counts as E.

Row 5: timer (y 0.80–1.00)

Element Position Font / size Colour Content & format Constraints
Timer centre x 0.50, y 0.88 FONT_LARGE black Garmin's activity timer (timerTime, stops while paused) as H:MM:SS. Hours without leading zero and without upper limit (0:05:30, 12:03:09). 0:00:00 before the timer starts.

Fonts

Fonts are Garmin system fonts, so their pixel size depends on the device; the layout does not scale them. Example, fēnix 7 Pro (260×260 MIP): FONT_SYSTEM_TINY Roboto 18 bold, FONT_LARGE Roboto 25 bold, FONT_NUMBER_MEDIUM condensed bold numbers 36, FONT_SYSTEM_NUMBER_HOT bold numbers 50. AMOLED devices use scalable system fonts that are larger in pixels, in proportion to their larger screens.

Speed curve

The curve shows the SOG of the last 160 seconds as blue bars, newest on the right.

  • Every SOG value (once per second) goes into a bucket. After 4 values the bucket's mean becomes the newest of 40 slots, and the oldest slot drops out. 40 slots × 4 s = 160 s (2 min 40 s).
  • At start all slots are empty. Empty slots draw nothing, so the curve grows in from the right.
  • Vertical scale: the bottom is 0 kn and the top is the larger of 7 kn and the highest visible slot. The scale then gets a margin of 10 % of that top above and below. So the visible range is −0.1 × top … 1.1 × top, and 0 kn still shows a short bar (1/12 of the curve's height).
  • The scale only grows past 7 kn while a faster slot is visible. It shrinks back when that slot leaves the curve.
  • Each pixel column shows the slot at (column − left edge) × 39 / width, rounded down. Every slot is about width / 39 pixels wide, except the newest, which only gets the last pixel column.
  • There is no connecting line (the line colour is transparent) and no axis or scale label.

Course: COG and tack/jibe angle

COG comes only from the GPS direction of travel (Position.getInfo().heading). The compass heading (Activity.Info.currentHeading) is never used, because on watches with a compass it shows where the wrist points, not where the boat goes.

Each second:

  1. SOG below 1.0 kn: no course. COG shows -, the angle is hidden and the course history is cleared.
  2. No heading, or GPS quality (Position.getInfo().accuracy) below 2: the same as 1.
  3. Otherwise the heading goes into the history. COG shows the circular mean of the last 5 headings (about 5 s). The tack/jibe angle compares the first 2 and the last 2 of the last 30 raw headings (about 30 s) and is shown when it is more than 30° either way.

The angle is not held after a turn. It is visible while the 30-second window spans the turn and disappears once the headings from before the turn have left the window. It is first possible 30 s after a valid course starts. The maths (circular mean, shortest signed difference, rounding) is in ../shared/calculations.md.

Pressure trend arrow

The arrow shows whether the barometric pressure is rising, falling or steady. The trend algorithm (adaptive sampling over up to 6 hours, sensitivity, 60 % and 80 % ratios) is shared with the WatchApp and specified in ../shared/calculations.md.

Trend Shape in the arrow box Colour
Fewer than 3 samples, or no clear trend pointing right (tip at the right middle, base from 1/4 to 3/4 of the box height on the left) blue 0x00AAFF
Rising (≥ 60 % of the older samples clearly lower) pointing up (tip top centre, base along the bottom) yellow 0xFFAA00
Rising strongly (≥ 80 %) pointing up red 0xFF0000
Falling (≥ 60 % of the older samples clearly higher) pointing down (base along the top, tip bottom centre) yellow 0xFFAA00
Falling strongly (≥ 80 %) pointing down red 0xFF0000

DataField specifics:

  • Input is the displayed pressure in hPa (ambientPressure / 100). Readings of 0 (no barometer) are not sampled.
  • The trend clock starts when the field is loaded (System.getTimer() when the view is created), not when Garmin's timer starts. It keeps running while the activity is paused.
  • The first sample is taken 2 minutes after the field loads, so the first trend can appear after 6 minutes (3 samples).
  • Red means a strong trend in either direction. There is no separate storm alert, tone or vibration, and no 1.5 hPa / 3 h rule in the DataField.

Field size and obscurity

The DataField is designed for the 1-field layout, where it fills the whole round screen.

  • The grid scales to whatever size Garmin gives the field (onLayout), but the fonts do not. In a smaller slot (2-field and more layouts) texts overlap and run outside their cells.
  • The field does not read getObscurityFlags(). Nothing moves in from the round edge. The fixed positions are chosen so the 1-field layout fits a round screen. A three-digit longitude (123° 24.567' W) is the widest text and can come close to the round edge on the smallest screens.
  • There is no reduced layout for small slots and no fallback that shows only one value.

MIP vs AMOLED

The code is the same for both display types: white background, same colours, same positions. There is no low-power or always-on handling (no onPartialUpdate, no dimmed variant, no burn-in shifting).

Screen sizes

All 72 supported products have round screens from 218×218 to 466×466 (see README.md). Positions are fractions, so the layout holds on every size. Only the font sizes differ.

States and edge cases

State What the screen shows
Field loaded, Garmin timer not started Clock, GPS bars and battery live. Timer 0:00:00, distance 0.00, average 0.0. SOG and COG live once GPS has a fix. The speed curve already fills.
No GPS fix All GPS bars grey. SOG 0.0 (no speed). COG -, no tack/jibe angle. Position 0° 0.000' N / 0° 0.000' E until the first fix, after that the last known position.
GPS fix lost later COG - and the course history is cleared. The last known position stays.
Moored / below 1.0 kn COG -, no tack/jibe angle. Negative speed jitter is shown as 0.0.
Activity paused Timer, distance and average stop (Garmin's values). SOG, COG, position, clock, speed curve and pressure trend keep running.
No barometer reading Pressure 0. The arrow stays blue and points right.
SOG exactly between 9.9 and 10.0 (e.g. 9.93) Shown as 9.9 in the smaller font.
Very long Garmin activity Timer hours grow without limit. Distance from 100 nm has no decimals.

Known deviations

  • Low battery draws a negative-width fill. The fill width is battery % / 100 × width − 4 px. Below about 4 px / outline width (≈ 15 % on a 240 px screen, ≈ 8 % on 454 px) it is negative. Low battery is therefore not shown reliably, and there is no warning colour.
  • Speed curve is 160 s, not 3 minutes. The chart is set up for 3 minutes, but 3 × 60 / 40 is cut to 4 s per slot, giving 160 s. Marketing ("last 3 minutes") and the website film describe 3 minutes.
  • Newest slot of the speed curve is one pixel wide because of the integer index mapping.
  • Clock ignores the 12-hour setting.
  • Small slots are not supported although the website says the field "works next to your other data fields".
  • Label nM is not a standard abbreviation for nautical miles (NM or nm).
  • Minutes can round up to 60.000' in the position (e.g. 59.9996'), because degrees are cut and minutes are rounded separately.