Skip to content

feat(gps): GPS over serial, TCP or gpsd (F3.6) - #336

Merged
gx1400 merged 4 commits into
mainfrom
feat/f3.6-gps
Oct 21, 2026
Merged

gx1400 merged 4 commits into
mainfrom
feat/f3.6-gps

Conversation

@gx1400

@gx1400 gx1400 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Closes #205, except the OS location API and browser geolocation (decision 6). This is the bottom of tonight's stack.

Spec: docs/features/F3.6-gps.md.

What's in it

  • GPS is a source kind in Settings › Sources, reachable three ways:

    • NMEA on a serial port (4800 baud by default);
    • NMEA over TCP (port 10110 by default);
    • gpsd (port 2947 by default).

    The form shows the right fields for each link and no Transmit choices.

  • Reading:

    • Serial and TCP lines are read by the app, as the gap notes say device reading should be. APRS.NET's NmeaSentence and NmeaFixTracker turn them into fixes.
    • gpsd goes through AprsNet.Gps's GpsdConnection, now referenced.
    • All three run as ordinary sources, so they reconnect with backoff and have pills.
  • The pill shows the fix: "GPS · 3D fix · 9 satellites", "2D fix", or "no fix, using the profile's location". The no-fix case takes the warning colour.

  • NMEA lines go to the Source console under a new GPS traffic kind.

  • EngineStatus.Gps carries the fix: kind, position, altitude, speed, course, satellites, HDOP, time, and whether it's fresh.

  • While the fix is fresh (60 s), the station is where the GPS says:

    • beacons and Send position now send its position with course, speed and altitude (course and speed take the place of PHG, since a position carries one extension);
    • the APRS-IS filter's range is re-centred once the GPS has moved a quarter of the range;
    • the map's house and Home move with it.
  • Without a fresh fix, the profile's location is used. The GPS never overwrites it.

Decisions proposed for your review

  1. Three links, with those default ports and speed.
  2. One GPS per profile. A second one is refused when saving.
  3. A fix is fresh for 60 s.
  4. The GPS doesn't overwrite the profile's location. It's used only while the fix is fresh.
  5. The filter follows the GPS after moving a quarter of the range.
  6. Later: the OS location API, browser geolocation, a tracked position, and gpsd's raw reports in the console. The Moving schedule (F2.2 Moving beacon schedule: SmartBeaconing from the GPS's speed and course #335) and GPS status (F3.12 GPS status: fix, accuracy, sky view and raw stream #331) come after this.

Tests

  • Core:
    • NMEA through a pipe gives a 3D fix in the status, and the lines appear in the console;
    • fresh versus stale: Send position now at the GPS position with course, speed and altitude, then back at the profile's location;
    • the filter re-centres only after a quarter of the range;
    • a beacon goes out at the GPS position;
    • NMEA over a real TCP socket;
    • gpsd against a fake gpsd;
    • invalid GPS sources and two GPSs per profile are refused.
  • UI:
    • the serial and network links save the right fields;
    • the pill's words and colour;
    • the house follows a fresh fix and goes back without one.
  • The Release build and all tests pass, csharpier is clean, and the tests stayed out of the real data folders.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Package report

Vulnerable packages

No known vulnerabilities in direct or transitive packages.

Available package updates

Package Current version Available version Note
OpenTelemetry.Instrumentation.AspNetCore 1.20.0 1.20.1
OpenTelemetry.Instrumentation.Http 1.20.0 1.20.1
OpenTelemetry.Instrumentation.Runtime 1.20.0 1.20.1
xunit.runner.visualstudio 3.1.5 4.0.1 Pinned in AprsMap.UI.Tests (see below)
xunit.v3.mtp-off 3.2.2 4.0.2 Pinned in AprsMap.UI.Tests (see below)

Pinned versions

These projects override the central version in Directory.Packages.props on purpose; updates for them are held back until the reason no longer applies.

Package Pinned version Project Reason
xunit.runner.visualstudio 3.1.5 AprsMap.UI.Tests Avalonia.Headless.XUnit 12.1 is built against xUnit v3 3.x and fails test discovery under 4.x (missing TestIntrospectionHelper overload). Pin this project only until Avalonia supports v4; see dependabot.yml.
xunit.v3.mtp-off 3.2.2 AprsMap.UI.Tests Avalonia.Headless.XUnit 12.1 is built against xUnit v3 3.x and fails test discovery under 4.x (missing TestIntrospectionHelper overload). Pin this project only until Avalonia supports v4; see dependabot.yml.

Checked at 602f8ea against nuget.org.

…re it says

GPS is a source kind: NMEA sentences on a serial port or over TCP, read by
the app and put together by APRS.NET's NMEA tracker, or gpsd through
AprsNet.Gps. Its pill says the fix (3D fix · 9 satellites, or no fix), its
NMEA lines go to the Source console, and the status carries the fix. While
the fix is under a minute old the station is where the GPS says: beacons and
Send position now carry its position with course, speed and altitude, the
APRS-IS range follows it after moving a quarter of the range, and the map's
house moves with it; without a fresh fix the profile's location is used, and
it's never overwritten. A profile uses one GPS.

Closes #205
Moving is offered in Settings › Beacons: while the profile's GPS has a fresh
fix the position goes by speed and turns with APRS.NET's SmartBeaconSchedule
(90 s at speed, 30 minutes stopped, at once on a turn), fed each fix; without
one it beacons every interval. Its speeds, rates and turns are APRS.NET's
defaults and can be changed, speeds in the viewer's unit. On a TNC the
10-minute floor doesn't hold it back.

Closes #335
With Settings › Map › Show where moving stations probably are now (off by
default), a station whose latest position gave a course and a speed of at
least 5 km/h is drawn for up to 10 minutes where it has probably got to, with
a dashed line back to where it was heard and a ring that shrinks as the
estimate ages; Details add where it probably is now. The station stream
carries the latest report's own course and speed. Distances and sorting stay
on the reported position.

Closes #198
@gx1400
gx1400 merged commit 9771a44 into main Oct 21, 2026
11 checks passed
@gx1400
gx1400 deleted the feat/f3.6-gps branch October 21, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F3.6 GPS: NMEA over serial or TCP, gpsd, and the OS or browser location

1 participant