Add APRS and APRS SDR plugins#1436
Open
Supermagnum wants to merge 58 commits into
Open
Conversation
- Split APRS functionality into two plugins: aprs (core) and aprs_sdr (optional) - Core APRS plugin: packet parsing, database, map rendering, NMEA input - SDR plugin: RTL-SDR hardware interface, Bell 202 demodulation, Android USB support - Inter-plugin communication via packet registration API - Bell 202 demodulation based on Direwolf patterns - Android USB Host API integration for RTL-SDR devices - Comprehensive documentation and architecture guide - Support for RTL-SDR Blog V3, V4 R828D, Nooelec, and generic RTL2832U dongles - Configurable via GUI menu: frequency, timeout, device selection, NMEA settings
- Implement frequency index tracking in aprs_osd.c - Add aprs_refresh_freq_index command to update menu state - Update menu XML to show current frequency and highlight selection - Fix menu navigation by combining refresh and menu() commands in onclick - Store frequency index in command variable for menu conditional display
Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove unnecessary comment about exporting symbols (implementation detail) - Simplify APRS_SYMBOLS.md overview (remove AI-style explanation) - Note: PNG icons in symbols/ directory should eventually be replaced with SVG vector graphics to match Navit's icon standards
… status, add future enhancements Co-authored-by: Cursor <cursoragent@cursor.com>
Add future enhancement suggestions for APRS integration and features.
Added a suggestion to display a pop-up for tuning VFOs when entering the cover area.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove extra blank line to comply with CI checks Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Christof Schulze <christof.schulze@gmx.net>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Extract helper functions for field parsing (optional string/int/double/char) - Extract position parsing with direction helper - Extract checksum validation into separate function - Extract NMEA field parsing into separate function - Split sentence type parsers into separate functions (parse_gpwpl, parse_pgrmw, parse_pmgnwpl, parse_pkwdwpl) - Extract line processing logic from thread function - Extract data reading logic from thread function - Extract termios configuration helpers (baud rate, parity, data/stop bits) This reduces cyclomatic complexity and improves code maintainability. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove invalid 'data' attribute from osd element in navit_shipped.xml - Refactor aprs_map_set_attr to reduce cyclomatic complexity - Refactor aprs_rtlsdr_new to reduce cyclomatic complexity - Fix shell globbing issue in install_aprs_symbols.sh (SC2035) Co-authored-by: Cursor <cursoragent@cursor.com>
- Reorder includes (local before system) - Fix function formatting (braces, spacing) - Remove trailing whitespace - Fix comment formatting - Format symbol arrays with proper spacing Co-authored-by: Cursor <cursoragent@cursor.com>
- Fix dbg() call formatting in aprs.c - Fix function parameter indentation in aprs_db.h - Remove trailing blank lines - Format symbol arrays with proper spacing - Fix preprocessor directive formatting - Format stub functions with proper braces - Fix comment formatting (remove trailing spaces) - Format includes and defines in conditional blocks Co-authored-by: Cursor <cursoragent@cursor.com>
- Fix dbg() call formatting in aprs_nmea.c (single line) - Fix spacing alignment in aprs_symbols.c alternate_symbols array Co-authored-by: Cursor <cursoragent@cursor.com>
christf
reviewed
Feb 10, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
…formatting Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
… 1200 baud bit timing
Refine the synthetic Bell 202 IQ generator to reduce complexity while preserving deterministic behaviour, and align APRS SDR integration tests and docs with the stricter end-to-end decode expectations. Made-with: Cursor
Contributor
Author
|
Currently the tests are failing. |
…tzel
This was not easy to get passing. The code may not satisfy all static
analysis or codefactor checks, but it is intentionally self-documented:
comments, diagnostics, and the accompanying RST reference explain how
the pipeline works, what bit streams to expect at every stage, and what
the frame callback must deliver.
Be aware that the HDLC/AX.25 bit stream is fragile. Small changes to
bit stuffing, NRZI decode, flag search, or frame assembly ordering will
silently break decoding. The expected_decode.rst documents the exact
values to verify against when debugging.
Key fixes in this commit:
- Replace Goertzel (was fed FM discriminator scalar, not IQ samples)
with per-bit averaged FM discriminator + threshold (0.23)
- Move flag_pos, in_frame_bit_pos, in_frame_current_byte, bit_stuff_count
from static locals to struct fields so state resets correctly
- Add preamble flush guard (frame_buffer_pos >= 15) to distinguish
preamble flags from closing flag inside process_ax25_in_frame
- Do not feed the flag-completing bit into the frame assembler
- Correct prev_valid guard for FM discriminator initialisation
Tests: test_aprs_sdr_if_offset (+100 kHz IF) and
test_aprs_sdr_dc_centered (0 Hz IF) both pass.
Made-with: Cursor
Made-with: Cursor
735851b to
796522f
Compare
- Replace fixed-window demod with FM DC tracking, bit-timing PLL, per-symbol average and mark/space decision at 0.0; keep integration test bit count stable - Mark unused Goertzel helpers with G_GNUC_UNUSED - Update APRS SDR documentation for pipeline, tests, and troubleshooting Made-with: Cursor
- Resolve SANITY_GIT_BASE: origin/trunk, main, master, @{upstream}, else HEAD
- Document SANITY_GIT_BASE and fix misleading checkout warning
- Reformat test_aprs_sdr_integration.c and aprs_sdr_dsp.c for CI clang-format
Made-with: Cursor
- Split aprs_sdr_dsp_new, process_samples, and AX.25 in-frame handling into helpers - Add config.pll_alpha and PLL read accessors (locked, transition_count, phase) - Add test_aprs_sdr_pll_preamble_lock with pll_alpha=0.08 on preamble-only IQ - Refactor integration test logging and expect_success checks into helpers - Update TEST_RESULTS.rst (18 tests) Made-with: Cursor
Made-with: Cursor
Not needed any more ,- PLL is implemented.
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
jkoan
reviewed
Apr 7, 2026
Contributor
Author
|
Note that the DSP functions in https://github.com/Supermagnum/navit/tree/feature/aprs-clean/navit/plugin/aprs_sdr are very finicky. I will try to get rx working with my libresdr, but that can be difficult because the driver for that is made for Gnuradio. |
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.
This PR contains only APRS-related changes, separated from mixed concerns in the original PR.
Changes
This is a cleaned version of PR #1418 with only APRS commits.
Made with Cursor