feat(crsf): add local altitude/vertical-speed telemetry and fix GPS frame (#27948)

* fix(crsf): correct GPS telemetry ground speed, course, and altitude offset

Ground speed was sent from the NED down-velocity component with the km/h conversion inverted, course over ground wraps negative values through the uint16 field, and the rc_input frame applied a +1 m offset where the protocol expects +1000 m.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* feat(crsf): send local altitude and vertical speed telemetry

Add the CRSF barometric altitude frame (0x09), fed from vehicle_local_position, to both the crsf_rc driver and the legacy rc_input telemetry. Shows up as Alt and VSpd sensors on EdgeTX/OpenTX radios, complementing the MSL altitude already sent in the GPS frame.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* docs(crsf): clarify local-altitude telemetry semantics and units

Note that the Alt/VSpd sensors reuse the CRSF baro-altitude frame to carry PX4's fused local altitude (above the estimator origin), not a raw barometer reading, and document the EdgeTX version requirements. Add terse unit comments on the GPS-frame fields.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
Jacob Dahl
2026-07-19 10:16:23 -06:00
committed by GitHub
parent d11b996d89
commit 5ea7337a31
7 changed files with 148 additions and 9 deletions

View File

@@ -209,7 +209,12 @@ The supported telemetry messages and their source are listed below (this table i
| Roll | FC Roll angle | FC |
| Yaw | FC Yaw angle | FC |
| FM | Flight mode | FC |
| VSPD | Barometer | FC |
| Alt | Altitude above the local origin (takeoff point) | FC |
| VSpd | Vertical speed | FC |
::: info
`GAlt` (in the GPS sensor) is GPS altitude above mean sea level, while `Alt`/`VSpd` are PX4's fused local altitude and climb rate relative to the estimator origin (roughly the takeoff point). PX4 sends these in the CRSF barometric-altitude frame, so despite the frame name the value is not a raw barometer reading. `VSpd` uses the linear vertical-speed form, which requires a recent EdgeTX (2.9+); the altitude displays on EdgeTX 2.7.1 and later.
:::
## See Also