Build a Tiny HTTP Dashboard
/sim is lovely when your program lives in the guest. HTTP is the same flight data wearing shoes
and visiting another process.
This guide builds a tiny host-side dashboard from the atomic world snapshot. One request gives you a self-consistent view instead of a handful of fields sampled at slightly different moments.
Before you start
Section titled “Before you start”- Leave
http_enabled = trueingatos.toml. - Read the actual port from the gatOS status window. The preferred host address is
http://127.0.0.1:4242/v1. - Install
jqon the machine running the command.
Read the world
Section titled “Read the world”curl -s http://127.0.0.1:4242/v1/snapshot | jq .The same immutable snapshot feeds /sim, MQTT, serial, and MCP. HTTP simply packages it as JSON.
Print an active-vessel status line
Section titled “Print an active-vessel status line”#!/bin/shset -eu
base=${GATOS_HTTP:-http://127.0.0.1:4242/v1}
while :; do curl -fsS "$base/vessels/active/telemetry" | jq -r '"\(.id) alt=\(.alt.radar)m speed=\(.vel.surf)m/s fuel=\(.mass.p)kg"' sleep 0.5done- Save the script and run
chmod +x watch-flight.sh. - Launch or select a vessel in KSA.
- Run
./watch-flight.sh. - Change altitude or throttle and watch the line follow along.
When polling is the wrong tool
Section titled “When polling is the wrong tool”Use /v1/events for discrete events and the vessel stream endpoint for a continuous feed. Use
/v1/fs/<path>?stream=1 when one scalar is all you need. A dashboard that asks for the world 60 times
a second is mostly benchmarking its own enthusiasm.
HTTP referenceRoutes, response shapes, streaming behavior, limits, and command writes.