Sen API
Sen Libraries
Loading...
Searching...
No Matches
algorithms.h
Go to the documentation of this file.
1// === algorithms.h ====================================================================================================
2// Sen Infrastructure
3// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4// See the LICENSE.txt file for more information.
5// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6// =====================================================================================================================
7
8#ifndef SEN_UTIL_DR_ALGORITHMS_H
9#define SEN_UTIL_DR_ALGORITHMS_H
10
11// sen
16
17// std
18#include <array>
19
20namespace sen::util
21{
22
25
27SEN_NON_RANGED_QUANTITY(LengthMeters, f64)
28
29
30SEN_NON_RANGED_QUANTITY(VelocityMetersPerSecond, f32)
31
32
33SEN_NON_RANGED_QUANTITY(AccelerationMetersPerSecondSquared, f32)
34
35
36SEN_NON_RANGED_QUANTITY(AngleRadians, f32)
37
38
39SEN_NON_RANGED_QUANTITY(AngularVelocityRadiansPerSecond, f32)
40
41
42SEN_NON_RANGED_QUANTITY(AngularAccelerationRadiansPerSecondSquared, f32)
43
44
45SEN_RANGED_QUANTITY(LatitudeDegrees, f64, -90.0, 90.0)
46
47
48SEN_RANGED_QUANTITY(LongitudeDegrees, f64, -180.0, 180.0)
49
51SEN_NON_RANGED_QUANTITY(TimeSeconds, f64)
52
54SEN_NON_RANGED_QUANTITY(DampingCoefficient, f64)
55
58{
60 bool smoothing = true;
61
63 LengthMeters maxDistance = 100000.0;
64
66 sen::Duration maxDeltaTime {std::chrono::seconds(1)};
67
70 sen::Duration smoothingInterval {std::chrono::milliseconds(20)};
71
73 sen::Duration positionConvergenceTime {std::chrono::milliseconds(500)};
74
76 DampingCoefficient positionDamping = 1.0;
77
79 sen::Duration orientationConvergenceTime {std::chrono::milliseconds(50)};
80
82 DampingCoefficient orientationDamping = 20.0;
83};
84
87{
88 LengthMeters x;
89 LengthMeters y;
90 LengthMeters z;
91};
92
95{
96 LatitudeDegrees latitude;
97 LongitudeDegrees longitude;
98 LengthMeters altitude;
99};
100
103{
104 AngleRadians psi;
105 AngleRadians theta;
106 AngleRadians phi;
107};
108
111{
112 VelocityMetersPerSecond x;
113 VelocityMetersPerSecond y;
114 VelocityMetersPerSecond z;
115};
116
119{
120 AccelerationMetersPerSecondSquared x;
121 AccelerationMetersPerSecondSquared y;
122 AccelerationMetersPerSecondSquared z;
123};
124
127{
128 AngularVelocityRadiansPerSecond x;
129 AngularVelocityRadiansPerSecond y;
130 AngularVelocityRadiansPerSecond z;
131};
132
135{
136 AngularAccelerationRadiansPerSecondSquared x;
137 AngularAccelerationRadiansPerSecondSquared y;
138 AngularAccelerationRadiansPerSecondSquared z;
139};
140
170
199
202{
204 drFPW = 1,
205 drRPW = 2,
206 drRVW = 3,
207 drFVW = 4,
208 drFPB = 5,
209 drRPB = 6,
210 drRVB = 7,
211 drFVB = 8,
212};
213
218
220[[nodiscard]] Situation drFpw(const Situation& value, sen::TimeStamp time) noexcept;
221
223[[nodiscard]] Situation drFpb(const Situation& value, sen::TimeStamp time) noexcept;
224
226[[nodiscard]] Situation drRpw(const Situation& value, sen::TimeStamp time) noexcept;
227
230[[nodiscard]] Situation drRpb(const Situation& value, sen::TimeStamp time) noexcept;
231
233[[nodiscard]] Situation drRvw(const Situation& value, sen::TimeStamp time) noexcept;
234
236[[nodiscard]] Situation drRvb(const Situation& value, sen::TimeStamp time) noexcept;
237
239[[nodiscard]] Situation drFvw(const Situation& value, sen::TimeStamp time) noexcept;
240
242[[nodiscard]] Situation drFvb(const Situation& value, sen::TimeStamp time) noexcept;
243
245
246} // namespace sen::util
247
248#endif // SEN_UTIL_DR_ALGORITHMS_H
A time duration.
Definition duration.h:25
A point in time.
Definition timestamp.h:26
AccelerationMetersPerSecondSquared z
Definition algorithms.h:122
sen::Duration positionConvergenceTime
Convergence time for the smoothed position to match the updated position.
Definition algorithms.h:73
LengthMeters maxDistance
No smoothing is performed for displacements bigger than this distance.
Definition algorithms.h:63
LatitudeDegrees latitude
Definition algorithms.h:96
LengthMeters y
Definition algorithms.h:89
AngularVelocityRadiansPerSecond z
Definition algorithms.h:130
VelocityMetersPerSecond y
Definition algorithms.h:113
DampingCoefficient orientationDamping
Damping coefficient for the smoothed orientation solution.
Definition algorithms.h:82
AccelerationMetersPerSecondSquared y
Definition algorithms.h:121
AccelerationMetersPerSecondSquared x
Definition algorithms.h:120
bool isFrozen
When true, no extrapolation is performed because the entity is frozen.
Definition algorithms.h:175
Location worldLocation
Position in ECEF.
Definition algorithms.h:151
AngularVelocity angularVelocity
Angular velocity vector with respect to body reference system.
Definition algorithms.h:161
AngularAccelerationRadiansPerSecondSquared y
Definition algorithms.h:137
AngularVelocityRadiansPerSecond y
Definition algorithms.h:129
AngleRadians theta
Definition algorithms.h:105
LengthMeters x
Definition algorithms.h:88
AngularAccelerationRadiansPerSecondSquared z
Definition algorithms.h:138
VelocityMetersPerSecond x
Definition algorithms.h:112
Velocity velocityVector
Velocity vector with respect to ECEF or body reference system (depending on the reference system of t...
Definition algorithms.h:158
AngleRadians psi
Definition algorithms.h:104
AngleRadians phi
Definition algorithms.h:106
Velocity velocityVector
Velocity vector with respect to NED.
Definition algorithms.h:188
LengthMeters z
Definition algorithms.h:90
AngularVelocity angularVelocity
Angular velocity vector with respect to body-reference system.
Definition algorithms.h:191
VelocityMetersPerSecond z
Definition algorithms.h:114
Orientation orientation
Orientation of the body reference system (x forward, y right, z down) with respect to NED (North - Ea...
Definition algorithms.h:185
LongitudeDegrees longitude
Definition algorithms.h:97
Orientation orientation
Orientation of the body reference system (x forward, y right, z down) with respect to ECEF.
Definition algorithms.h:154
Acceleration accelerationVector
Acceleration vector with respect to ECEF or body reference system (depending on the reference system ...
Definition algorithms.h:165
AngularAcceleration angularAcceleration
Angular acceleration vector with respect to body-reference system.
Definition algorithms.h:197
Acceleration accelerationVector
Acceleration vector with respect to NED.
Definition algorithms.h:194
DampingCoefficient positionDamping
Damping coefficient for the smoothed position solution.
Definition algorithms.h:76
AngularAccelerationRadiansPerSecondSquared x
Definition algorithms.h:136
sen::Duration maxDeltaTime
No smoothing is performed for time deltas bigger than this duration.
Definition algorithms.h:66
sen::TimeStamp timeStamp
TimeStamp of the instant when the situation is computed.
Definition algorithms.h:148
AngularVelocityRadiansPerSecond x
Definition algorithms.h:128
sen::Duration orientationConvergenceTime
Convergence time for the smoothed orientation to match the updated orientation.
Definition algorithms.h:79
GeodeticWorldLocation worldLocation
World Location in Geodetic (Latitude, Longitude, Altitude).
Definition algorithms.h:181
bool smoothing
If true, the position and orientation of the input data is smoothed removing noise.
Definition algorithms.h:60
AngularAcceleration angularAcceleration
Angular acceleration vector with respect to body reference system.
Definition algorithms.h:168
sen::Duration smoothingInterval
Maximum time interval used to update the smoothed solution. It is used to prevent the smoothed soluti...
Definition algorithms.h:70
bool isFrozen
When true, no extrapolation is performed because the entity is frozen.
Definition algorithms.h:145
LengthMeters altitude
Definition algorithms.h:98
sen::TimeStamp timeStamp
TimeStamp of the instant when the situation is computed.
Definition algorithms.h:178
Situation drRvb(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the RVB algorithm.
Situation drRvw(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the RVW algorithm.
Situation drFpb(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the FPB algorithm. The velocity is expressed in body coordin...
Situation drFvb(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the FVB algorithm.
Situation drRpb(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the RPB algorithm. The input situation should be expressed i...
Situation drRpw(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the RPW algorithm.
Situation drFvw(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the FVW algorithm.
constexpr std::array< SpatialAlgorithm, 4U > bodyAlgorithms
Definition algorithms.h:214
SpatialAlgorithm
Enumeration of the different Spatial algorithms.
Definition algorithms.h:202
Situation drFpw(const Situation &value, sen::TimeStamp time) noexcept
Returns the extrapolated situation using the FPW algorithm.
@ drFPW
Definition algorithms.h:204
@ drRVB
Definition algorithms.h:210
@ drFPB
Definition algorithms.h:208
@ drRVW
Definition algorithms.h:206
@ drFVB
Definition algorithms.h:211
@ drRPW
Definition algorithms.h:205
@ drRPB
Definition algorithms.h:209
@ drStatic
Definition algorithms.h:203
@ drFVW
Definition algorithms.h:207
Acceleration struct.
Definition algorithms.h:119
AngularAcceleration struct.
Definition algorithms.h:135
AngularVelocity struct.
Definition algorithms.h:127
Length in meters.
Definition algorithms.h:58
GeodeticSituation structure with the following parameters:
Definition algorithms.h:173
World location in geodetic coordinates.
Definition algorithms.h:95
World Location struct.
Definition algorithms.h:87
Orientation struct.
Definition algorithms.h:103
Situation structure with the following parameters:
Definition algorithms.h:143
Velocity struct.
Definition algorithms.h:111
@ time
Definition unit.h:34
#define SEN_NON_RANGED_QUANTITY(class_name, value_type)
Use this macro to define types for quantities that specify no range NOLINTNEXTLINE(cppcoreguidelines-...
Definition quantity.h:147
float32_t f32
Definition numbers.h:28
#define SEN_RANGED_QUANTITY(class_name, value_type, min_value, max_value)
Use this macro to define types for values that shall stay within some [min, max] range....
Definition quantity.h:134
float64_t f64
Definition numbers.h:29
Definition iterator_adapters.h:16