VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
task.h
Go to the documentation of this file.
1 // Copyright (c) 2018, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
11 #ifndef _UGCS_VSM_TASK_H_
12 #define _UGCS_VSM_TASK_H_
13 
14 #include <ugcs/vsm/coordinates.h>
16 #include <ugcs/vsm/optional.h>
17 #include <ugcs/vsm/action.h>
18 #include <vector>
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:
31  Task(size_t reserved_size = 0)
32  {
33  if (reserved_size) {
34  actions.reserve(reserved_size);
35  }
36  }
37 
42  Get_home_position() const;
43 
45  double
47 
51  double
52  Get_takeoff_altitude() const;
53 
56  void
57  Set_takeoff_altitude(double altitude);
58 
60  std::vector<Action::Ptr> actions;
61 
66 
69 
70  Proto_msg_ptr ucs_response;
71 
72  bool return_native_route = false;
73  bool use_crlf_in_native_route = false;
74 
75 private:
80  std::tuple<Wgs84_position, double>
81  Get_home_position_impl() const;
82 
84  Optional<double> takeoff_altitude;
85 };
86 
87 } /* namespace vsm */
88 } /* namespace ugcs */
89 
90 #endif /* _UGCS_VSM_TASK_H_ */
Action plan for a single vehicle.
Definition: task.h:26
Definition: property.h:249
Property_list parameters
Parameter list for the task .
Definition: task.h:68
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:31
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:60
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:65