Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
Loading...
Searching...
No Matches
local_frame_acceleration_control.hpp
1/****************************************************************************
2 *
3 * Copyright 2026 Auterion AG. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its contributors
16 * may be used to endorse or promote products derived from this software without
17 * specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 *
31 ****************************************************************************/
32
33#pragma once
34
35#include <eigen3/Eigen/Eigen>
36#include <functional>
37#include <memory>
38#include <variant>
39
40#include "../../auterion.hpp"
41
42namespace auterion {
43namespace multicopter {
57 private:
58 Eigen::Vector3f _acceleration_local_enu_m_s2 = {NAN, NAN, NAN};
59 float _heading_rad = NAN;
60 float _heading_rate_rad_s = NAN;
61
62 public:
66 class Config {};
67
69
70 inline Eigen::Vector3f getAcceleration() const { return _acceleration_local_enu_m_s2; }
71
72 inline float getHeading() const { return _heading_rad; }
73
74 inline float getHeadingRate() const { return _heading_rate_rad_s; }
75
76 inline LocalFrameAccelerationSetpoint& withAcceleration(
77 const Eigen::Vector3f& acceleration_local_enu_m_s2) {
78 _acceleration_local_enu_m_s2 = acceleration_local_enu_m_s2;
79 return *this;
80 }
81
82 inline LocalFrameAccelerationSetpoint& withHorizontalAcceleration(
83 const Eigen::Vector2f& acceleration_local_enu_m_s2) {
84 _acceleration_local_enu_m_s2.x() = acceleration_local_enu_m_s2.x();
85 _acceleration_local_enu_m_s2.y() = acceleration_local_enu_m_s2.y();
86 return *this;
87 }
88
89 inline LocalFrameAccelerationSetpoint& withVerticalAcceleration(
90 float acceleration_local_enu_m_s2) {
91 _acceleration_local_enu_m_s2.z() = acceleration_local_enu_m_s2;
92 return *this;
93 }
94
95 inline LocalFrameAccelerationSetpoint& withHeading(float heading_rad) {
96 _heading_rad = heading_rad;
97 return *this;
98 }
99
100 inline LocalFrameAccelerationSetpoint& withHeadingRate(float heading_rate_rad_s) {
101 _heading_rate_rad_s = heading_rate_rad_s;
102 return *this;
103 }
104};
105
107} // namespace multicopter
108} // namespace auterion
Placeholder config.
Definition local_frame_acceleration_control.hpp:66
Represents a setpoint to control acceleration, heading and angular rate in local frame.
Definition local_frame_acceleration_control.hpp:56