Skip to content

Pending latest changes from Widehopf: Dev#5

Open
alex-tsbk wants to merge 474 commits into
ADSBexchange:devfrom
wiedehopf:dev
Open

Pending latest changes from Widehopf: Dev#5
alex-tsbk wants to merge 474 commits into
ADSBexchange:devfrom
wiedehopf:dev

Conversation

@alex-tsbk

Copy link
Copy Markdown

No description provided.

@wiedehopf wiedehopf force-pushed the dev branch 7 times, most recently from 5b827ae to e7d8c49 Compare August 18, 2024 16:07
@wiedehopf wiedehopf force-pushed the dev branch 2 times, most recently from 30bc0c1 to 6e2434f Compare November 1, 2024 11:46
@wiedehopf wiedehopf force-pushed the dev branch 2 times, most recently from 8c82ea5 to ae987a9 Compare January 4, 2025 18:09
only write permanent trace when a plane is inactive for 4 hours or at
the end of the UTC day
GLOBE_PERM_IVAL is no longer relevant for how often traces are written

make sure we write traceLast in persistent traces
really no reason to write half finished stuff

also try and nicely spread out the IO a bit for aircraft that have been
inactive for a long time
aircraft objects are somewhat small, roughly 2.5 kB and some are very
long lived
use our own allocator that doesn't really free them but just keeps a
freelist
use backing storage from mmap in sizes of 2 MB which should usually be
transparent hugepages which should reduce TLB contention

due to those hugepages eating up 2 MB of memory even for few aircraft
only use the custom allocator in situations where that is not an issue
wiedehopf and others added 13 commits May 4, 2026 20:09
TCP json position output: instead of emitting when a new position
is calculated, only emit when the wind was calculated now
(based on data from the last 2.5)

see also: HelenaValleyObservatory/helena-valley-observatory#1

this is a minimal hacky thing so i don't need to touch too much code
but should be fit for purpose
Adds signal level (dBFS) as an optional 23rd field in SBS/BaseStation
output. Only emitted when invoked with --devel=sbs_rssi; off by default so
existing consumers are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two hardening fixes for the --devel=sbs_rssi extension:

1. Increase prepareWrite allocation from 200 to 250 bytes when sbs_rssi
   is enabled. The original 200-byte buffer was sized before field 23
   was added; RSSI appends up to ~7 bytes (e.g. ",-48.1") and the
   extra headroom prevents any possibility of overflow on a maximally
   populated SBS line.

2. Add fmax(signalLevel, 1e-10) clamp before log10(). signalLevel is
   bounded [0,1] by unsigned char arithmetic and the > 0 guard already
   prevents log10(0), but the explicit clamp documents the invariant and
   protects against subnormal edge cases if the source path ever changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(*(p+1) << 8) | *(p+2) — if char is signed on the target platform,
bytes with value > 127 sign-extend to negative int before shifting,
corrupting the uint16_t msgLen. Cast both bytes to uint8_t first to
prevent sign extension regardless of platform char signedness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…S output

Adds a new devel flag, sbs_extra_fields, which appends two optional fields
to the SBS output:
  - Field 23: RSSI in dBFS (e.g. -27.3), empty if signal level unavailable
  - Field 24: aircraft category from ADS-B identification frames (metype 1-4),
    encoded as two hex chars (e.g. A3 = large fixed-wing, A7 = rotorcraft),
    empty if not yet received

The category is derived directly from the received ADS-B DF17 message
(((0x0E - metype) << 4) | mesub) — no external database lookup required.

Both fields are controlled by a single flag to keep the extension self-
contained. Field 23 is always emitted when the flag is active so that
field 24 remains at a fixed position, regardless of whether RSSI data is
available for a given message.

Buffer size is increased from 200 to 260 bytes when the flag is active.
awhite-jetnet added a commit that referenced this pull request Jun 24, 2026
Use-case-defining tests #4 and #5:
- receiver.json: pins capability fields (version/refresh/history, binCraft/zstd/
  json_trace_interval, globeIndexGrid/SpecialTiles). haveTraces is absent in
  3.14.1631, so intentionally not asserted.
- aircraft.json: pins top-level shape + the per-aircraft object field/type
  contract parsed by tar1090/leaderboard/exporters (entries are objects, not
  arrays). Suite now 110.
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.

8 participants