Qualcomm Navigator Flight Control Interface  2.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
waypoint_config.hpp
1 /****************************************************************************
2  * Copyright (c) 2018 John A. Dougherty. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in
12  * the documentation and/or other materials provided with the
13  * distribution.
14  * 3. Neither the name ATLFlight nor the names of its contributors may be
15  * used to endorse or promote products derived from this software
16  * without specific prior written permission.
17  *
18  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  * In addition Supplemental Terms apply. See the SUPPLEMENTAL file.
33  ****************************************************************************/
34 
35 #ifndef SNAV_FCI_WAYPOINT_CONFIG_HPP_
36 #define SNAV_FCI_WAYPOINT_CONFIG_HPP_
37 
38 #include <cmath>
39 
40 namespace snav_fci
41 {
42 
47 {
48 public:
49 
53  enum class YawType
54  {
55  FORWARD,
56  WAYPOINT,
57  };
58 
63  {
66  max_yaw_velocity_norm = M_PI;
68  }
69 
74  float max_linear_acceleration_norm, float max_angular_velocity_norm,
75  float max_angular_acceleration_norm, YawType yaw_type)
76  {
77  this->max_linear_velocity_norm = fabs(max_linear_velocity_norm);
78  this->max_linear_acceleration_norm = fabs(max_linear_acceleration_norm);
79  this->max_yaw_velocity_norm = fabs(max_angular_velocity_norm);
80  this->yaw_type = yaw_type;
81  }
82 
89 
96 
101 
106 };
107 
108 } // namespace snav_fci
109 
110 #endif // SNAV_FCI_WAYPOINT_CONFIG_HPP_
111 
Structure containing waypoint options.
Definition: waypoint_config.hpp:46
YawType yaw_type
Specifies how desired yaw is handled for this waypoint.
Definition: waypoint_config.hpp:105
float max_linear_acceleration_norm
Maximum allowed linear acceleration magnitude in m/s/s.
Definition: waypoint_config.hpp:95
float max_yaw_velocity_norm
Maximum allowed yaw velocity magnitude in rad/s.
Definition: waypoint_config.hpp:100
float max_linear_velocity_norm
Maximum allowed linear velocity magnitude in m/s.
Definition: waypoint_config.hpp:88
YawType
Enum used to handle different ways of handling yaw tracking.
Definition: waypoint_config.hpp:53
WaypointConfig(float max_linear_velocity_norm, float max_linear_acceleration_norm, float max_angular_velocity_norm, float max_angular_acceleration_norm, YawType yaw_type)
Definition: waypoint_config.hpp:73
WaypointConfig()
Default constructor.
Definition: waypoint_config.hpp:62