Path: blob/master/libraries/AP_ExternalControl/AP_ExternalControl.h
9383 views
/*1external control library for MAVLink, DDS and scripting2*/34#pragma once56#include "AP_ExternalControl_config.h"78#if AP_EXTERNAL_CONTROL_ENABLED910#include <AP_Arming/AP_Arming.h>11#include <AP_Common/Location.h>12#include <AP_Math/AP_Math.h>1314class AP_ExternalControl15{16public:1718AP_ExternalControl();1920/*21Sets the target airspeed.22*/23virtual bool set_airspeed(const float airspeed) WARN_IF_UNUSED {24return false;25}26/*27Set linear velocity and yaw rate. Pass NaN for yaw_rate_rads to not control yaw.28Velocity is in earth frame, NED [m/s].29Yaw is in earth frame, NED [rad/s].30*/31virtual bool set_linear_velocity_and_yaw_rate(const Vector3f &linear_velocity, float yaw_rate_rads) WARN_IF_UNUSED {32return false;33}3435/*36Sets the target global position with standard guided mode behavior.37*/38virtual bool set_global_position(const Location& loc) WARN_IF_UNUSED {39return false;40}4142/*43Arm the vehicle44*/45virtual bool arm(AP_Arming::Method method, bool do_arming_checks) WARN_IF_UNUSED;4647/*48Disarm the vehicle49*/50virtual bool disarm(AP_Arming::Method method, bool do_disarm_checks) WARN_IF_UNUSED;5152static AP_ExternalControl *get_singleton(void) WARN_IF_UNUSED {53return singleton;54}55protected:56~AP_ExternalControl() {}5758private:59static AP_ExternalControl *singleton;60};616263namespace AP64{65AP_ExternalControl *externalcontrol();66};6768#endif // AP_EXTERNAL_CONTROL_ENABLED697071