feat(sim): add dynamic coding rate policy - #71
Conversation
75f3acf to
9843d1e
Compare
2cd5f4e to
8e3f90f
Compare
8e3f90f to
598f855
Compare
7187a73 to
77c6377
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77c63775f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
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.
641d8e5 to
bf366b7
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
bf366b7 to
f1113a6
Compare
Summary
Stack
b8939a3Validation
.venv/bin/python -m unittest tests.test_dcr tests.test_lora_mesh_cli tests.test_discrete_event_sim tests.test_node/home/kom/.local/bin/ruff check loraMesh.py lib/config.py lib/dcr.py lib/node.py lib/discrete_event_sim.py tests/test_dcr.py tests/test_lora_mesh_cli.py tests/test_discrete_event_sim.py tests/test_node.py.venv/bin/python -m compileall -q ..venv/bin/python -u loraMesh.py 2 --no-gui --simtime-seconds 5 --period-seconds 0.5 --dcr --phy-loss-model --capture-collision-modelgit diff --check.venv/bin/python -m unittestrg -n "stavnet|guest:guest|grafana|source_node_id|source_long_name|DTP|Dynamic TX Power" .