Commit Graph
377 Commits
Author SHA1 Message Date
Sameh Khamis a800d28ddf Merge branch 'main' into feature/catalonia-cctv-cameras 2026-10-15 16:05:20 -07:00
Sameh Khamis d3cedbaaaf Merge branch 'main' into feat/lithuania-cctv 2026-10-15 16:04:24 -07:00
Sameh Khamis a75550024d Merge branch 'main' into feat/king-county-camera-pack 2026-10-15 15:57:27 -07:00
Sameh Khamis 248a658713 fix(cctv): serve only live feeds on /media
/api/cctv/media relayed still-image cameras with an ordinary fetch: it followed
redirects to any host, passed through any content type and had no body cap.
Stills are served by /api/cctv/frame, which keeps redirects on the registered
origin, accepts only image/* and caps the body, and no client requests a still
through /media. /media now answers 404 for anything but HLS, MP4/WebM and
MJPEG, before any upstream request.
2026-10-15 15:53:09 -07:00
Sameh Khamis 3f239f1173 fix(cctv): give Catalonia cameras stable ids and pin their frame paths
Ids were built from the feed's fid, which embeds an upstream server-start stamp,
so every upstream restart renamed all cameras (it already had since the PR
fixture). Ids now come from the validated frame URL (cat-sct-<stem>, or host
and path for partner cameras), which also collapses the five duplicate rows.
Frame links must sit directly in each host's frame directory with no explicit
port, and sctidcam must be a bare image filename. Numeric entity decoding
handles hex references and leaves invalid code points as written, so one bad
name no longer empties the pack. Counts in the docs are now ~130.
2026-10-15 15:21:34 -07:00
Sameh Khamis 76bfd74a78 fix(cctv): harden the WSDOT catalog fetch and describe its real direction codes
The catalog fetch now refuses redirects, cancels rejected bodies and reads
through the shared capped reader before the windows-1252 decode. The feed sends
cardinal codes plus B (both), O and null, not BW or diagonals; tests, comments
and docs now say so, with unchanged id-hash fallbacks. Documents the 8-1,200
per-pack range, drops the unverified low-volume compliance claim for facts and
a link to WSDOT's terms, and stops claiming the per-pack defaults fit under
the 4,000 cap: it is filled round-robin.
2026-10-15 15:17:59 -07:00
Sameh Khamis bcfba77196 fix(cctv): make the Lithuania pack opt-in until its licence is confirmed
The camera endpoints are the eismoinfo.lt website backend, which the Via
Lietuva open-data statement does not list, so the pack now follows the NYC
opt-in pattern (CCTV_LITHUANIA_ENABLED=1) and the docs say why. A failed
catalog request now aborts its sibling instead of leaving it open until the
timeout, and a redirect is logged as not followed.
2026-10-15 15:17:31 -07:00
Sameh Khamis 4887162d76 fix(cctv): harden the King County catalog fetch and dedupe before the cap
The catalog fetch now refuses redirects, cancels rejected bodies and reads
through the shared capped JSON reader. Duplicate ids are dropped before
prioritization so they cannot use up the per-pack cap. Vendor-generic model
strings (PTZ, PTZ IP, BOSCH/PTZ) are treated as no model. Comments and credits
say why WSDOT rows are skipped (their frames are WSDOT-hosted, outside the
pinned origin) and name Newcastle as the partner city that appears.
2026-10-15 15:17:11 -07:00
Sameh Khamis 7b1032bfc7 docs(cctv): document the Toronto pack and the shared camera cap
Adds the Toronto settings to .env.example and a current-state section for the
pack, restores an approximate camera count in the README, and corrects the
claim that adding a pack never trims another region: with the shared
4,000-camera cap, the largest packs give way round-robin. Fixes two stale
comments about the list's refresh and the ground-height sidecar.
2026-10-15 15:15:49 -07:00
Sameh Khamis 7561a5ab82 Merge branch 'main' into feat/cctv-toronto 2026-10-15 14:23:19 -07:00
Sameh Khamis 24f14a77a3 Merge branch 'main' into feat/wsdot-camera-pack
Keeps main's 4,000 catalog-wide camera cap, which main pins in tests; WSDOT
shares it round-robin with the other packs. The branch's earlier cap raise and
its removal of main's cap tests are reverted in this merge.
2026-10-15 14:22:22 -07:00
Sameh Khamis dca24996d5 Merge branch 'main' into feat/king-county-camera-pack 2026-10-15 14:21:10 -07:00
Sameh Khamis b4d852587a Merge branch 'main' into feat/lithuania-cctv 2026-10-15 14:21:07 -07:00
Sameh Khamis e8b6ffd196 Merge branch 'main' into feature/catalonia-cctv-cameras
# Conflicts:
#	CHANGELOG.md
2026-10-15 14:18:47 -07:00
Meir Michanie 6fe8327ccb Merge upstream/main: bikeshare Toronto and scoped city failures
Upstream's #641 (bikeshare Toronto, city failures scoped to range with
partial outages read DEGRADED/STALE) replaced the layer-level GBFS
error strings this branch had msg()-marked, in the two paths that
conflicted.

- ingestion.js/viewport.js taken as upstream's per-city
  _failedCityIds tracking; the layer-level error assignments are gone.
- 'GBFS fetch error' still reaches the panel via stats.error from
  controls.js, so its mark moved there (translateFeedError keeps
  translating it).
- 'GBFS status update failed' no longer exists anywhere: pruned from
  es/ru and from the layerStatusText SITES table, which now pins the
  controls.js site instead of the removed ones.

Also brings #581 (upstream-read caps, OpenSky 429 cooldown) - no i18n
surface.

npm run i18n: complete (2553), no unmarked strings. npm test: only the
pre-existing environmental OPENAI_API_KEY leak in devFreshDotenv fails.
Build passes.
2026-10-15 23:02:30 +02:00
Sameh Khamis a02f729191 fix(opensky): cool down before reading a 429, and test the six caps
A 429 now starts the credit cooldown from its headers and drops the body
unread, so a stalled or oversized 429 cannot skip the governor; an oversized
snapshot is not retried. A 429 without retry-after now waits the intended
2 minutes (headers.get() returns null, which Number() read as 0 s). Adds
oversized-stream tests for OpenSky, adsb.lol, CelesTrak and TomTom that fail
on main, names the six reads in the changelog, and corrects the docs on
what was already bounded.
2026-10-15 13:08:37 -07:00
German KhokhlovandClaude Opus 5.5 7fd1dd867f Merge origin/main: Panoramax, bikeshare Norway/Detroit, cloud filter strength, Overpass cache
Conflicts:
- KartaView viewer moved into the shared photoViewer.js on main; its
  labels now take the provider name ("{name} street-level photo") and
  are translated there.
- Weather: main's cloud filter strength slider, with its labels in t().
- Street Level caption: translated creator line plus main's licence.

Panoramax status and error texts are marked like KartaView's, and
"Panoramax answered HTTP {status}" gets a template in the panel and the
layer row. Catalogs: es/ru 2553 messages each, complete.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 00:06:45 +04:00
German KhokhlovandClaude Opus 5.5 54f7513ef6 Merge meirm/i18n-spanish: upstream main (geocode proxy, radio mirror, CMR, terrain, tools)
Both sides had merged the same main features (cockpit emergencies, GNSS
integrity, geo file import) with their own i18n. Conflicts keep this
branch's reviewed version; the 7 catalog entries only the other side
used are pruned. Newer main commits come in unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 23:52:05 +04:00
German KhokhlovandClaude Opus 5.5 00704ddc89 i18n: fix review findings and polish ru/es strings
Fixes the 51 P0–P2 findings from the full review of the i18n branch and
the issues found while checking every new string on screen in ru and es.

- Translate errors and statuses that still reached ru/es in English:
  feed and tile errors, provider statuses, the ALPR chip, the traffic
  mode chip, voice plan step labels, fire feed values, receiver bands,
  scene save reasons and the Cesium attribution link.
- Show preset city names in the UI language (src/ui/placeNames.js);
  data and everything sent to the model stay English.
- Share layer names between the layer panel, HUD and voice card
  (src/ui/layerNames.js).
- Keep long ru/es strings whole: voice card error lines, analyst
  titles, the voice tier status, the Nepal evidence button, the ALPR
  retry chip. English layout is unchanged.
- Ask before a language switch drops unsaved work.
- Catalog fixes: glossary terms (пуск, пресет), gender agreement and
  consistent "peticiones" in es, fewer calques in both languages.
- Fix English text that was itself wrong (e.g. "Exit cockpit to fly to
  a weather", raw tool ids in voice plan steps).

Catalogs: es/ru 2535 messages each, complete.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 23:49:52 +04:00
Sameh Khamis 1bb8643a28 Merge branch 'main' into fix/cap-remaining-upstream-reads
# Conflicts:
#	CHANGELOG.md
2026-10-15 12:34:49 -07:00
Trygve Hemminghytt e2dacd92ea Merge remote-tracking branch 'origin/main' into HEAD 2026-10-15 21:15:57 +02:00
Said Turksever 09bdc105a6 Merge branch 'main' into feat/bikeshare-norway 2026-10-15 20:04:57 +01:00
Sameh Khamis c42b072e99 fix(overpass): tag caches by the sorted upstream set and cover installations
Uses a full SHA-256 of the sorted instance list, so reordering the same
instances for failover keeps the cache. Adds the installation-cache repoint
test (tagged, reordered, repointed, untagged, unconfigured) and the changelog
and current-state notes.
2026-10-15 10:48:38 -07:00
Sameh Khamis 4ede4ebbcd Merge branch 'main' into fix/overpass-cache-tracks-upstream 2026-10-15 10:47:46 -07:00
Said Turksever eeb8bc83fd Merge branch 'main' into feat/bikeshare-norway 2026-10-15 17:56:23 +01:00
Said Turksever 42d3c0c0d2 Merge branch 'main' into feat/bikeshare-norway 2026-10-15 17:32:25 +01:00
SaidandClaude Opus 5.5 7056fa113e Merge main into fix/radio-mirror-null-body
Resolve the CHANGELOG conflict by keeping every entry from main and
adding the radio entry on top; the previous main merge (cebd870)
had dropped 19 of main's entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 17:30:20 +01:00
Said Turksever cebd870b3b Merge branch 'main' into fix/radio-mirror-null-body 2026-10-15 14:33:30 +01:00
Said TurkseverandClaude Opus 5.5 3533b323b0 fix(radio): keep the || 500 fallback for a missing mirror status
Node always sets statusCode on client responses, but keeping the
fallback stops a missing status from reading as 200, as main did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:28:37 +01:00
Said TurkseverandClaude Opus 5.5 1fffdf7600 Merge upstream/main into fix/363-geocode-proxy
Resolve SECURITY.md against the Street View provider (#966): the browser
key now loads the Maps JavaScript API as well as Map Tiles, so the
'Map Tiles only' guidance becomes 'Map Tiles + Maps JavaScript API'
here and in CHANGELOG, CURRENT-STATE and google-key.js. The CHANGELOG
entry moves to [Unreleased]; its old section shipped in 0.2.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:28:26 +01:00
Mazeyar Moeini Feizabadi 65239ed110 Merge current main into GNSS integration candidate 2026-10-15 13:46:45 +02:00
ulihhhhandClaude Opus 5.5 da0a840b7b Merge upstream/main into feature/catalonia-cctv-cameras
Keep both: Catalonia CCTV alongside the NYC DOT TMC pack in the source
imports, README layer table and CURRENT-STATE data table, and both
CHANGELOG entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:09:28 +02:00
Ian BlenkeandSameh Khamis 504d56ba2b test: fix flaky timing and timeout guards (#969)
Clears the timeout guards once each race settles, measures the 15,000-vehicle transit ingestion with main-thread CPU time instead of wall time, and times the region-timeout case from the boundary lookup with a 2 s ceiling, below the 3 s default budget, so an ignored budget still fails.

Co-authored-by: Sameh Khamis <[email protected]>
2026-10-14 14:58:53 -07:00
Mazeyar Moeini Feizabadi 01a8ad7aa7 fix: address GNSS integrity and aircraft emergency review findings 2026-10-14 17:43:13 +02:00
Mazeyar Moeini Feizabadi 4240d04642 Merge current main into HAL-522 review candidate 2026-10-14 16:53:13 +02:00
Trygve Hemminghytt 6f054408da Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	DATA_SOURCES.md
#	docs/CURRENT-STATE.md
#	server/providers/cctv/constants.js
#	server/providers/cctv/sources.js
2026-10-14 16:00:43 +02:00
Said TurkseverandClaude Opus 5.5 128a689a56 fix(cctv): make the NYC DOT pack opt-in and carry DOT's disclaimer
NYC DOT asks developers who use its camera feed to sign a data-sharing
agreement, and this project does not hold one that covers downstream
installs. The pack now loads only when CCTV_NYC_ENABLED=1; unset, empty
or any other value makes no request to webcams.nyctmc.org (tested).

The NYC credit carries NYC DOT's requested application disclaimer
verbatim, and DATA_SOURCES, README, CHANGELOG, CURRENT-STATE and
.env.example describe the prerequisite.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 11:44:25 +01:00
Cliff Flood 7bdeff06a9 fix(cctv): base the Toronto ground prior on the city's real relief
The pack shipped a flat 90 m. Sampling a DEM at all 336 camera sites puts
the network between 76 m (Queens Quay) and 209 m (Keele & Steeles), mean
116 m: a median error of 14 m against the old value, 88 m at the 90th
percentile and 119 m at worst, with the Allen Road cameras — 170-197 m —
the furthest underground.

No constant fits a city with that much relief; the precomputed ground
heights are what place a camera properly, and until this pack has them the
prior is the fallback for a sidecar miss or an edited pose. The mean is at
least wrong in both directions rather than only one.

This value is not part of the served pose, so it changes no pose hash and
invalidates no precomputed entry.
2026-10-13 18:54:59 -04:00
Cliff Flood 51b89d3e4a feat(cctv): add the City of Toronto RESCU camera pack
The province's 511 pack covers Ontario's highways; this adds the municipal
network underneath it — roughly 336 cameras across downtown arterials plus
the Gardiner, DVP, Allen and Lake Shore, from the City's own open data.

The list is keyless and carries no frame URL, so frame URLs are built from
the convention the dataset documents (`CameraImages/loc####.jpg`) and a
camera number validated as plain digits. The frame proxy is therefore
pinned to the portal origin by construction rather than by trusting a
field. The list fetch refuses redirects, bounds the body it buffers, and
releases the transport on every rejection path.

The dataset publishes no camera facing. `D1`-`D4` look like a compass and
map trivially onto one, but they describe the *comparison* images — static
reference stills captured in 2016 and served from a different path — not
the live pan-tilt-zoom frame. A heading derived from them would be
confidently wrong for every camera in the city, so every camera takes the
shared id-hash fallback at low confidence, as headingless Austin, TfL,
Fintraffic and Calgary cameras do. A test pins that down so it is not
"fixed" later.

Names stay verbatim: the feed's labels are upper-case, and title-casing
would mangle MCCOWAN RD and ST HELEN'S AVE more often than it helped.

Carries the Open Government Licence – Toronto attribution the licence
requires. Disable with `CCTV_TORONTO_ENABLED=0`.
2026-10-13 18:54:59 -04:00
Mazeyar Moeini Feizabadi ec80c89c1e fix: integrate GNSS and emergency features with current main contracts 2026-10-13 17:42:30 +02:00
Leo PechnickiandClaude Opus 5.5 783c5b16f4 fix(gnss): date replayed snapshots by the proxy-reported age, not cross-clock fetchedAt
The layer compared the server's fetchedAt with the browser's clock, so a
skewed client clock could shift or void the 30-minute window. The proxy now
returns ageMs (its own now minus fetchedAt, at serve time, on fresh, cached
and stale answers); the source refuses a snapshot without a finite,
non-negative ageMs, and the layer dates rows as its now() - ageMs. fetchedAt
stays in the payload for display.

Tests: proxy cached/stale answers report ageMs on the server clock; the
source rejects missing/invalid/negative ageMs; the layer replay test drives
ageMs. qa-gnss stubs send ageMs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 17:20:43 +02:00
Leo Pechnicki fde8b2a64f fix(gnss): age degraded evidence and replayed snapshots on their own clocks
Maintainer review on #855 (mazy1998, 2026-10-06):

- records: presence (seenAt) and degraded evidence (degradedAt) age
  separately, so continuing healthy reports no longer keep an older
  degraded flag alive past 30 minutes; an aircraft returning after the
  window starts fresh. pruneGnssObservations ages the store with no new
  rows.
- Rows are dated by the snapshot's fetchedAt, which the proxy keeps on
  cached and stale answers: a replay never restarts the window, the
  proxy stops serving a stale snapshot older than the window, the source
  refuses an undated one, and cells expire during fetch failures and
  while there is no view anchor.
- Normalization accepts ADS-B versions 1 and 2 only; a missing, invalid
  or negative seen_pos is not a confirmed position from the last minute.
- qa-gnss: keyboard, 390x844 viewport (fresh page: isMobile reloads) and
  replay-age sections; the live cell assertion bins the returned rows
  with the layer's own rules instead of a raw row count.
2026-10-13 17:20:43 +02:00
Leo PechnickiandClaude Opus 5.5 6d4a2a02fe fix(gnss): separate GEV integrity classifier from GPSJAM aggregation; machine-readable provenance
Review on #855: the per-aircraft rule (NIC < 7 || NACp < 8, borrowed from
the US 14 CFR 91.227 ADS-B Out minima) is GEV-defined, not gpsjam's, and
gpsjam's map shows low navigation accuracy, not necessarily jamming.

- Primary cell state is now `navigation-integrity-anomaly` (medium/high) or
  `nominal`; `suspected-gnss-interference` is a secondary `interpretation`
  marked validated: false.
- GNSS_PROVENANCE / gnssProvenance({ windowMs }) records the classifier
  (gev-nic-nacp-v1, GEV, unvalidated), the gpsjam aggregation (formula,
  bands [0.02, 0.1], FAQ source) and the GEV 30-minute visited-view window,
  built from the constants the code applies. Exposed as layer.provenance
  and getStats().provenance; the proxy tags responses with `classifier`.
- Visible name "GNSS Integrity", legend "... low accuracy", blurb leads with
  low navigation accuracy and states the threshold is a GEV choice.
- Layer id `gnss-interference` and share token `0` unchanged.
- Voice aliases add "gnss integrity", "navigation integrity",
  "low navigation accuracy"; the interference aliases stay.
- Docs describe the method as GEV threshold + gpsjam aggregation.
- Tests: provenance object, renamed state/label, proxy classifier tag;
  qa-gnss asserts provenance and wording in the real app.

Hex project - Crew Leo Agile dev team.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-13 17:20:43 +02:00
Leo PechnickiandClaude 21201c78f0 fix(gnss): address review - reference source wiring, honest method, 429 backoff, QA render proof
- Route the adsb.lol GNSS source through createReferenceSources and the
  constructCatalog contract; app layer module is a thin pass-through.
- Describe the method honestly: gpsjam.org's published cell formula and
  bands; per-aircraft thresholds are the 14 CFR 91.227(c) ADS-B Out minima
  (NIC < 7, NACp < 8) plus readsb gpsOkBefore.
- Proxy: reuse the adsb.lol anchor parser, honour upstream Retry-After
  (clamped 5-120 s), serve stale during cooldown, cap the body size.
- Layer: redraw only when a cell id or band changes, treat a settling
  camera as a retry rather than a rejected enable, keep low cells visible,
  skip rows without finite coordinates, state the 3-aircraft rule in the
  legend blurb.
- Voice: gnss-interference in set_layer_visibility / show_data_layers_menu
  plus common aliases; voice pins re-derived.
- qa-gnss: stub the route in-page (request interception stalls Cesium's
  geometry workers), assert every cell is built, cover all bands over land
  and sea, screenshot every state with the Data Layers row open.

Hex project - Crew Leo Agile dev team.

Co-Authored-By: Claude <[email protected]>
2026-10-13 17:20:03 +02:00
Leo PechnickiandClaude eefcb338b3 feat(layers): GNSS interference layer from ADS-B NIC/NACp integrity
Bins airborne ADS-B v1/v2 aircraft that report degraded navigation
integrity (NIC < 7, NACp < 8, or readsb's GPS-loss flag) into 0.5 degree
cells over a rolling 30-minute window, coloured with the gpsjam.org
bands. Keyless: reads the capped adsb.lol point snapshot around the view
through /api/gnss-integrity, which returns integrity fields only, caches
60 s per whole-degree anchor, backs off on upstream 429 and serves the
last snapshot on failure. Adds scripts/qa-gnss.mjs.

Built by the Hex project (Crew Leo Agile dev team).

Co-Authored-By: Claude <[email protected]>
2026-10-13 17:19:23 +02:00
Michael JohnstonandClaude Opus 5.5 577a395bc3 Merge upstream main and retain PR 581 changelog entry
CHANGELOG-only conflict: the bullet stays first under [Unreleased], ahead of
the entries upstream added there. No code changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 09:27:10 -04:00
Aditya fc48eda113 fix(radio): reject null-body and out-of-range mirror statuses instead of crashing
fetchPinnedRadioResponse built `new Response(stream, { status })` inside
the raw https response callback, which runs outside the surrounding
promise. A Radio Browser mirror answering 204, 205 or 304 (null-body
statuses), or any status outside 200-599, made the Response constructor
throw. Nothing caught it, so the whole dev/preview server process exited
and every layer went down, not only radio. The catalog's mirror failover
never saw the error.

Mirror the guard local-receivers.js already uses: null-body statuses get
a null body, statuses outside 200-599 are rejected, and anything thrown
in the callback rejects the promise so the existing error handling and
mirror failover run.
2026-10-13 17:04:20 +05:30
German KhokhlovandClaude Fable 5.1 361f1c0fb8 fix(street-level): refuse tile misses during a 429 wait; parse HTTP-date Retry-After; cap a cached tile's size
Review of #974 (asturksever):

- After a 429 the other tiles of the view, and the fetches queued behind the
  first, still went to Mapillary. The proxy now answers 429 itself until the
  wait is over, scoped to the token that was refused.
- A Retry-After sent as an HTTP date read as 60 s; it is now the seconds
  left, with the same 10-minute cap.
- A body that failed to trim (up to the 48 MiB cap) could fill the 120-entry
  cache; anything over 4 MiB is served but not kept.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-13 13:27:41 +04:00
German KhokhlovandClaude Fable 5.1 c29ccd55d6 Merge origin/main: keep the provider registry, slim it
main grew the Street Level provider registry while this branch removed it
(#982–#985: injected providers, an empty composition, the `r` switch field).
The registry, params, uiState and pick router come back as main has them and
the slimmed layer sits behind the provider contract:

- The core (index.js) drives providers as on main, without surface modes,
  ground casting, FOLLOW, prewarm and nearest-image lookups. A provider's key
  status is asked with a 10 s timeout and asked again on a switch-on while no
  key is known.
- Mapillary is mapillaryProvider.js over the slim coverage, sequences and
  viewer modules, which read the filter and the active flag from the provider
  context.
- The viewer host mounts one provider adapter at a time, no prewarm.
- The panel has a chip per provider again (the pill switches the layer);
  no legend, EXPAND stays the Fullscreen API.
- The contract drops what no provider implements: groundCaster, meshSampler,
  getSurface/setSurface, nearestImage, prewarm, reportError, the legend and
  surface fields of the UI snapshot.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-13 13:24:25 +04:00
Matt Van Horn ffb332472d feat(layers): add FAA drone restrictions airspace layer
Show US prohibited and restricted special-use airspace from the keyless
FAA SUA FeatureServer as an off-by-default Infrastructure layer, with
share-link token 3 and an informational-only disclaimer.
2026-10-12 19:35:29 +00:00