Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Dronecode/sdk_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee committed Apr 2, 2019
2 parents 3c14b7d + aaeebc1 commit 83de514
Show file tree
Hide file tree
Showing 14 changed files with 468 additions and 262 deletions.
5 changes: 3 additions & 2 deletions en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* [FAQ](getting_started/faq.md)
<!-- * [Quick Start](getting_started/README.md) -->
* [iOS/Swift](http://dronecode-sdk-swift.s3.eu-central-1.amazonaws.com/docs/master/index.html)
* [Python](https://github.com/dronecode/dronecodesdk-python#dronecodesdk-python)
* [C++ (Dronecode Core)](cpp/README.md)
* [Guide](guide/README.md)
* [Usage/Paradigms](guide/general_usage.md)
Expand Down Expand Up @@ -51,6 +52,7 @@
* [struct AltitudeRate](api_reference/structdronecode__sdk_1_1_offboard_1_1_attitude_rate.md)
* [struct VelocityBodyYawspeed](api_reference/structdronecode__sdk_1_1_offboard_1_1_velocity_body_yawspeed.md)
* [struct VelocityNEDYaw](api_reference/structdronecode__sdk_1_1_offboard_1_1_velocity_n_e_d_yaw.md)
* [struct PositionNEDYaw](api_reference/structdronecode__sdk_1_1_offboard_1_1_position_n_e_d_yaw.md)
* [class Gimbal](api_reference/classdronecode__sdk_1_1_gimbal.md)
* [class Camera](api_reference/classdronecode__sdk_1_1_camera.md)
* [struct Information](api_reference/structdronecode__sdk_1_1_camera_1_1_information.md)
Expand All @@ -71,12 +73,11 @@
* [struct ProgressData](api_reference/structdronecode__sdk_1_1_calibration_1_1_progress_data.md)
* [class LogFiles](api_reference/classdronecode__sdk_1_1_log_files.md)
* [struct Entry](api_reference/structdronecode__sdk_1_1_log_files_1_1_entry.md)
* [class ParamsRaw](api_reference/classdronecode__sdk_1_1_params_raw.md)
* [class Param](api_reference/classdronecode__sdk_1_1_param.md)
* [class MissionRaw](api_reference/classdronecode__sdk_1_1_mission_raw.md)
* [struct MavlinkMissionItemInt](api_reference/structdronecode__sdk_1_1_mission_raw_1_1_mavlink_mission_item_int.md)
* [MavlinkPassthrough](/api_reference/classdronecode__sdk_1_1_mavlink_passthrough.md)
* [namespace dronecode_sdk (globals)](api_reference/namespacedronecode__sdk.md)

* [Contributing](contributing/README.md)
* [Building Source](contributing/build.md)
* [Testing](contributing/test.md)
Expand Down
3 changes: 2 additions & 1 deletion en/api_reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* [struct VelocityBodyYawspeed](structdronecode__sdk_1_1_offboard_1_1_velocity_body_yawspeed.md)
* [struct VelocityNEDYaw](structdronecode__sdk_1_1_offboard_1_1_velocity_n_e_d_yaw.md)
* [struct AltitudeRate](structdronecode__sdk_1_1_offboard_1_1_attitude_rate.md)
* [struct PositionNEDYaw](structdronecode__sdk_1_1_offboard_1_1_position_n_e_d_yaw.md)
* [class Gimbal](classdronecode__sdk_1_1_gimbal.md)
* [class Camera](classdronecode__sdk_1_1_camera.md)
* [struct Information](structdronecode__sdk_1_1_camera_1_1_information.md)
Expand All @@ -45,7 +46,7 @@
* [struct ProgressData](structdronecode__sdk_1_1_calibration_1_1_progress_data.md)
* [class LogFiles](classdronecode__sdk_1_1_log_files.md)
* [struct Entry](structdronecode__sdk_1_1_log_files_1_1_entry.md)
* [class ParamsRaw](classdronecode__sdk_1_1_params_raw.md)
* [class Param](classdronecode__sdk_1_1_param.md)
* [class MissionRaw](classdronecode__sdk_1_1_mission_raw.md)
* [struct MavlinkMissionItemInt](structdronecode__sdk_1_1_mission_raw_1_1_mavlink_mission_item_int.md)
* [class MavlinkPassthrough](classdronecode__sdk_1_1_mavlink_passthrough.md)
Expand Down
14 changes: 7 additions & 7 deletions en/api_reference/classdronecode__sdk_1_1_action.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Type | Name | Description
[Result](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1a7075ba49da42a7e5122b3c9a1979df6d) | [takeoff](#classdronecode__sdk_1_1_action_1abbcce1c335e6aec78917af9e705e235e) () const | Send command to *take off and hover* (synchronous).
[Result](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1a7075ba49da42a7e5122b3c9a1979df6d) | [land](#classdronecode__sdk_1_1_action_1af50fb3a17784557281ac37e83022575f) () const | Send command to *land* at the current position (synchronous).
[Result](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1a7075ba49da42a7e5122b3c9a1979df6d) | [return_to_launch](#classdronecode__sdk_1_1_action_1aae04fe166fac96b2efadee26f91de3d1) () const | Send command to *return to the launch* (takeoff) position and *land* (asynchronous).
[Result](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1a7075ba49da42a7e5122b3c9a1979df6d) | [goto_location](#classdronecode__sdk_1_1_action_1ab6bcb58fdac1aa7e699f89ed605c7666) (double latitude_deg, double longitude_deg, float altitude_amsl_m, float yaw_deg) | Send command to reposition the vehicle to a specific WGS84 global position.
[Result](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1a7075ba49da42a7e5122b3c9a1979df6d) | [goto_location](#classdronecode__sdk_1_1_action_1ab6bcb58fdac1aa7e699f89ed605c7666) (double latitude_deg, double longitude_deg, float altitude_amsl_m, float yaw_deg) | Send command to move the vehicle to a specific global position.
[Result](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1a7075ba49da42a7e5122b3c9a1979df6d) | [transition_to_fixedwing](#classdronecode__sdk_1_1_action_1a80c1336efa7b165df4beadb64435f31a) () const | Send command to transition the drone to fixedwing.
[Result](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1a7075ba49da42a7e5122b3c9a1979df6d) | [transition_to_multicopter](#classdronecode__sdk_1_1_action_1ab18e5b60e262e5dc9e6cb9479a285b2a) () const | Send command to transition the drone to multicopter.
void | [arm_async](#classdronecode__sdk_1_1_action_1ad295c4f5fb38636d1603dd1c401ca4a1) ([result_callback_t](classdronecode__sdk_1_1_action.md#classdronecode__sdk_1_1_action_1ac20e209e6ad3fce8e1b755f025a6581b) callback) | Send command to *arm* the drone (asynchronous).
Expand Down Expand Up @@ -254,16 +254,16 @@ Result dronecode_sdk::Action::goto_location(double latitude_deg, double longitud
```
Send command to reposition the vehicle to a specific WGS84 global position.
Send command to move the vehicle to a specific global position.
This sends the vehicle to a specified lattitude/longitude/altitude coordinates.
The latitude and longitude are given in degrees (WGS84 frame) and the altitude in meters AMSL (above mean sea level).
**Parameters**
* double **latitude_deg** - Latitude in degrees
* double **longitude_deg** - Longitude in degrees
* float **altitude_amsl_m** - Altitude AMSL in meters
* float **yaw_deg** - Yaw angle in degrees
* double **latitude_deg** - Latitude in degrees.
* double **longitude_deg** - Longitude in degrees.
* float **altitude_amsl_m** - Altitude AMSL in meters.
* float **yaw_deg** - Yaw angle in degrees (Frame is NED, 0 is North, positive is clockwise).
**Returns**
Expand Down
21 changes: 20 additions & 1 deletion en/api_reference/classdronecode__sdk_1_1_camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
The [Camera](classdronecode__sdk_1_1_camera.md) class can be used to manage cameras that implement the MAVLink [Camera](classdronecode__sdk_1_1_camera.md) Protocol: [https://mavlink.io/en/protocol/camera.html](https://mavlink.io/en/protocol/camera.html).


Currently only a single camera is supported. When multiple cameras are supported the plugin will need to be instantiated separately for every camera.
Currently only a single camera is supported. When multiple cameras are supported the plugin will need to be instantiated separately for every camera and the camera selected using `select_camera`.


Synchronous and asynchronous variants of the camera methods are supplied.
Expand Down Expand Up @@ -59,6 +59,7 @@ Type | Name | Description
&nbsp; | [Camera](#classdronecode__sdk_1_1_camera_1ab578fe3d602cd2c9f916c454f00208db) ([System](classdronecode__sdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classdronecode__sdk_1_1_system.md).
&nbsp; | [~Camera](#classdronecode__sdk_1_1_camera_1a858b876e442b38f4b9953de0f5fcbfd5) () | Destructor (internal use only).
&nbsp; | [Camera](#classdronecode__sdk_1_1_camera_1a944afb176f249e97183edf97f9a3313e) (const [Camera](classdronecode__sdk_1_1_camera.md) &)=delete | Copy constructor (object is not copyable).
[Result](classdronecode__sdk_1_1_camera.md#classdronecode__sdk_1_1_camera_1af195d32b1a669d8dbb28220b45f7c069) | [select_camera](#classdronecode__sdk_1_1_camera_1ab3abe48c717107c732bd2ed2428de18a) (unsigned id) | Select camera to interact with.
[Result](classdronecode__sdk_1_1_camera.md#classdronecode__sdk_1_1_camera_1af195d32b1a669d8dbb28220b45f7c069) | [take_photo](#classdronecode__sdk_1_1_camera_1ae62b17fc618d9734aad479737a2af775) () | Take photo (synchronous).
[Result](classdronecode__sdk_1_1_camera.md#classdronecode__sdk_1_1_camera_1af195d32b1a669d8dbb28220b45f7c069) | [start_photo_interval](#classdronecode__sdk_1_1_camera_1a8c958ad6a09ead28b6ed9cdd5be2f411) (float interval_s) | Start photo interval (synchronous).
[Result](classdronecode__sdk_1_1_camera.md#classdronecode__sdk_1_1_camera_1af195d32b1a669d8dbb28220b45f7c069) | [stop_photo_interval](#classdronecode__sdk_1_1_camera_1adebc3692071d0309e9c3015789a5a253) () | Stop photo interval (synchronous).
Expand Down Expand Up @@ -293,6 +294,24 @@ Value | Description
## Member Function Documentation


### select_camera() {#classdronecode__sdk_1_1_camera_1ab3abe48c717107c732bd2ed2428de18a}
```cpp
Result dronecode_sdk::Camera::select_camera(unsigned id)
```
Select camera to interact with.
It is recommended to instantiate multiple camera plugins to deal with multiple cameras and to select the camera once right after creating the plugin.
**Parameters**
* unsigned **id** - The camera ID from 0 to 5.
**Returns**
&emsp;[Result](classdronecode__sdk_1_1_camera.md#classdronecode__sdk_1_1_camera_1af195d32b1a669d8dbb28220b45f7c069) - Result of request.
### take_photo() {#classdronecode__sdk_1_1_camera_1ae62b17fc618d9734aad479737a2af775}
```cpp
Result dronecode_sdk::Camera::take_photo()
Expand Down
30 changes: 30 additions & 0 deletions en/api_reference/classdronecode__sdk_1_1_dronecode_s_d_k.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ An instance of this class must be created (first) in order to use the library. T

Type | Description
--- | ---
enum [Configuration](#classdronecode__sdk_1_1_dronecode_s_d_k_1a3cb7c3712a0f330d29b30b501dfab947) | Possible configurations.
std::function< void(uint64_t uuid)> [event_callback_t](#classdronecode__sdk_1_1_dronecode_s_d_k_1a56579e10311b046b887fdec0c313a4b8) | Callback type for discover and timeout notifications.

## Public Member Functions
Expand All @@ -33,6 +34,7 @@ Type | Name | Description
[ConnectionResult](namespacedronecode__sdk.md#namespacedronecode__sdk_1a8ba260cb5fc0837533a86e236d205c96) | [add_tcp_connection](#classdronecode__sdk_1_1_dronecode_s_d_k_1a7c543c91cf9209745c60a5b4bb6a59b1) (int remote_port=[DEFAULT_TCP_REMOTE_PORT](classdronecode__sdk_1_1_dronecode_s_d_k.md#classdronecode__sdk_1_1_dronecode_s_d_k_1a27efab91c255ec80da081b3a2667130a)) | Adds a TCP connection with a specific port number on localhost.
[ConnectionResult](namespacedronecode__sdk.md#namespacedronecode__sdk_1a8ba260cb5fc0837533a86e236d205c96) | [add_tcp_connection](#classdronecode__sdk_1_1_dronecode_s_d_k_1ae1fda663ab173e0b1dfc644f630506e4) (const std::string & remote_ip, int remote_port=[DEFAULT_TCP_REMOTE_PORT](classdronecode__sdk_1_1_dronecode_s_d_k.md#classdronecode__sdk_1_1_dronecode_s_d_k_1a27efab91c255ec80da081b3a2667130a)) | Adds a TCP connection with a specific IP address and port number.
[ConnectionResult](namespacedronecode__sdk.md#namespacedronecode__sdk_1a8ba260cb5fc0837533a86e236d205c96) | [add_serial_connection](#classdronecode__sdk_1_1_dronecode_s_d_k_1a3b9dfa07541777ec16d9ada6423650b0) (const std::string & dev_path, int baudrate=[DEFAULT_SERIAL_BAUDRATE](classdronecode__sdk_1_1_dronecode_s_d_k.md#classdronecode__sdk_1_1_dronecode_s_d_k_1a535901e195f2910ce16bd85fca2c2e9d)) | Adds a serial connection with a specific port (COM or UART dev node) and baudrate as specified.
void | [set_configuration](#classdronecode__sdk_1_1_dronecode_s_d_k_1aa173ce1f22cbd3985fc9177392c7896b) ([Configuration](classdronecode__sdk_1_1_dronecode_s_d_k.md#classdronecode__sdk_1_1_dronecode_s_d_k_1a3cb7c3712a0f330d29b30b501dfab947) configuration) | Set `Configuration` of SDK.
std::vector< uint64_t > | [system_uuids](#classdronecode__sdk_1_1_dronecode_s_d_k_1adff0ce5e9bd666103a3ec5274ecb9b47) () const | Get vector of system UUIDs.
[System](classdronecode__sdk_1_1_system.md) & | [system](#classdronecode__sdk_1_1_dronecode_s_d_k_1a33dbbe477d4f321cff32c7cea1aee4eb) () const | Get the first discovered system.
[System](classdronecode__sdk_1_1_system.md) & | [system](#classdronecode__sdk_1_1_dronecode_s_d_k_1ad8138a15ad24f448733b76b267c62121) (uint64_t uuid)const | Get the system with the specified UUID.
Expand Down Expand Up @@ -98,6 +100,20 @@ Callback type for discover and timeout notifications.

* **uuid** - UUID of system (or MAVLink system ID for systems that don't have a UUID).

## Member Enumeration Documentation


### enum Configuration {#classdronecode__sdk_1_1_dronecode_s_d_k_1a3cb7c3712a0f330d29b30b501dfab947}


Possible configurations.


Value | Description
--- | ---
<span id="classdronecode__sdk_1_1_dronecode_s_d_k_1a3cb7c3712a0f330d29b30b501dfab947af64f82089eddc6133add8c55c65d6687"></span> `GroundStation` | SDK is used as a ground station.
<span id="classdronecode__sdk_1_1_dronecode_s_d_k_1a3cb7c3712a0f330d29b30b501dfab947a8f2f82e1a7aa48819e9530d5c4977477"></span> `CompanionComputer` | SDK is used on a companion computer onboard the system (e.g. drone).

## Member Function Documentation


Expand Down Expand Up @@ -214,6 +230,20 @@ Adds a serial connection with a specific port (COM or UART dev node) and baudrat

&emsp;[ConnectionResult](namespacedronecode__sdk.md#namespacedronecode__sdk_1a8ba260cb5fc0837533a86e236d205c96) - The result of adding the connection.

### set_configuration() {#classdronecode__sdk_1_1_dronecode_s_d_k_1aa173ce1f22cbd3985fc9177392c7896b}
```cpp
void dronecode_sdk::DronecodeSDK::set_configuration(Configuration configuration)
```
Set `Configuration` of SDK.
The default configuration is [Configuration::GroundStation](classdronecode__sdk_1_1_dronecode_s_d_k.md#classdronecode__sdk_1_1_dronecode_s_d_k_1a3cb7c3712a0f330d29b30b501dfab947af64f82089eddc6133add8c55c65d6687) The configuration is used in order to set the MAVLink system ID, the component ID, as well as the MAV_TYPE accordingly.
**Parameters**
* [Configuration](classdronecode__sdk_1_1_dronecode_s_d_k.md#classdronecode__sdk_1_1_dronecode_s_d_k_1a3cb7c3712a0f330d29b30b501dfab947) **configuration** - Configuration chosen.
### system_uuids() {#classdronecode__sdk_1_1_dronecode_s_d_k_1adff0ce5e9bd666103a3ec5274ecb9b47}
```cpp
std::vector<uint64_t> dronecode_sdk::DronecodeSDK::system_uuids() const
Expand Down
16 changes: 16 additions & 0 deletions en/api_reference/classdronecode__sdk_1_1_offboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Client code must specify a setpoint before starting offboard mode. [DronecodeSDK

struct [AttitudeRate](structdronecode__sdk_1_1_offboard_1_1_attitude_rate.md)

struct [PositionNEDYaw](structdronecode__sdk_1_1_offboard_1_1_position_n_e_d_yaw.md)

struct [VelocityBodyYawspeed](structdronecode__sdk_1_1_offboard_1_1_velocity_body_yawspeed.md)

struct [VelocityNEDYaw](structdronecode__sdk_1_1_offboard_1_1_velocity_n_e_d_yaw.md)
Expand All @@ -46,6 +48,7 @@ Type | Name | Description
void | [start_async](#classdronecode__sdk_1_1_offboard_1a8181092c3a3cac5e62dfcef4f10363de) ([result_callback_t](classdronecode__sdk_1_1_offboard.md#classdronecode__sdk_1_1_offboard_1a02563418f94499b40d27543b3f486034) callback) | Start offboard control (asynchronous).
void | [stop_async](#classdronecode__sdk_1_1_offboard_1a2ff3262dbc6194def28bb9b3d5684e68) ([result_callback_t](classdronecode__sdk_1_1_offboard.md#classdronecode__sdk_1_1_offboard_1a02563418f94499b40d27543b3f486034) callback) | Stop offboard control (asynchronous).
bool | [is_active](#classdronecode__sdk_1_1_offboard_1ac3c75fcd1ae1e6b00090eccd03696479) () const | Check if offboard control is active.
void | [set_position_ned](#classdronecode__sdk_1_1_offboard_1a127749d168fe4e7ddb40ba4c6747bb4a) ([PositionNEDYaw](structdronecode__sdk_1_1_offboard_1_1_position_n_e_d_yaw.md) position_ned_yaw) | Set the position in NED coordinates and yaw.
void | [set_velocity_ned](#classdronecode__sdk_1_1_offboard_1a95dfbe096a363e21bfd035258e786350) ([VelocityNEDYaw](structdronecode__sdk_1_1_offboard_1_1_velocity_n_e_d_yaw.md) velocity_ned_yaw) | Set the velocity in NED coordinates and yaw.
void | [set_velocity_body](#classdronecode__sdk_1_1_offboard_1ad87778386509911269b87766c0f1830f) ([VelocityBodyYawspeed](structdronecode__sdk_1_1_offboard_1_1_velocity_body_yawspeed.md) velocity_body_yawspeed) | Set the velocity body coordinates and yaw angular rate.
void | [set_attitude_rate](#classdronecode__sdk_1_1_offboard_1a511ba0314a4217c3ac3020ab2b0dfd23) ([AttitudeRate](structdronecode__sdk_1_1_offboard_1_1_attitude_rate.md) attitude_rate) | Set the attitude rate in terms of pitch, roll and yaw angular rate along with thrust in percentage.
Expand Down Expand Up @@ -208,6 +211,19 @@ Check if offboard control is active.

&emsp;bool - `true` if active

### set_position_ned() {#classdronecode__sdk_1_1_offboard_1a127749d168fe4e7ddb40ba4c6747bb4a}
```cpp
void dronecode_sdk::Offboard::set_position_ned(PositionNEDYaw position_ned_yaw)
```
Set the position in NED coordinates and yaw.
**Parameters**
* [PositionNEDYaw](structdronecode__sdk_1_1_offboard_1_1_position_n_e_d_yaw.md) **position_ned_yaw** - Position and yaw `struct`.
### set_velocity_ned() {#classdronecode__sdk_1_1_offboard_1a95dfbe096a363e21bfd035258e786350}
```cpp
void dronecode_sdk::Offboard::set_velocity_ned(VelocityNEDYaw velocity_ned_yaw)
Expand Down
Loading

0 comments on commit 83de514

Please sign in to comment.