Skip to content

feat(sim): add dynamic coding rate policy#71

Draft
Komzpa wants to merge 20 commits into
meshtastic:masterfrom
Komzpa:codex/split-dcr-policy
Draft

feat(sim): add dynamic coding rate policy#71
Komzpa wants to merge 20 commits into
meshtastic:masterfrom
Komzpa:codex/split-dcr-policy

Conversation

@Komzpa

@Komzpa Komzpa commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an opt-in Dynamic Coding Rate policy that selects LoRa CR 4/5..4/8 immediately before transmit
  • use existing simulator context: local channel utilization, TX queue depth, retry state, ACKs, relay/last-hop context, direct relay context, and region duty-cycle limits
  • keep ordinary first-attempt traffic compact; spend extra FEC on quiet retries, ACKs, non-busy direct relays, and last-hop relays
  • add DCR TX packet and airtime histograms plus docs/tests

Stack

Validation

  • .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-model
  • git diff --check
  • .venv/bin/python -m unittest
  • rg -n "stavnet|guest:guest|grafana|source_node_id|source_long_name|DTP|Dynamic TX Power" .

@Komzpa Komzpa force-pushed the codex/split-dcr-policy branch from a6b6c18 to 7187a73 Compare May 15, 2026 20:50
@Komzpa Komzpa force-pushed the codex/split-dcr-policy branch from 7187a73 to 77c6377 Compare May 15, 2026 21:01
@Komzpa Komzpa marked this pull request as ready for review May 17, 2026 17:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread lib/dcr.py Outdated
@Komzpa Komzpa marked this pull request as draft May 17, 2026 17:41
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