29#include "trax/Units.h"
30#include "spat/Frame.h"
38 struct TrackJointLimits{
52 TrackJointLimits() noexcept
68 Force normalForceLimitMin,
69 Force normalForceLimitMax,
70 Force binormalForceLimitMin,
71 Force binormalForceLimitMax,
75 Angle thresholdTangent,
76 Angle thresholdNormal,
77 Angle thresholdBinormal,
94 inline bool IsInsideLimits(
const spat::Frame<Length,One>& frame,
const spat::Frame<Length,One>& anchor )
const noexcept{
95 const One eT = std::abs(std::asin((anchor.T % frame.T).Length()));
96 const One eN = std::abs(std::asin((anchor.N % frame.N).Length()));
97 const One eB = std::abs(std::asin((anchor.B % frame.B).Length()));
constexpr Real infinite
Positive infinity value.
Definition DimensionedValues.h:349
constexpr Real _rad(Angle a) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1202
constexpr Real _1(One one) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1186
Value< Dimension< 0, 0, 0 > > One
Dimensionless value.
Definition DimensionedValues.h:319
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
constexpr Angle pi
Circle number pi.
Definition DimensionedValues.h:1145
Value< Dimension< 1, 1, -2 > > Force
Force.
Definition DimensionedValues.h:333
Value< Dimension< 2, 1, -2 > > Torque
Torque.
Definition DimensionedValues.h:337
Value< Dimension< 0, 0, 0 > > Angle
Angle in radians.
Definition DimensionedValues.h:320
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
constexpr Length default_derailing_distance
A default value for the acceptable distance between a track position and something beeing still consi...
Definition Units.h:128
bool bTiltingEnabled
Tilting on track enabled.
Definition TrackJointLimits.h:50
Force BinormalForceLimitMin
The maximum force (typically < 0) to prevent movement of the Wheelframe in binormal direction.
Definition TrackJointLimits.h:41
Length ThresholdPosition
The maximum deviation of the WheelFrame's position from its supposed position on the track.
Definition TrackJointLimits.h:45
Torque NormalTorqueLimit
The maximum torque to prevent rotation around the normal direction N.
Definition TrackJointLimits.h:43
Force BinormalForceLimitMax
The maximum force to prevent movement of the Wheelframe in negative binormal direction.
Definition TrackJointLimits.h:42
Angle ThresholdNormal
The maximum angle deviation of the WheelFrame's normal vector from its supposed direction on the trac...
Definition TrackJointLimits.h:47
Force NormalForceLimitMin
The maximum force (typically < 0) to prevent movement of the Wheelframe in normal direction.
Definition TrackJointLimits.h:39
Angle ThresholdTangent
The maximum angle deviation of the WheelFrame's tangent vector from its supposed direction on the tra...
Definition TrackJointLimits.h:46
One ErrorReduction
The error reduction parameter for the track joint.
Definition TrackJointLimits.h:49
Angle ThresholdBinormal
The maximum angle deviation of the WheelFrame's binormal vector from its supposed direction on the tr...
Definition TrackJointLimits.h:48
Force NormalForceLimitMax
The maximum force to prevent movement of the Wheelframe in negative normal direction.
Definition TrackJointLimits.h:40
Torque TorqueLimit
The maximum torque to prevent violating rotations around T and B.
Definition TrackJointLimits.h:44