Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/ArduCopter/AP_ExternalControl_Copter.h
9564 views
1
/*
2
external control library for copter
3
*/
4
#pragma once
5
6
#include <AP_ExternalControl/AP_ExternalControl.h>
7
8
#if AP_EXTERNAL_CONTROL_ENABLED
9
10
class AP_ExternalControl_Copter : public AP_ExternalControl
11
{
12
public:
13
/*
14
Set linear velocity and yaw rate. Pass NaN for yaw_rate_rads to not control yaw.
15
Velocity is in earth frame, NED [m/s].
16
Yaw is in earth frame, NED [rad/s].
17
*/
18
bool set_linear_velocity_and_yaw_rate(const Vector3f &linear_velocity_ned_ms, float yaw_rate_rads) override WARN_IF_UNUSED;
19
20
/*
21
Sets the target global position for a loiter point.
22
*/
23
bool set_global_position(const Location& loc) override WARN_IF_UNUSED;
24
private:
25
/*
26
Return true if Copter is ready to handle external control data.
27
Currently checks mode and arm states.
28
*/
29
bool ready_for_external_control() WARN_IF_UNUSED;
30
};
31
32
#endif // AP_EXTERNAL_CONTROL_ENABLED
33
34