Repository navigation
Replies: 1 comment
Block catalogGround rules
Every realistic subscription is a small fraction of this; the per-port guard caps the worst case anyway. Block 0 — Status
Block 1 — Attitude (the real-time block)
Block 2 — Sensors (raw)
Block 3 — Nav
Block 4 — GCS (slow, 0.25–1 Hz)
Block 5 — Thermal (one bit per source)
Block 6 — ESC (one field per ESC data set)
Block 7 — Text
Blocks 8–14 free, 15 reserved (clear + capability). Sentinels (momentarily invalid; the value can never be a real reading)
Notes for reviewers
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
MSP has no telemetry mode. A ground station that wants live data has to poll every message at the rate it needs, which means:
TASK_SERIALrun — measured at ~48 replies/s under HITL while a 115200 link idles at ~20 % load,MAVLink's stream subscription is the right direction but coarse: feeding a GCS takes 15–20 predefined message subscriptions with fixed content.
Proposal
One new MSPv2 command,
MSP2_INAV_TELEMETRY(proposed ID0x2110, reserving0x2110–0x211F), that lets the GCS compose its own stream:MSP stays request→response for everything else. The push uses the mechanism MSP DisplayPort and the debug log already rely on (
mspSerialPushPort), so no new serial plumbing.Measured against a real GCS polling set with strictly the same fields, the subscription stream needs 35 % fewer bytes, 98 % less uplink and 67 % fewer frames.
Wire format
Request (4 bytes)
The payload length selects the request type:
Per block one active subscription per port; a new request for the same block replaces it. Mask 0 with rate ≠ 0 unsubscribes the block. One-shots (rate 0) are independent of subscriptions and answer once with their own mask. 10 Hz per block is the ceiling by design.
Push / response frame
Every data frame — one-shot reply and periodic push alike — is an
MSP2_INAV_TELEMETRYframe:The mask is not echoed; the GCS parses with the mask it requested, and the frame always contains exactly the requested fields:
Acks and session
MSP2_INAV_TELEMETRYframe resets the port's keepalive timer. GCS contract: keepalive at least every 2 s; the FC pauses pushes after 2.5 s without one and resumes all subscriptions unchanged on the next keepalive (survives link drops without re-setup). Config is erased only by block 15 or reboot; it is RAM-only, never persisted.FC side
mspPort_t:{ u16 mask; u8 rate; timeUs_t lastPush; }× 15 blocks plus keepalive timestamp and counter ≈ 120 B per port. Multi-port is intended; the real cost gets measured first.mspSerialPushPort(..., MSP_V2_NATIVE).USE_MSP_TELEMETRY), F722 included until the flash limit forces the question.Open points
0x2110–0x211F?mspSerialSendFramealready drops a push that does not fit — which only helps when the UART baud is the bottleneck. A radio module that buffers and drops internally is invisible (no UART hardware flow control in INAV). The GCS is the only party that can detect loss (rolling counter gaps, subscribed vs. received rate) and it already has the lever (reconfigure to a lower rate/mask). Options if FC-side adaptation is wanted, all append-compatible: (a) a 1-byte keepalive payload = frames received since the last keepalive, so the FC can compute a delivery ratio and throttle, with the mirrored rate nibble redefined as the effective rate; (b) a "skipped pushes" counter in the keepalive ack; (c) the byte-budget setting. My preference for V1: GCS-side control + (b) + (c).Timing: no code until 10.0 is locked; implementation is planned for the post-10.0 window. Feedback on the mechanism and on the catalog is what I am after here.
All reactions