Skip to content

feat(sim): add Burning Man DCR/DTP scenario - #78

Draft
Komzpa wants to merge 45 commits into
meshtastic:masterfrom
Komzpa:codex/pr33-burningman-on-dcr-dtp
Draft

feat(sim): add Burning Man DCR/DTP scenario#78
Komzpa wants to merge 45 commits into
meshtastic:masterfrom
Komzpa:codex/pr33-burningman-on-dcr-dtp

Conversation

@Komzpa

@Komzpa Komzpa commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

This is the Burning Man-specific remainder from stale PR #33, rebased onto the newer radio-policy stack instead of carrying the old monolithic patch forward.

The old PR #33 mixed several unrelated ideas:

  • modem preset / coding-rate cleanup: split into the firmware-style preset and DCR work;
  • radio/link-budget plumbing: split into the current RF/link-model/clutter/terrain stack;
  • dynamic coding rate and dynamic TX power experiments: split into the draft DCR/DTP PRs;
  • reusable PR33 helpers: split into refactor(sim): reuse PR33 link-budget helpers #77 where they are still generally useful;
  • Burning Man-specific simulation logic: kept here as a draft follow-up because it depends on the DCR/DTP experiments.

What this PR adds on top of #77:

  • burningManSim.py, a Burning Man scenario runner with router/client placement, clutter, environmental attenuation, and DCR/DTP toggles;
  • per-node TX power support so scenario nodes can model routers and handheld clients with different base power;
  • tests for per-node TX power and a tiny Burning Man smoke-case guard.

I deliberately did not carry over PR #33's old lib/signal.py: it was unused in the original branch and now duplicates the newer shared lib/link_model.py path with older dict/mock-node APIs.

Stack / review note

Draft because this sits at the end of the experimental queue. The useful generic pieces should be reviewed before this:

  1. DCR policy (feat(sim): add dynamic coding rate policy #71)
  2. DTP policy (feat(sim): add dynamic tx power policy #72)
  3. reusable PR33 helpers (refactor(sim): reuse PR33 link-budget helpers #77)
  4. this Burning Man scenario

The diff against master will look large until the lower stack lands. The actual delta over codex/pr33-remaining-optimizations is intentionally small: burningManSim.py, per-node TX power plumbing, and tests.

Validation

  • /home/kom/proj/lora/Meshtasticator/.venv/bin/python -m unittest discover -s tests -v -> 170 tests OK
  • git diff --check
  • /home/kom/proj/lora/Meshtasticator/.venv/bin/python burningManSim.py 10 --simtime-seconds 5 --period-seconds 1 --dcr --dtp --phy-loss-model --capture-collision-model
    • produced non-empty simulation output, including DCR CR counts and DTP power histogram

@Komzpa
Komzpa force-pushed the codex/pr33-burningman-on-dcr-dtp branch from e5376ca to c8a26b3 Compare May 5, 2026 20:12
@Komzpa
Komzpa force-pushed the codex/pr33-burningman-on-dcr-dtp branch from c8a26b3 to c45de0b Compare May 5, 2026 20:17
@Komzpa
Komzpa force-pushed the codex/pr33-burningman-on-dcr-dtp branch from c45de0b to 9b2b4b8 Compare May 6, 2026 07:06
@Komzpa
Komzpa force-pushed the codex/pr33-burningman-on-dcr-dtp branch 3 times, most recently from 340d12d to ab78d06 Compare May 15, 2026 21:01
@Komzpa
Komzpa marked this pull request as ready for review May 17, 2026 17:25
@Komzpa
Komzpa marked this pull request as draft May 17, 2026 17:42
Komzpa added 19 commits August 17, 2026 14:16
Signed-off-by: Darafei Praliaskouski <me@komzpa.net>
- treat unparsable map altitude values as absent instead of failing the
  whole import with an uncaught TypeError/ValueError
- import CLIENT_BASE nodes on the router side: current firmware
  rebroadcasts them like ROUTER_LATE
- compare the trig-derived origin longitude with a tolerance in tests
A present origin block that is not a map or lacks a usable lat/lon pair
now raises instead of silently dropping the origin and projecting
terrain against a different origin than the author intended. Accept the
latitude/longitude key spellings alongside lat/lon.
Komzpa added 4 commits August 17, 2026 14:42
Concurrent runs sharing one cache directory wrote the same fixed temp
filename and could atomically publish an interleaved, corrupt tile that
then stayed cached. Download and unpack through process-unique temp
names and clean up archives after unpacking.
Cache keys carried id(TERRAIN_GRID), so a reused object address after a
Config-reusing parse could serve losses computed against an earlier
grid. Key the cache on a monotonically increasing per-grid token
instead. Also pick the nearest interpolation samples with
heapq.nsmallest instead of sorting every sample in this hot path, and
use the shared node_antenna_height helper from lib.common instead of a
diverging local copy.
Automatic SRTM tile selection evaluated the full link budget for every
node pair. Derive one conservative best-case link distance (path loss
grows monotonically with distance in every lib.phy model) and skip
pairs beyond it before the expensive per-pair work; document that the
selection scales with node pairs and recommend --map-limit for broad
imports. Also log when a wrapped --map-bbox is discarded for terrain so
the substituted extent is not silent, and import node_antenna_height
from its canonical module.
TCPInterface connects without a socket timeout, so a stale
--nodedb-host blocked the CLI indefinitely. Probe reachability with a
bounded connect first so unreachable hosts fail fast with the existing
could-not-connect error.
@Komzpa
Komzpa force-pushed the codex/pr33-burningman-on-dcr-dtp branch from ab78d06 to aca4557 Compare August 21, 2026 00:31
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 374192d2-7e51-4fe4-bc71-8733e6dbd7b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Komzpa
Komzpa force-pushed the codex/pr33-burningman-on-dcr-dtp branch from aca4557 to 6caf250 Compare August 21, 2026 00:57
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