WSF
WsfRigidBodySixDOF_GroundReactionPoint.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2020 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFRIGIDBODYSIXDOFGROUNDREACTIONPOINT_HPP
13#define WSFRIGIDBODYSIXDOFGROUNDREACTIONPOINT_HPP
14
15#include "wsf_six_dof_export.h"
16
17#include <list>
18
19#include "UtInput.hpp"
20#include "UtVec3dX.hpp"
21#include "WsfSixDOF_Object.hpp"
22
23namespace wsf
24{
25namespace six_dof
26{
27// The RigidBodyGroundReactionPoint simulates a 'contact point' for ground reaction.
28// This contact point may be a landing gear or could be a structural point on
29// the aircraft.
30
31class WSF_SIX_DOF_EXPORT RigidBodyGroundReactionPoint : public Object
32{
33public:
35
39
41
42 bool ProcessInput(UtInput& aInput);
43 bool Initialize();
44
45 // The CalcGroundReactionNormalForceMoment function calculates the force and moment
46 // produced by the normal force of the RigidBodyGroundReactionPoint. It returns true
47 // if the point is in contact with the ground.
48 bool CalcNormalForceMoment(UtVec3dX& aForce_lbs, UtVec3dX& aMoment_ftlbs, bool& aMaxCompressionExceeded, double aDeltaT_sec);
49
50 // The CalcGroundReactionMaxFrictionForceMagnitude_lbs function calculates the
51 // maximum friction force possible, in the specified friction direction,
52 // using the most recently calculated normal force, and using the static coefficient
53 // of friction. It returns max force in lbs.
54 double CalcMaxFrictionForceMagnitude_lbs(const UtVec3dX& aDesiredForceBasedFrictionDirectionInSurfaceVecNED);
55
56 // The CalcGroundReactionFrictionForceMomentWhileInMotion function calculates the
57 // force and moment produced by the friction force of the RigidBodyGroundReactionPoint
58 // when the vehicle is is motion.
59 void CalcFrictionForceMomentWhileInMotion(UtVec3dX& aForce_lbs, UtVec3dX& aMoment_ftlbs);
60
61 // The CalcGroundReactionFrictionForceMomentStartingToMove function calculates the
62 // force and moment produced by the friction force of the RigidBodyGroundReactionPoint
63 // when the vehicle is just starting to move. Since the vehicle was at rest, the
64 // friction direction is force-based rather than velocity-based.
65 void CalcFrictionForceMomentStartingToMove(UtVec3dX& aForce_lbs,
66 UtVec3dX& aMoment_ftlbs,
67 const UtVec3dX& aFrictionDirectionInSurfaceNED);
68
69 // The CalcGroundReactionForceMoment function calculates the force and moment produced
70 // by the RigidBodyGroundReactionPoint. The friction multiplier (optional) can be used to
71 // limit friction to less than its maximum value. It returns true if the point is in
72 // contact with the ground.
73 bool CalcGroundReactionForceMoment(UtVec3dX& aForce_lbs,
74 UtVec3dX& aMoment_ftlbs,
75 bool& aMaxCompressionExceeded,
76 double aDeltaT_sec,
77 const UtVec3dX& aAdditiveVelocityNED_fps);
78
79 // This returns the braking handle
80 size_t GetBrakingControlHandle() const;
81
82 // This sets the normalized value (0 = off, 1 = full application of brake) of the brake
83 void SetBraking(double aNormalizedValue);
84
85 // This returns the normalized value of the brake
86 double GetBraking() const;
87
88 // This returns the steering handle
89 size_t GetSteeringControlHandle() const;
90
91 // This sets the steering angle (positive to the right)
92 void SetSteeringAngle_deg(double aSteeringAngle_deg);
93
94 // This returns the steering angle (positive to the right)
95 double GetSteeringAngle_deg() const;
96
97 // This returns true if the reaction point is a landing gear (as opposed to
98 // being a generic contact point)
99 bool IsLandingGear() { return mIsLandingGear; }
100
101 // This returns a group of data that is useful for debugging
102 void GetSteeringData(double& aCurrentSteeringAngle_deg, double& aMaxSteeringAngle_deg) const;
103
104 // This returns a group of data that is useful for debugging
105 void GetData(UtVec3dX& aGearPos_m,
106 UtVec3dX& aGearCompressionVec,
107 UtVec3dX& aCurrentGearRollingVec,
108 UtVec3dX& aCurrentForce_lbs,
109 UtVec3dX& aCurrentMoment_ftlbs,
110 UtVec3dX& aCurrentNormalForce_lbs,
111 UtVec3dX& aCurrentFrictionForce_lbs,
112 double& aUncompressedLength_ft,
113 double& aMaximumCompression_ft,
114 double& aCurrentCompression_ft,
115 double& aNormalizedBrakingValue,
116 double& aSteeringAngle_deg,
117 double& aHeightAboveTerrain_ft,
118 bool& aIsLandingGear,
119 bool& aInContactWithGround,
120 bool& aMaxCompressionExceeded);
121
122 // This returns a group of data that is useful for debugging
123 void GetCompressionData(double& aUncompressedLength_ft,
124 double& aMaximumCompression_ft,
125 double& aCurrentCompression_ft,
126 double& aNormalizedBrakingValue,
127 double& aSteeringAngle_deg,
128 bool& aInContactWithGround,
129 bool& aMaxCompressionExceeded);
130
131 bool NotMoving() const;
132
133protected:
135
136 // This is used by CalcGroundReactionForceMoment
137 bool SetDataWhenNotInContactWithGround(UtVec3dX& aForce_lbs, UtVec3dX& aMoment_ftlbs, bool& aMaxCompressionExceeded);
138 // This is used by CalcGroundReactionForceMoment
139 bool SetDataWhenTinyDeltaT(UtVec3dX& aForce_lbs, UtVec3dX& aMoment_ftlbs, bool& aMaxCompressionExceeded);
140
141 // This is used by CalcGroundReactionForceMomentWithoutFriction
142 bool ReturnWhenNotInContactWithGround(UtVec3dX& aForce_lbs, UtVec3dX& aMoment_ftlbs, bool& aMaxCompressionExceeded);
143 // This is used by CalcGroundReactionForceMomentWithoutFriction
144 bool ReturnWhenTinyDeltaT(UtVec3dX& aForce_lbs, UtVec3dX& aMoment_ftlbs, bool& aMaxCompressionExceeded);
145
146 // The CalcFrictionForceMoment function calculates the force and moment
147 // produced by the friction force of the RigidBodyGroundReactionPoint. It is
148 // used by the CalcFrictionForceMomentWhileInMotion and the
149 // CalcFrictionForceMomentStartingToMove functions.
150 void CalcFrictionForceMoment(UtVec3dX& aForce_lbs,
151 UtVec3dX& aMoment_ftlbs,
152 const UtVec3dX& aFrictionDirectionInSurfaceNED,
153 bool aUseForceBasedFriction);
154
161 bool mNoseGear = false;
162 bool mNWS_Engaged = false;
164
165 std::string mBrakeControlName;
167
168 // Relative positioning
169 UtVec3dX mGearPos_m;
172
173 // Characteristics
181 bool mUseFriction = true;
182 bool mIsLandingGear = false;
183
184 // Control values
186 double mSteeringAngle_deg = 0.0;
187
188 // Current conditions
191 UtVec3dX mCurrentNormalForceBody_lbs; // Body coords
192 UtVec3dX mCurrentFrictionForceBody_lbs; // Body coords
194 UtVec3dX mCurrentMoment_ftlbs; // Formerly mAxleDirectionVector
198 double mHeightAboveTerrain_ft = 1000000.0;
201 bool mIsValid = false; // Flag is false when gear are not down and locked
202 bool mNotMoving = false;
203
204 // Last conditions
210
211 // Rolling coefficient varies with surface. Based on "Performance of Light
212 // Aircraft" by John T. Lowry, typical values are as follows:
213 // Dry smooth concrete ....... 0.02
214 // Broken dry asphalt ........ 0.03
215 // Hard dirt ................. 0.04
216 // Short grass ............... 0.05
217 // Wet concrete/asphalt ...... 0.05
218 // Tall grass ................ 0.1
219 // Soft field ................ 0.2
220 //
221 // According to NACA Report 583 "The Rolling Friction of Several Airplane Wheels and Tires
222 // and the Effect of Rolling Friction on Takeoff" (Wetmore, 1937), the rolling friction
223 // can be as low as 0.01.
224 //
225 // According to NASA Technical Report R-20 "Tire-to-Surface Friction-Coefficient
226 // Measurements with a C-123B Airplane on Various Runway Surfaces" (Sawyer and Kolnick,
227 // 1959), a braking friction coefficient of 0.8 is typical on dry runways.
228 //
229 // Braking coefficient typically varies with speed. Most aircraft encounter a decreasing
230 // braking coefficient with speed. See: "Wet Runway Friction: Literature and Information
231 // Review" prepared for Transportation Development Centre on behalf of Aerodrome Safety
232 // Branch Transport Canada, August 2001, Prepared by: G. Comfort. This report indicates
233 // that an F-4D (with a dry runway surface) would encounter a coefficient from ~0.5 at
234 // zero speed to only ~0.2 at 130 kts. Since the curve was nearly linear, it implies that
235 // braking would be essentially non-existent above 220 kts. A Convair 990, however,
236 // varied between 0.5 and 0.4 over the same speed range, so larger aircraft may not be
237 // as susceptible to speed effects on friction coefficient.
238 //
239 // A general rule of thumb is that the static coefficient of friction is roughly
240 // 1.5x the dynamic coefficient of friction.
241};
242} // namespace six_dof
243} // namespace wsf
244
245#endif
UtVec3dX mLastNetGearVelInSurfaceNED_fps
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:207
size_t mSteeringControlSurfaceHandle
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:159
std::string mSteeringControlSurfaceName
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:156
double mSteeringAngle_deg
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:186
bool mNoseGear
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:161
UtVec3dX mCurrentNormalForceBody_lbs
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:191
friend class RigidBodyLandingGear
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:34
size_t GetSteeringControlHandle() const
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:269
double GetSteeringAngle_deg() const
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:284
double mLastNormalForceMagnitude_lbs
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:209
UtVec3dX mGearRollingVec
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:171
double GetBraking() const
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:264
RigidBodyGroundReactionPoint(const RigidBodyGroundReactionPoint &aSrc)=default
UtVec3dX mCurrentExternalForce_lbs
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:195
bool mLastNetGearVelInSurfaceNEDValid
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:208
UtVec3dX mCurrentForce_lbs
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:193
double mDamperConstant_lbs_per_fps
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:175
bool mNWS_Engaged
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:162
bool mUseFriction
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:181
double mLastCompression_ft
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:205
double mScuffingFrictionCoefficient
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:180
std::string mNWSAngleControlSurfaceName
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:157
bool ReturnWhenNotInContactWithGround(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, bool &aMaxCompressionExceeded)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:1153
UtVec3dX mGearPos_m
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:169
UtVec3dX mCurrentFrictionForceBody_lbs
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:192
std::string mBrakeControlName
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:165
double mNormalizedBrakingValue
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:185
UtVec3dX mCurrentGearVel_NED_mps
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:189
bool Initialize()
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:225
double mLastCompressionRate_fps
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:206
bool mInContactWithGround
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:199
UtVec3dX mCurrentGearRollingVecNED
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:190
bool IsLandingGear()
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:99
void SetBraking(double aNormalizedValue)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:259
bool ProcessInput(UtInput &aInput)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:27
size_t mNWSAngleControlSurfaceHandle
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:160
UtVec3dX mGearCompressionVec
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:170
UtVec3dX mCurrentMoment_ftlbs
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:194
double mSpringConstant_lbs_per_ft
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:174
std::string mControlSurfaceName
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:155
double mHeightAboveTerrain_ft
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:198
bool ReturnWhenTinyDeltaT(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, bool &aMaxCompressionExceeded)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:1165
bool mNotMoving
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:202
double CalcMaxFrictionForceMagnitude_lbs(const UtVec3dX &aDesiredForceBasedFrictionDirectionInSurfaceVecNED)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:443
bool mIsValid
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:201
double mMaximumCompression_ft
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:177
bool mMaxCompressionExceeded
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:200
size_t mControlSurfaceHandle
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:158
double mCurrentCompressionRate_fps
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:197
double mBrakingFrictionCoefficient
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:179
double mUncompressedLength_ft
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:176
bool CalcNormalForceMoment(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, bool &aMaxCompressionExceeded, double aDeltaT_sec)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:289
bool CalcGroundReactionForceMoment(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, bool &aMaxCompressionExceeded, double aDeltaT_sec, const UtVec3dX &aAdditiveVelocityNED_fps)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:683
void CalcFrictionForceMomentStartingToMove(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, const UtVec3dX &aFrictionDirectionInSurfaceNED)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:546
bool mIsLandingGear
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:182
bool mExternalForceBeingApplied
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:163
bool SetDataWhenTinyDeltaT(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, bool &aMaxCompressionExceeded)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:1137
bool SetDataWhenNotInContactWithGround(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, bool &aMaxCompressionExceeded)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:1107
void CalcFrictionForceMoment(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs, const UtVec3dX &aFrictionDirectionInSurfaceNED, bool aUseForceBasedFriction)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:553
RigidBodyGroundReactionPoint & operator=(const RigidBodyGroundReactionPoint &other)=delete
void CalcFrictionForceMomentWhileInMotion(UtVec3dX &aForce_lbs, UtVec3dX &aMoment_ftlbs)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:539
size_t GetBrakingControlHandle() const
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:254
RigidBodyGroundReactionPoint * Clone() const
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:22
double mRollingFrictionCoefficient
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:178
size_t mBrakeControlHandle
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:166
double mCurrentCompression_ft
Definition WsfRigidBodySixDOF_GroundReactionPoint.hpp:196
void SetSteeringAngle_deg(double aSteeringAngle_deg)
Definition WsfRigidBodySixDOF_GroundReactionPoint.cpp:279
Definition WsfSA_Processor.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved