|
I-Seed drone's onboard service
0.0.9
|
Drone's mission control. More...
#include <mission.h>
Public Member Functions | |
| mission () noexcept | |
| ~mission () | |
| void | mission_path_ready (std::vector< lat_lon > mission_path, int32_t event_id) |
| The mission path is ready. It is constructed based on an input polygon. More... | |
| void | mission_path_cancel (int32_t event_id) |
| A user request to clear the current mission path. More... | |
| const std::vector< lat_lon > | get_mission_path () const |
| Get the costructred mission path. More... | |
| void | init () |
| 'MISSION_START' command received from user More... | |
| bool | upload_mission_and_start (int32_t event_id) |
| Upload and start mission. More... | |
| std::pair< waypoint_action, std::size_t > | waypoint_reached (float laser_range) |
| Ask for an action when waypoint reached. More... | |
| waypoint | get_waypoint_copy (std::size_t index) const |
| Waypoint copy by index. More... | |
| void | save_detection (std::size_t index, const detection_result &result) |
| Save the detected objects to waypoint data. More... | |
| void | set_backward () |
| The forward mission is finished, now set the current mission status to backward. More... | |
| bool | is_forward () const |
| Check if mission is forward. More... | |
| bool | is_finished () const |
| Flag to indicate that mission is finished. More... | |
| bool | is_ready () const |
| Flag to indicate that mission is ready to be started. More... | |
| bool | is_paused () const |
| Flag to indicate that execution of mission is paused. More... | |
| bool | user_cmd_accepted () const |
| Flag to indicate that mission is in the stable state and is ready to accept the user commands pause/resume/abort. More... | |
| void | update_event_id (int32_t event_id) |
| Update mission event_id. More... | |
| bool | update (T_DjiWaypointV2MissionEventPush event_data) |
| Process mission event received from Payload SDK. More... | |
| std::pair< bool, bool > | update (T_DjiWaypointV2MissionStatePush state_data) |
| Process state update event received from Payload SDK. More... | |
| void | abort (int32_t event_id) |
| Abort the mission. More... | |
| void | pause (int32_t event_id) |
| Pause the mission. More... | |
| void | stop (home_altitude &h) |
| Stop the mission. More... | |
| void | resume (int32_t event_id) |
| Resume the mission. More... | |
| std::pair< int32_t, interconnection::drone_info::state_t > | get_state () |
| Periodically send the current state to the drone control Android application. More... | |
Drone's mission control.
|
defaultnoexcept |
|
default |
| void mission::mission_path_ready | ( | std::vector< lat_lon > | mission_path, |
| int32_t | event_id | ||
| ) |
The mission path is ready. It is constructed based on an input polygon.
| void mission::mission_path_cancel | ( | int32_t | event_id | ) |
A user request to clear the current mission path.

| auto mission::get_mission_path | ( | ) | const |
Get the costructred mission path.

| void mission::init | ( | ) |
'MISSION_START' command received from user

| auto mission::upload_mission_and_start | ( | int32_t | event_id | ) |
Upload and start mission.
| auto mission::waypoint_reached | ( | float | laser_range | ) |
Ask for an action when waypoint reached.
| [in] | laser_range | Use the laser range to determine the real drone height |
| auto mission::get_waypoint_copy | ( | std::size_t | index | ) | const |
| void mission::save_detection | ( | std::size_t | index, |
| const detection_result & | result | ||
| ) |
Save the detected objects to waypoint data.
| [in] | index | Waypoint index |
| [in] | result | Detection result |
| void mission::set_backward | ( | ) |
The forward mission is finished, now set the current mission status to backward.

| auto mission::is_forward | ( | ) | const |
| auto mission::is_finished | ( | ) | const |
Flag to indicate that mission is finished.

| auto mission::is_ready | ( | ) | const |
Flag to indicate that mission is ready to be started.

| auto mission::is_paused | ( | ) | const |
Flag to indicate that execution of mission is paused.

| auto mission::user_cmd_accepted | ( | ) | const |
Flag to indicate that mission is in the stable state and is ready to accept the user commands pause/resume/abort.

| void mission::update_event_id | ( | int32_t | event_id | ) |
Update mission event_id.
Apply new value without affecting the state because the state is no longer actual. E.g., trying to abort a mission that is already finished.

| auto mission::update | ( | T_DjiWaypointV2MissionEventPush | event_data | ) |
Process mission event received from Payload SDK.
| auto mission::update | ( | T_DjiWaypointV2MissionStatePush | state_data | ) |
Process state update event received from Payload SDK.
| void mission::abort | ( | int32_t | event_id | ) |
Abort the mission.

| void mission::pause | ( | int32_t | event_id | ) |
Pause the mission.

| void mission::stop | ( | home_altitude & | h | ) |
Stop the mission.

| void mission::resume | ( | int32_t | event_id | ) |
Resume the mission.
Triggered when MISSION_CONTINUE received from user

| auto mission::get_state | ( | ) |
Periodically send the current state to the drone control Android application.