Keywords: M600 model, OSDK attitude control (HORIZONTAL_ANGLE)
Yes,
the FlightCtrl interface provided by OSDK can set the attitude control mode, and all models compatible with OSDK are supported. To use OSDK's attitude mode, please set the drone flight mode to P mode.
OSDK API parameters in attitude mode indicate ROll, pitch attitude angle,
refer to API mode settings:
void
Control::attitudeAndVertPosCtrl(float32_t roll, float32_t pitch, float32_t yaw,
float32_t z)
{
//! @note 18 is the flag value of this mode
uint8_t ctrl_flag =
(VERTICAL_POSITION | HORIZONTAL_ANGLE | YAW_ANGLE | HORIZONTAL_BODY);
CtrlData data(ctrl_flag, roll, pitch, z, yaw);
this->flightCtrl(data);
}
Note: This article is from Chinese and is translated by machine. If there is any suggestions, please point it out and we will correct it in time
Comments
0 comments
Please sign in to leave a comment.