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