diff --git a/CHANGELOG.md b/CHANGELOG.md index b502190..d7b8fc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to iNTERCEPT will be documented in this file. +## [2.26.11] - 2026-03-14 + +### Fixed +- **APRS map ignores configured observer position** — The APRS map always fell back to the centre of the US (39.8°N, 98.6°W) when no live GPS fix was available, ignoring the observer position configured in `.env` (`INTERCEPT_DEFAULT_LAT` / `INTERCEPT_DEFAULT_LON`). Now seeds the APRS user location from the shared observer location on page load, so the map centres correctly and distance calculations work. (#193) + +--- + ## [2.26.10] - 2026-03-14 ### Fixed diff --git a/config.py b/config.py index d34bf98..460901a 100644 --- a/config.py +++ b/config.py @@ -7,15 +7,15 @@ import os import sys # Application version -VERSION = "2.26.10" +VERSION = "2.26.11" # Changelog - latest release notes (shown on welcome screen) CHANGELOG = [ { - "version": "2.26.10", + "version": "2.26.11", "date": "March 2026", "highlights": [ - "Fix APRS stop timeout and inverted SDR device status", + "APRS map now centres on configured observer position from .env", ] }, { diff --git a/pyproject.toml b/pyproject.toml index c41db61..238b96e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "intercept" -version = "2.26.10" +version = "2.26.11" description = "Signal Intelligence Platform - Pager/433MHz/ADS-B/Satellite/WiFi/Bluetooth" readme = "README.md" requires-python = ">=3.9" diff --git a/templates/index.html b/templates/index.html index 23c040e..e0bc6ab 100644 --- a/templates/index.html +++ b/templates/index.html @@ -9849,8 +9849,28 @@ let aprsMeterCheckInterval = null; const APRS_METER_TIMEOUT = 5000; // 5 seconds for "no signal" state - // APRS user location (from GPS) + // APRS user location (from GPS or shared observer location) let aprsUserLocation = { lat: null, lon: null }; + + // Seed from configured observer location so the map centres on the + // user's position even without a live GPS fix. + (function _seedAprsLocation() { + if (typeof ObserverLocation !== 'undefined' && ObserverLocation.getShared) { + const shared = ObserverLocation.getShared(); + if (shared && shared.lat && shared.lon) { + aprsUserLocation.lat = shared.lat; + aprsUserLocation.lon = shared.lon; + return; + } + } + // Fallback: read the Jinja-injected defaults directly + const lat = window.INTERCEPT_DEFAULT_LAT; + const lon = window.INTERCEPT_DEFAULT_LON; + if (lat && lon && Number.isFinite(lat) && Number.isFinite(lon)) { + aprsUserLocation.lat = lat; + aprsUserLocation.lon = lon; + } + })(); let aprsUserMarker = null; // Calculate distance in miles using Haversine formula