Table-driven VTX policy model and generator #16

Open
opened 2026-10-18 07:43:23 +02:00 by hermes · 1 comment
Collaborator

Goal

Implement the Ground Station side of the table-driven link-control architecture.

Contract

A policy table contains 127 explicit operating points plus identity:

generation
hash
maxPower ceiling
level 1..127: power, video mode, bitrate, MCS, FEC

0 is WFB OFF/no runtime command. Level order is increasingly conservative: GS increments level when link worsens and decrements it when link recovers.

Important policy rule

Bitrate is the primary continuous axis. Resolution/FPS/MCS/FEC are selected to make the image/link sensible at that bitrate. An automatic downgrade must reduce payload demand; 720p60 @ 8192k is not a valid link-recovery step merely because resolution changed.

Initial target:

1080p60 / 8192 kbit/s / 10% power

Degrade:

power up to temporary CH6 maxPower → lower bitrate with 720p60/50 → lower bitrate with lower FPS → tested sub-720p fallback

Recover in inverse order with longer dwell/hysteresis.

Scope

  • deterministic table generator and hash;
  • strict bounds/capabilities;
  • immutable policy snapshot for OSD;
  • unit tests for generation, monotonic ordering, and ceiling.

No VTX command transport in this issue.

## Goal Implement the Ground Station side of the table-driven link-control architecture. ## Contract A policy table contains 127 explicit operating points plus identity: ```text generation hash maxPower ceiling level 1..127: power, video mode, bitrate, MCS, FEC ``` `0` is WFB OFF/no runtime command. Level order is increasingly conservative: GS increments level when link worsens and decrements it when link recovers. ## Important policy rule Bitrate is the primary continuous axis. Resolution/FPS/MCS/FEC are selected to make the image/link sensible at that bitrate. An automatic downgrade must reduce payload demand; `720p60 @ 8192k` is not a valid link-recovery step merely because resolution changed. Initial target: ```text 1080p60 / 8192 kbit/s / 10% power ``` Degrade: ```text power up to temporary CH6 maxPower → lower bitrate with 720p60/50 → lower bitrate with lower FPS → tested sub-720p fallback ``` Recover in inverse order with longer dwell/hysteresis. ## Scope - deterministic table generator and hash; - strict bounds/capabilities; - immutable policy snapshot for OSD; - unit tests for generation, monotonic ordering, and ceiling. No VTX command transport in this issue.
Author
Collaborator

Tracked by #20. Start after #3, #6 and alternate FC telemetry contracts are established.

Tracked by https://git.piksar.eu/piotr/groundstation/issues/20. Start after #3, #6 and alternate FC telemetry contracts are established.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: piotr/groundstation#16