feat: Multi-GPS antenna position configuration#2399
Draft
dirkwa wants to merge 7 commits intoSignalK:masterfrom
Draft
feat: Multi-GPS antenna position configuration#2399dirkwa wants to merge 7 commits intoSignalK:masterfrom
dirkwa wants to merge 7 commits intoSignalK:masterfrom
Conversation
Replace unstable N2K source addresses with CAN Name — a globally unique identifier derived from the device's ISO Address Claim (PGN 60928). The $source field for N2K devices now uses the format connectionName.canName (e.g. can0.Furuno_SCX-20) instead of connectionName.address (e.g. can0.22), making source priority configuration and ACLs stable across bus topology changes.
…, sourcePolicy, and N2K device discovery Extend the source priority system with global source ranking, preserve all source data in the delta cache regardless of priority configuration, and add sourcePolicy (preferred/all) for WebSocket subscriptions and plugin subscriptions. Server-side changes: - DeltaCache: ingest all deltas before priority filtering, track multi-source paths, persist sources cache to disk, emit live MULTISOURCEPATHS events via serverevent - DeltaPriority: add source ranking with timeout-based fallback and disabled source support (timeout=-1) - StreamBundle: add unfilteredDelta channel for all-source subscribers - SubscriptionManager: add sourcePolicy parameter support - WebSocket: pass sourcePolicy query parameter to subscriptions - NMEA 0183: add talker group configuration for grouping talker IDs into named source groups - N2K Discovery: auto-discover devices via ISO Request (PGN 59904), support instance editing via PGN 126208, detect instance conflicts - REST API: add endpoints for sourceRanking, sourceAliases, multiSourcePaths, ignoredInstanceConflicts, N2K discovery/config
… management Reorganize the Data menu with dedicated pages for Source Priority, Source Discovery, Meta Data, and Data Browser. Add Source Ranking UI for global source priority ordering with drag-and-drop, timeout configuration, and disable toggle. Add path-level override UI for per-path source priority configuration. UI changes: - Source Priority page: global source ranking with drag-reorder, per-path overrides with add/remove, live sidebar badge showing unconfigured multi-source paths - Source Discovery page: N2K device table with sortable columns, inline instance editing (device/data/battery/DC), installation description editing, PGN list, instance conflict detection with filtering and ignore capability - Data Browser: add source view toggle, source priority filter toggle, extract Meta Data to dedicated page - Shared infrastructure: sourceLabels utility for resolving source references to human-readable labels using N2K device data, source alias hooks, WebSocket handlers for live server events - Talker group configuration UI in NMEA 0183 provider settings
Remove $source and source properties from alarm notification values before storing them in the data model. These properties are internal routing metadata that should not appear in the notification value itself, where they cause confusion when inspecting alarm state.
… docs Add comprehensive documentation for new features: - Source Priority guide: source ranking, path-level overrides, priority resolution, REST API endpoints - N2K Device Management: device discovery, CAN Name identification, instance editing (device/data/battery/DC), installation descriptions, instance conflict detection and resolution - Developer docs: sourcePolicy subscription parameter for plugins and WebSocket clients - Breaking changes: CAN Name source identification, all-source data preservation - Configuration: document Data menu pages
…Source Discovery Track which N2K devices respond to discovery sweeps via a separate discoveredAddresses set, expose status through GET /n2kDeviceStatus, and show Online/Offline badges in the UI. Add DELETE /n2kRemoveSource endpoint for full device cleanup (sourceDeltas, FullSignalK sources tree, aliases, channel labels) with a Remove Device button in the expanded device detail area. Deduplicate devices by canName both on write (setSourceDelta) and on cache load (loadSourcesCache) to handle address 254 claim cycling where the same physical device appears under multiple bus addresses.
Support multiple GPS receivers with individual antenna offsets, replacing the single fromBow/fromCenter in Vessel Configuration. Backend: add GET/PUT /gpsSensors and GET /positionSources endpoints, detect all sources providing navigation.position (N2K, NMEA 0183, plugins), emit POSITION_SOURCES and GPS_SENSORS server events, migrate legacy single-GPS config, and write offsets into the SK data model at sensors.gps.<sensorId>.fromBow/fromCenter. Frontend: add GPS Antenna Positions card with table editor and draggable SVG boat schematic, rename Unit Preferences to Preferences, show warning badge for unconfigured GPS sources, remove GPS fields from Vessel Configuration. The fromCenter sign convention follows the Signal K specification: positive = port, negative = starboard.
481c516 to
a163815
Compare
Contributor
Author
|
Underlying PR set to draft, this follows. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #2396 (Option A: Source-to-Sensor Linking) — each GNSS source gets its own sensor instance with individual antenna offsets.
What changed
Backend
GET/PUT /skServer/gpsSensors— per-source antenna offset configuration stored insettings.jsonGET /skServer/positionSources— returns all sourceRefs currently providingnavigation.position(NMEA 2000, NMEA 0183, and plugins)POSITION_SOURCESandGPS_SENSORSserver events for live UI updatessensors.gps.<sensorId>.fromBow/fromCenterso external consumers (chart plotters, autopilots) can read themsensors.gps.fromBow/fromCenterconfigfromCentersign convention follows the SK spec: positive = port, negative = starboardFrontend
Testing done
settings.jsonand the SK data model (sensors.gps.*in data browser)fromCentersign convention matches the SK spec after migrationGET /vesselbackward compatibility still returnsgpsFromBow/gpsFromCenterImages
Fixes: #2396
Fixes: #1285
Relates to: #987