From cf2afc0f41956f0b0857b00b3108e88b30a6672b Mon Sep 17 00:00:00 2001 From: "vitalii.semianchuk" Date: Wed, 15 Jul 2026 20:15:16 +0100 Subject: [PATCH] Fix AIRCRAFT_JSON_URL default to include /data/ path and wire up verticalRate display The documented default URL for AIRCRAFT_JSON_URL was missing the /data/ prefix that the server code actually uses. Updated README, pi-setup docs, systemd service, and install script to match the real default of http://localhost:8080/data/aircraft.json. The showFields.verticalRate toggle existed in config and control panel but was never checked in labelLines(), so enabling it had no effect. Added the missing check so baroRate is rendered in the label when the toggle is on. --- README.md | 2 +- pi-setup/README.md | 2 +- pi-setup/install-on-pi.sh | 2 +- pi-setup/skylight-server.service | 2 +- web/src/display/renderer.ts | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 84f692cf..8b6522bc 100644 --- a/README.md +++ b/README.md @@ -278,7 +278,7 @@ geometry - turn off **Airport runways** if you've moved, or replace it in | Env | Default | Meaning | |---|---|---| | `DATA_SOURCE` | `radio` | `radio` (dump1090) or `api` (airplanes.live) | -| `AIRCRAFT_JSON_URL` | `http://localhost:8080/aircraft.json` | dump1090 feed | +| `AIRCRAFT_JSON_URL` | `http://localhost:8080/data/aircraft.json` | dump1090 feed | | `SUPPLEMENT_API` | `1` | When on radio, merge the API too (keeps landing aircraft alive) | | `PORT` / `HOST` | `3000` / `0.0.0.0` | HTTP + WebSocket | | `ALLOWED_HOSTS` | *(empty)* | Extra Host/Origin allowlist entries, comma-separated. Wildcards: `*.example.com`. Loopback, RFC1918 LAN, IPv6 ULA / link-local, and `*.local` are allowed by default. | diff --git a/pi-setup/README.md b/pi-setup/README.md index df273f21..fde75312 100644 --- a/pi-setup/README.md +++ b/pi-setup/README.md @@ -52,7 +52,7 @@ LAT=37.6213 LON=-122.379 ./pi-setup/install-on-pi.sh # set your coord Installs the rtl-sdr-blog V4 driver (+ DVB-T blacklist), dump1090-fa, Node + pnpm, builds the app, and enables the `skylight-server` service. **Verify decode first** with -`rtl_test -t` and `curl -s localhost:8080/aircraft.json | head` before moving on. +`rtl_test -t` and `curl -s localhost:8080/data/aircraft.json | head` before moving on. ## 3. Kiosk display - on the Pi diff --git a/pi-setup/install-on-pi.sh b/pi-setup/install-on-pi.sh index cc6b3ea0..7e4c145b 100755 --- a/pi-setup/install-on-pi.sh +++ b/pi-setup/install-on-pi.sh @@ -122,6 +122,6 @@ echo echo "Done." echo " Display : http://localhost:3000/ (point Chromium kiosk here — see setup-kiosk.sh)" echo " Control : http://$IP:3000/control (open on your phone)" -echo " Decoder : http://$IP:8080/aircraft.json (raw decoded feed)" +echo " Decoder : http://$IP:8080/data/aircraft.json (raw decoded feed)" echo echo "Verify decode first: rtl_test -t then curl -s localhost:8080/data/aircraft.json | head" diff --git a/pi-setup/skylight-server.service b/pi-setup/skylight-server.service index e209266f..9e20ba49 100644 --- a/pi-setup/skylight-server.service +++ b/pi-setup/skylight-server.service @@ -13,7 +13,7 @@ Environment=NODE_ENV=production Environment=PORT=3000 Environment=HOST=0.0.0.0 Environment=DATA_SOURCE=radio -Environment=AIRCRAFT_JSON_URL=http://localhost:8080/aircraft.json +Environment=AIRCRAFT_JSON_URL=http://localhost:8080/data/aircraft.json ExecStart=__PNPM__ -F server start Restart=always RestartSec=3 diff --git a/web/src/display/renderer.ts b/web/src/display/renderer.ts index c753a97a..08827c25 100644 --- a/web/src/display/renderer.ts +++ b/web/src/display/renderer.ts @@ -156,6 +156,10 @@ export function labelLines(cfg: Config, ac: Aircraft): { text: string; kind: "ti else if (alt != null) sub.push(formatAltitude(alt, cfg.altitudeUnit)); } if (f.speed && ac.gs != null) sub.push(formatSpeed(ac.gs, cfg.speedUnit)); + if (f.verticalRate && ac.baroRate != null) { + const sign = ac.baroRate > 0 ? "+" : ""; + sub.push(`${sign}${ac.baroRate} fpm`); + } if (sub.length) out.push({ text: sub.join(" "), kind: "sub" }); if (f.destination && ac.destination && routePlausible(ac, cfg)) {