ECLIPTIC :beacon — the sensor hub The seven channels

:beacon · the sensor hub

The seven synthesized channels

Beyond forwarding raw GNSS, the beacon synthesizes seven sentences. Two are standard-ish ($GPHDT, and $ZTLM which is proprietary), and five are the proprietary sensor channels that make this a sensor hub rather than a GPS repeater.

The exact field layouts, formats, ranges and examples live in the protocol reference — this page is what each channel is for.

Byte-level field tables for every sentence →

$GPHDT — true compass heading

The reason the whole sensor hub exists rather than a GPS puck. GPS course is only meaningful when moving, and an art car spends most of its time barely moving. Compass heading fills that gap, so the map stays track-up while parked and the drive-to arrow keeps pointing.

Derived from TYPE_ROTATION_VECTOR and corrected to true north with GeomagneticField. Emitted only when a heading is available.

Caveat

GeomagneticField needs a position. Until the first GPS fix arrives, $GPHDT carries magnetic heading labelled T — roughly 13° off at Black Rock City.

$ZTLM — IMU tilt and speed

Pitch, roll and ground speed. Speed is the GNSS fix's speed × 3.6, and is 0.0 when there is no fix.

Unlike $GPHDT and $ZENV, this channel has no absent-sensor suppression — a device with no rotation-vector sensor broadcasts 0.0 pitch and roll rather than staying silent.

$ZAUD — microphone level

RMS, peak, and a beat flag — three scalars, computed per audio frame (1024 samples at 16 kHz ≈ 15.6 Hz).

AudioLevels normalises rms and peak to 0..1 and derives the beat flag from an energy comparison against a decaying running average. The first frame never beats (no baseline), and sustained loudness stops beating as the average catches up.

Two consumers: the tablet's passenger oscilloscope, and zvision's audio_bus, which drives the tracker light's idle sound-reactive show when there is nothing to follow.

Privacy

The only audio API used is AudioRecord. The PCM buffer is a reused coroutine-local array reduced to three scalars in place; nothing audio-derived is written to storage or sent. RECORD_AUDIO is optional at every layer, and a background or boot-started service passes micEnabled = false and never requests the microphone foreground-service type.

$ZENV — ambient light

Raw lux from TYPE_LIGHT. Its job on the tablet is automatic screen dimming: a log-10 interpolation between 5 lux (floor 0.05) and 2000 lux (1.0), applied as a ceiling inside the burn-in scaffold. The single-writer rule →

Emitted only when a reading exists. A phone with no light sensor emits nothing and the tablet shows -- lx (no sensor). Absence is deliberately unrepresentable as a value, because a fabricated 0.0 would pin the fleet to minimum brightness in daylight.

$ZSHK — shock and impact

Event-driven, from TYPE_LINEAR_ACCELERATION. A window opens when acceleration crosses 1.5 g, tracks the peak for 120 ms, and reports the peak of the impulse rather than its onset — reporting the first threshold crossing was systematically under-reading severity. The 500 ms refractory period starts when the window closes, so one bump produces one sentence.

Cost of the change: up to 120 ms of added latency. Acceptable for a logged severity readout, not for an interlock.

Because every datagram is sent twice, the tablet de-duplicates byte-identical lines inside a 200 ms window — on the bench a single AP looked fine; on the playa the count would have doubled. Consumers diff a monotonic shockCount rather than watching the value.

$ZBCN — beacon health

Battery percentage, GNSS fix quality, satellite count and service uptime. Fields 2 and 3 are sniffed from passing GGA sentences. If the most recent GGA is more than 10 s old the beacon reports 0/0 rather than stale values, so a silent GNSS chip reads as “no fix”; before the first GGA they are 0/0.

This is the channel that gives hours of warning before the hub dies, which is what makes the battery-versus-Doze trade acceptable: roughly 2–4 days on battery if vehicle power fails, versus weeks asleep — and a sleeping beacon is operationally identical to a dead one.

The tablet's ops footer flags battery ≤ 20 % and either fixQuality ≤ 0 or satellites < 5 in red.

$ZODO — odometer

Trip distance since service start, and a persisted lifetime total. Both in metres — the on-screen readouts divide by 1000, the sentence does not.

TripOdometer accumulates haversine distance with three fail-closed gates:

GateRuleWhy
AccuracyMust be present and ≤ 20 m — applied to the first fix tooSo a poor cold-start fix never becomes the anchor
Jitter floorSteps below 5 m ignoredStationary GPS noise must not accumulate
TeleportAny step implying > 160 kph rejected, as are non-positive time deltasMultipath. The ceiling is the app's own SetSpeed limit, so a real highway drive to the event is never rejected while a teleport implying thousands of km/h always is

A rejected step holds the anchor and adds zero, so a bad fix cannot poison the next comparison and recovery is automatic. Fail-closed throughout, because totalMeters is unrecoverable once written.

Converted from
docs/PROTOCOLS.md §2 · ARCHITECTURE.md §5 · README.md