8#ifndef SEN_UTIL_DR_SETTABLE_DEAD_RECKONER_H
9#define SEN_UTIL_DR_SETTABLE_DEAD_RECKONER_H
76 [[nodiscard]] T&
object() noexcept;
79 [[nodiscard]] const T&
object() const noexcept;
103 const
f64 orientationThresholdCos;
115 , threshold_ {thresholds}
140 obj_.setNextSpatial(toSpatialVariant(
situation, threshold_));
175 lastTimeStamp_ = timeStamp;
177 obj_.setNextSpatial(toSpatialVariant(
situation, threshold_));
190 if (!isMoving && !isAccelerating && !isRotating)
A point in time.
Definition timestamp.h:26
virtual Situation situation(sen::TimeStamp timeStamp)
Returns the extrapolated/smoothed situation of the object at the timestamp introduced as argument,...
std::variant_alternative_t< 2U, SpatialVariant > RpsSpatial
Definition detail/dead_reckoner_base.h:119
DeadReckonerTemplateBase(DrConfig config={})
Definition detail/dead_reckoner_base.h:143
std::variant_alternative_t< 4U, SpatialVariant > FvsSpatial
Definition detail/dead_reckoner_base.h:121
decltype(std::declval< RvsSpatial >().orientation) RprOrientation
Definition detail/dead_reckoner_base.h:123
decltype(std::declval< RvsSpatial >().worldLocation) RprLocation
Definition detail/dead_reckoner_base.h:122
std::variant_alternative_t< 1U, SpatialVariant > FpsSpatial
Definition detail/dead_reckoner_base.h:118
static Situation extrapolate(const SpatialVariant &spatial, sen::TimeStamp time, sen::TimeStamp lastTimeStamp)
Returns the extrapolated situation of the RPR Entity given its Spatial field and two timestamps that ...
Definition detail/dead_reckoner_base.h:148
std::remove_const_t< std::remove_reference_t< decltype(std::declval< T >().getSpatial())> > SpatialVariant
Definition detail/dead_reckoner_base.h:116
decltype(std::declval< RvsSpatial >().accelerationVector) RprAcceleration
Definition detail/dead_reckoner_base.h:125
std::variant_alternative_t< 0U, SpatialVariant > StaticSpatial
Definition detail/dead_reckoner_base.h:117
std::variant_alternative_t< 3U, SpatialVariant > RvsSpatial
Definition detail/dead_reckoner_base.h:120
decltype(std::declval< RvsSpatial >().angularVelocity) RprAngularVelocity
Definition detail/dead_reckoner_base.h:126
decltype(std::declval< RvsSpatial >().velocityVector) RprVelocity
Definition detail/dead_reckoner_base.h:124
typename Parent::SpatialVariant SpatialVariant
Definition settable_dead_reckoner.h:62
bool setSpatial(const Situation &situation)
Updates the spatial property of the object when the extrapolation error exceeds the threshold....
Definition settable_dead_reckoner.h:133
typename Parent::FvsSpatial FvsSpatial
Definition settable_dead_reckoner.h:67
typename Parent::RprVelocity RprVelocity
Definition settable_dead_reckoner.h:70
typename Parent::StaticSpatial StaticSpatial
Definition settable_dead_reckoner.h:63
T & object() noexcept
Returns a mutable reference to the RPR object whose position is extrapolated.
Definition settable_dead_reckoner.h:121
typename Parent::RprAcceleration RprAcceleration
Definition settable_dead_reckoner.h:71
SettableDeadReckoner(T &object, DrThreshold thresholds={})
Definition settable_dead_reckoner.h:113
DeadReckonerTemplateBase< T > Parent
Definition settable_dead_reckoner.h:61
typename Parent::RprAngularVelocity RprAngularVelocity
Definition settable_dead_reckoner.h:72
void setFrozen(sen::TimeStamp timeStamp, bool value)
Directly sets the frozen state of the object's spatial to true/false. The timestamp is needed to cohe...
Definition settable_dead_reckoner.h:166
typename Parent::FpsSpatial FpsSpatial
Definition settable_dead_reckoner.h:64
~SettableDeadReckoner() override=default
typename Parent::RvsSpatial RvsSpatial
Definition settable_dead_reckoner.h:66
typename Parent::RprOrientation RprOrientation
Definition settable_dead_reckoner.h:69
typename Parent::RprLocation RprLocation
Definition settable_dead_reckoner.h:68
typename Parent::RpsSpatial RpsSpatial
Definition settable_dead_reckoner.h:65
ReferenceSystem referenceSystem
Definition settable_dead_reckoner.h:43
Location worldLocation
Position in ECEF.
Definition algorithms.h:184
AngularVelocity angularVelocity
Angular velocity vector with respect to body reference system.
Definition algorithms.h:194
Velocity velocityVector
Velocity vector with respect to ECEF or body reference system (depending on the reference system of t...
Definition algorithms.h:191
AngleRadians orientationThreshold
Definition settable_dead_reckoner.h:42
Orientation orientation
Orientation of the body reference system (x forward, y right, z down) with respect to ECEF.
Definition algorithms.h:187
Acceleration accelerationVector
Acceleration vector with respect to ECEF or body reference system (depending on the reference system ...
Definition algorithms.h:198
LengthMeters distanceThreshold
Definition settable_dead_reckoner.h:41
bool isFrozen
When true, no extrapolation is performed because the entity is frozen.
Definition algorithms.h:178
Location toEcef(const GeodeticWorldLocation &latLonAlt) noexcept
Translates from Geodetic (LatLonAlt) to ECEF WorldLocation coordinates.
bool maxRotationExceeded(const Orientation &newOrientation, const Orientation &extrapolatedOrientation, f64 threshold)
Returns true when the rotation threshold has been exceeded.
Orientation nedToEcef(const Orientation &value, const GeodeticWorldLocation &latLonAlt) noexcept
Translates the Orientation in euler angles from NED to ECEF using quaternions.
T toRpr(const Location &value)
Translates a Location struct to a RPR WorldLocation given as template argument.
Definition dead_reckoner_impl.h:137
bool isRotating(const AngularVelocity &omega)
Returns true when angular velocity acceleration is not null.
Situation toSituation(const GeodeticSituation &value) noexcept
Converts a situation from geodetic to ECEF.
bool isMoving(const Velocity &velocity)
Returns true when entity velocity is not null.
bool maxDistanceExceeded(const Location &newPosition, const Location &extrapolatedPosition, f64 threshold)
Returns true when the distance threshold has been exceeded.
bool isAccelerating(const Acceleration &acceleration)
Returns true when entity acceleration is not null.
ReferenceSystem
Enumeration of the reference system: world-centered or body-centered.
Definition settable_dead_reckoner.h:30
@ world
Definition settable_dead_reckoner.h:31
@ body
Definition settable_dead_reckoner.h:32
@ drFPW
Definition algorithms.h:60
@ drRVB
Definition algorithms.h:66
@ drFPB
Definition algorithms.h:64
@ drRVW
Definition algorithms.h:62
@ drFVB
Definition algorithms.h:67
@ drRPW
Definition algorithms.h:61
@ drRPB
Definition algorithms.h:65
@ drStatic
Definition algorithms.h:59
@ drFVW
Definition algorithms.h:63
How far the extrapolation may drift from the data before the Spatial is written: a distance per axis ...
Definition settable_dead_reckoner.h:40
GeodeticSituation structure with the following parameters:
Definition algorithms.h:208
Situation structure with the following parameters:
Definition algorithms.h:176
uint32_t u32
Definition numbers.h:25
float64_t f64
Definition numbers.h:29
Definition iterator_adapters.h:16