Altitude setpoint plot is wrong in OFFBOARD mode
To preface, I'm not sure if this should be a Firmware or flight_review issue or both.
Problem
As it stands, in OFFBOARD mode, sending a SET_POSITION_TARGET_LOCAL_NED with a valid altitude (i.e. z coordinate), only the setpoint_triplet.current.z is set, and setpoint_triplet.current.alt remains 0 (relevant lines). This means that the altitude plot in OFFBOARD mode shows all setpoints to be at 0 altitude despite in reality possibly being something else.
Example Log
Problematic plot
Expected plot
Possible fixes
I see 2 potential fixes, but not sure either are good.
- Change the
Firmwareto setsetpoint_triplet.current.altwhen settingsetpoint_triplet.current.zin OFFBOARD mode. This means logs taken with older firmware will still show the wrong plot though. - Fallback to
setpoint_triplet.current.zwhensetpoint_triplet.current.alt = 0(and maybe only while in OFFBOARD mode) inflight_review.
@anassinator I think offboard should produce log data compatible to other modes from the Firmware side. Offboard mode is currently under improvement. For better modularization of the different setpoint sources there's now a flight task architecture: https://github.com/PX4/Firmware/pull/8933 and @Stifael is currently working on the task for offboard mode. Chances are he's already aware of that inconsistency (or else he'll read this).
Perfect thanks!