VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
change_speed_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 
10 #ifndef _UGCS_VSM_CHANGE_SPEED_ACTION_H_
11 #define _UGCS_VSM_CHANGE_SPEED_ACTION_H_
12 
13 #include <ugcs/vsm/action.h>
14 #include <ugcs/vsm/mavlink.h>
15 #include <ugcs/vsm/coordinates.h>
16 
17 namespace ugcs {
18 namespace vsm {
19 
21 class Change_speed_action: public Action {
23 
24 public:
26  Change_speed_action(float h_speed, float v_speed) :
27  Action(Type::CHANGE_SPEED),
28  speed(h_speed),
29  vertical_speed(v_speed)
30  {}
31 
36  Action(Type::CHANGE_SPEED)
37  {
38  p.at("ground_speed")->Get_value(speed);
39  p.at("vertical_speed")->Get_value(vertical_speed);
40  }
41 
45  double speed;
50 };
51 
53 template<>
54 struct Action::Mapper<Action::Type::CHANGE_SPEED> {
57 };
58 
59 } /* namespace vsm */
60 } /* namespace ugcs */
61 
62 #endif /* _UGCS_VSM_CHANGE_SPEED_ACTION_H_ */
Change_speed_action type
Real type.
Definition: change_speed_action.h:56
Definition: property.h:249
Type
Types of vehicle actions as part of task (mission).
Definition: 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
float vertical_speed
Target vertical speed in meters per second.
Definition: change_speed_action.h:49
Immediate change or vehicle airspeed.
Definition: change_speed_action.h:21
Change_speed_action(const Property_list &p)
Construct action from protobuf command.
Definition: change_speed_action.h:35
double speed
Target ground speed in meters per second.
Definition: change_speed_action.h:45
#define DEFINE_COMMON_CLASS(__class_name,...)
Use this macro to define some common attributes for a class.
Definition: utils.h:25
Coordinates manipulation.