VSM C++ SDK
Vehicle Specific Modules SDK
task.h
Go to the documentation of this file.
1 // Copyright (c) 2014, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
11 #ifndef _TASK_H_
12 #define _TASK_H_
13 
14 #include <vector>
15 #include <ugcs/vsm/action.h>
16 #include <ugcs/vsm/coordinates.h>
18 #include <ugcs/vsm/optional.h>
19 
20 namespace ugcs {
21 namespace vsm {
22 
23 typedef std::shared_ptr<ugcs::vsm::proto::Vsm_message> Proto_msg_ptr;
24 
26 class Task {
27 public:
28 
32  Task(size_t reserved_size = 0)
33  {
34  if (reserved_size) {
35  actions.reserve(reserved_size);
36  }
37  }
38 
43  Get_home_position() const;
44 
46  double
48 
52  double
53  Get_takeoff_altitude() const;
54 
57  void
58  Set_takeoff_altitude(double altitude);
59 
61  std::vector<Action::Ptr> actions;
62 
67 
70 
71  Proto_msg_ptr ucs_response;
72 
73 private:
74 
79  std::tuple<Wgs84_position, double>
80  Get_home_position_impl() const;
81 
83  Optional<double> takeoff_altitude;
84 
85 };
86 
87 } /* namespace vsm */
88 } /* namespace ugcs */
89 
90 #endif /* _VSM_MISSION_H_ */
UGCS root namespace.
Definition: android-linux/ugcs/vsm/platform_sockets.h:27
Action plan for a single vehicle.
Definition: task.h:26
Definition: property.h:191
Property_list parameters
Parameter list for the task .
Definition: task.h:69
std::shared_ptr< Task_attributes_action > Ptr
Pointer type.
Definition: task_attributes_action.h:21
Wgs84_position Get_home_position() const
Retrieve home position from action.
Task(size_t reserved_size=0)
Constructor.
Definition: task.h:32
Generic action.
double Get_home_position_altitude() const
Get terrain height at home position in meters.
std::vector< Action::Ptr > actions
Action list of the task .
Definition: task.h:61
Coordinates manipulation.
void Set_takeoff_altitude(double altitude)
Internal SDK method.
double Get_takeoff_altitude() const
Get take-off altitude, that is the absolute altitude of the position where the vehicle was or will be...
Task_attributes_action::Ptr attributes
Task attributes action.
Definition: task.h:66