Skip to main content

Module offboard

Module offboard 

Source
Expand description

Offboard control setpoints: the type_mask builder and setpoint constructors.

An offboard setpoint carries position, velocity, and acceleration fields all at once, and a type_mask says which of them the vehicle should act on and which to ignore. Getting the mask wrong is the classic offboard bug: a velocity setpoint with the position bits left active makes the vehicle chase a zero position. TypeMask builds the mask from the named POSITION_TARGET_TYPEMASK bits, starting from “ignore everything” and enabling only the dimensions a setpoint sets, and the constructors on SetPositionTargetLocalNed and SetPositionTargetGlobalInt use it to produce ready-to-send position and velocity setpoints.

Structs§

TypeMask
Builds a type_mask for a SET_POSITION_TARGET_* message.