VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
camera_series_by_distance_action.h
1 // Copyright (c) 2018, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
8 #ifndef _UGCS_VSM_CAMERA_SERIES_BY_DISTANCE_ACTION_H_
9 #define _UGCS_VSM_CAMERA_SERIES_BY_DISTANCE_ACTION_H_
10 
11 #include <ugcs/vsm/action.h>
12 #include <ugcs/vsm/mavlink.h>
13 
14 namespace ugcs {
15 namespace vsm {
16 
20 
21 public:
23  Optional<int> count,
24  std::chrono::milliseconds initial_delay):
25  Action(Type::CAMERA_SERIES_BY_DISTANCE),
26  interval(interval),
27  count(count),
29  {}
34  Action(Type::CAMERA_SERIES_BY_DISTANCE)
35  {
36  int tmp;
37  float time;
38  if (p.at("count")->Get_value(tmp)) {
39  count = tmp;
40  }
41  p.at("distance")->Get_value(interval);
42  p.at("delay")->Get_value(time);
43  tmp = time * 1000;
44  initial_delay = std::chrono::milliseconds(tmp);
45  }
46 
48  double interval;
50  Optional<int> count;
54  std::chrono::milliseconds initial_delay;
55 };
56 
58 template<>
59 struct Action::Mapper<Action::Type::CAMERA_SERIES_BY_DISTANCE> {
62 };
63 
64 } /* namespace vsm */
65 } /* namespace ugcs */
66 
67 #endif /* _UGCS_VSM_CAMERA_SERIES_BY_DISTANCE_ACTION_H_ */
double interval
Distance interval between two consequent shots in meters.
Definition: camera_series_by_distance_action.h:48
Definition: property.h:249
Performs a series of consequent camera shots in a fixed time intervals.
Definition: camera_series_by_distance_action.h:18
std::chrono::milliseconds initial_delay
Initial delay.
Definition: camera_series_by_distance_action.h:54
Type
Types of vehicle actions as part of task (mission).
Definition: action.h:30
Generic action.
Definition: action.h:22
Camera_series_by_distance_action(const Property_list &p)
Construct action from protobuf command.
Definition: camera_series_by_distance_action.h:33
Optional< int > count
Total number of shots to perform.
Definition: camera_series_by_distance_action.h:50
Generic action.
Map Action type enum value to specific Action type class.
Definition: action.h:120
#define DEFINE_COMMON_CLASS(__class_name,...)
Use this macro to define some common attributes for a class.
Definition: utils.h:25
Camera_series_by_distance_action type
Real type.
Definition: camera_series_by_distance_action.h:61