Skip to content

Merge the remaining reviewed side branches (radio checks, frames, bench preflight, pilot options, public-number check) - #9

Merged
Whyater merged 34 commits into
mainfrom
merge/2026-11-04-pending
Nov 4, 2026
Merged

Whyater merged 34 commits into
mainfrom
merge/2026-11-04-pending

Conversation

@Whyater

@Whyater Whyater commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Brings the remaining reviewed side branches onto main. No registered result folder, no committed output under sim/runs/, and nothing in tools/reproduce_registry.json changed.

What changed

Radio

  • sim/radio/mac.py, params.py: the 2.4 GHz OFDM airtime now includes the 6 us signal extension; the check value 357/s is flagged where it was wrong. Registered outputs that import these files were checked to be unchanged (the hardcoded 357 in the c-exp014 summary is left alone on purpose).
  • tools/espnow_airtime_budget.py: DSSS/CCK frame time rounds up to a whole microsecond, with a hand-worked check (test_espnow_airtime_hand_check.py). At the default 1 Mbit/s rate, 10 drones at 100 Hz would need about 182 % of the channel.
  • tools/import_espnow_log.py: names the bad field in misformatted echo rows and refuses an echoer log that mixes two sender sessions, telling a reboot from a slow link by the round trip. Documented as rule 12 in docs/ESPNOW_ECHO_LOG.md.

Bench and frames

  • tools/preflight_bench_data.py: fails when radio times look like milliseconds in _us columns, names a missing run_meta.json, and gives a clearer message for swapped echo logs.
  • sim/frames.py, sim/clock_map.py, sim/adapters.py: frame and time layer for a real drone adapter (ENU/NED, clocks, units), with counter rollovers and reorders across a rollover handled.
  • tools/fit_camera_bias_field.py: fits a camera bias field from a known-spots log, with unit checks per spot and per log.

Closed-loop pilot (all opt-in, default rows unchanged)

  • --lead-switch: lead prediction only while the turn-rate estimate passes a hysteresis threshold. Its pre-set pass bands failed (11 of 16), so it is not a default.
  • --grid, --grid-report: delay by loss grid. On turns no cell stays under 0.5 m for either goal rule.

Checks

  • tools/check_public_numbers.py and its test: public numbers must match a registered run output listed in tools/public_number_sources.json. This adds a CI check on public text.
  • tools/compare_reproduce_tolerance.py: explains why reproduced outputs differ from registered hashes (line endings, last-digit floats).
  • sim/tests/test_baseline.py, test_a1_heading.py, tools/sens_monitor_noise.py: fresh reruns compared with registered rows through platform_compare, since Windows CPUs can differ in the last bits.

Testing

  • Each branch passed its own tests before merging. The two merge conflicts (airtime cross-check test, pilot test file) were resolved by keeping both sides; the airtime, radio and MAC tests pass after the merge (107 passed).
  • Full suite and Windows CI on this head: see checks below.
  • Review: a fresh review of the parts no one had checked found that the reproduce tolerance tool let whole numbers (seeds, counts) pass within a float tolerance; they are now compared exactly (145fbd4, with a test that failed first).
  • CI on 145fbd4: the push run passed; the pull-request run failed one existing check, test_printed_estimate_matches_measured_formula, which rounded its recomputed estimate to 0.1 s a second time and so allowed a 0.1 s gap near a rounding boundary. It now compares with the exact sum (78ff521).

…w-log faults

A repeat arrival more than 1 s after the first copy of a seq is refused: it
comes from a second sender session (board A rebooted while board B kept
running), not from the radio. Before, such a pair imported cleanly with
wrong arrival times, a false return-leg loss and false duplicates.

Errors for 32-bit clock wraps, negative stamps, seq wraps and restarts,
repeated or out-of-order sender rows, CR-only line endings, serial noise
lines and captures that start after the header now say what happened.
Adds tests for these and other raw-log quirks.
tools/check_public_numbers.py finds every number in README.md, docs/RESULTS.md and docs/LIMITATIONS.md and looks it up in tools/public_number_sources.json. Performance numbers must point at a registered run output whose bytes match the registry hash, and must round to the run value at the precision the text shows. Seven numbers not traced yet are listed as known so new drift fails the test.
… second check value

OFDM frames in sim/radio/mac.py now count the 6 us ERP signal extension that 802.11 includes in TXTIME. The published 1 Mbps unicast throughput in sim/radio/params.py exceeds the 350.9 per second ceiling for 250 B with the standard ACK, so it is marked contradicted with the reason.
…istered hashes (line endings, float tolerance, pixels, real changes)
…ws through platform_compare, since Windows CPUs can differ in the last bits
…pilot: lead prediction only while the turn-rate estimate passes a hysteresis threshold
# Conflicts:
#	tools/tests/test_espnow_airtime_budget.py
…op pilot

# Conflicts:
#	tools/tests/test_pilot_full_chain.py
… across a counter rollover kept in their epoch
…e reboot check, describe sample order in the counter unwrap, and document the reboot rule in the echo log format
…o a changed seed or count is never within tolerance
@Whyater
Whyater merged commit d18d05b into main Nov 4, 2026
2 checks passed
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.

1 participant