VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
camera_control_action.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 
8 #ifndef _UGCS_VSM_CAMERA_CONTROL_ACTION_H_
9 #define _UGCS_VSM_CAMERA_CONTROL_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  Camera_control_action(double tilt, double roll, double yaw, double zoom) :
24  Action(Type::CAMERA_CONTROL),
25  tilt(tilt), roll(roll), yaw(yaw), zoom(zoom) {}
26 
31  Action(Type::CAMERA_CONTROL)
32  {
33  p.at("tilt")->Get_value(tilt);
34  p.at("roll")->Get_value(roll);
35  p.at("yaw")->Get_value(yaw);
36  p.at("zoom_level")->Get_value(zoom);
37  }
38 
42  double tilt;
43 
47  double roll;
48 
52  double yaw;
53 
55  double zoom;
56 };
57 
59 template<>
60 struct Action::Mapper<Action::Type::CAMERA_CONTROL> {
63 };
64 
65 } /* namespace vsm */
66 } /* namespace ugcs */
67 
68 #endif /* _UGCS_VSM_CAMERA_CONTROL_ACTION_H_ */
Definition: property.h:249
Camera_control_action type
Real type.
Definition: camera_control_action.h:62
double zoom
Device specific camera zoom level.
Definition: camera_control_action.h:55
Type
Types of vehicle actions as part of task (mission).
Definition: action.h:30
Camera_control_action(const Property_list &p)
Construct action from protobuf command.
Definition: camera_control_action.h:30
Generic action.
Definition: action.h:22
Generic action.
Map Action type enum value to specific Action type class.
Definition: action.h:120
Camera control action.
Definition: camera_control_action.h:18
#define DEFINE_COMMON_CLASS(__class_name,...)
Use this macro to define some common attributes for a class.
Definition: utils.h:25
double roll
Target camera roll value in radians: [-Pi/2, Pi/2], where -Pi/2 stands for left and Pi/2 for right...
Definition: camera_control_action.h:47
double tilt
Target camera tilt value in radians: [-Pi/2, Pi/2], where -Pi/2 stands for looking backward...
Definition: camera_control_action.h:42
double yaw
Target camera yaw value in radians: [-Pi/2, Pi/2], where -Pi/2 stands for left and Pi/2 for right...
Definition: camera_control_action.h:52