WSF
WsfSixDOF_ForceAndRotationObject.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 WSFSIXDOFFORCEANDROTATIONOBJECT_HPP
13#define WSFSIXDOFFORCEANDROTATIONOBJECT_HPP
14
15#include "wsf_six_dof_export.h"
16
17#include "UtMath.hpp"
18#include "UtVec2.hpp"
19#include "UtVec3dX.hpp"
20
21namespace wsf
22{
23namespace six_dof
24{
25// The ForceAndRotationObject class provides a means to "build-up" forces
26// and rotation effects for more simplified SixDOF Movers.
27// It should be noted that the class assumes that forces and other data are in
28// body-coordinates.
29class WSF_SIX_DOF_EXPORT ForceAndRotationObject
30{
31public:
33
35
36 // This adds aSrc F&M to the current F&M object, transforming the aSrc F&M
37 // as required for the current reference point
39
40 // This clears the force and moment but leaves the reference point unchanged
42
43 // This points the force in the correct direction for a parent vehicle, based on attitude relative to that parent.
44 void ReorientForce_ft(const UtVec3dX& aAngRelToParentYPR_rad);
45
46 // This adds the specified force.
47 void AddForce(const UtVec3dX& aForceVec_lbs);
48
49 // This returns the magnitude of the force in lbs
50 double GetForceMagnitude_lbs() const;
51
52 // This returns the vector of the force in lbs
53 UtVec3dX GetForce_lbs() const;
54
55 // This limits the magnitude of the force in lbs, reducing it, if needed
56 void LimitMaxForceMagnitude_lbs(double aMaxForce_lbs);
57
58 // This returns the vector of the maximum angular acceleration in radians/second^2
59 void SetMaximumAngularAcceleration_rps2(const UtVec3dX& aOmegaDot_rps2) { mMaximumOmegaDot_rps2 = aOmegaDot_rps2; };
60
61 // This accumulates the vector of the maximum angular acceleration in radians/second^2
62 void AddMaximumAngularAcceleration_rps2(const UtVec3dX& aOmegaDot_rps2) { mMaximumOmegaDot_rps2 += aOmegaDot_rps2; };
63
64 // This returns the vector of the maximum angular acceleration in radians/second^2
66
67 // This returns the vector of the maximum angular acceleration in degrees/second^2
68 UtVec3dX GetMaximumAngularAcceleration_dps2() const { return mMaximumOmegaDot_rps2 * UtMath::cDEG_PER_RAD; };
69
70 // This returns the vector of the maximum angular acceleration in radians/second^2
71 void SetStabilizingFrequency_rps(const UtVec3dX& aOmega_rps) { mStabilizingFrequency_rps = aOmega_rps; };
72
73 // This accumulates the vector of the maximum angular acceleration in radians/second^2
74 void AddStabilizingFrequency_rps(const UtVec3dX& aOmega_rps) { mStabilizingFrequency_rps += aOmega_rps; };
75
76 // This returns the vector of the maximum angular acceleration in radians/second^2
78
79 // This returns a ForceAndRotationObject that is the "average" of
80 // the "this" F&M object and the specified F&M object (argument object)
81 ForceAndRotationObject CalcAverageWith(const ForceAndRotationObject& aOtherFM) const;
82
83protected:
84 UtVec3dX mForceVec_lbs;
87};
88} // namespace six_dof
89} // namespace wsf
90
91#endif
Definition WsfSixDOF_ForceAndRotationObject.hpp:30
void AddForce(const UtVec3dX &aForceVec_lbs)
Definition WsfSixDOF_ForceAndRotationObject.cpp:46
void AddMaximumAngularAcceleration_rps2(const UtVec3dX &aOmegaDot_rps2)
Definition WsfSixDOF_ForceAndRotationObject.hpp:62
UtVec3dX GetMaximumAngularAcceleration_dps2() const
Definition WsfSixDOF_ForceAndRotationObject.hpp:68
void LimitMaxForceMagnitude_lbs(double aMaxForce_lbs)
Definition WsfSixDOF_ForceAndRotationObject.cpp:57
void ReorientForce_ft(const UtVec3dX &aAngRelToParentYPR_rad)
Definition WsfSixDOF_ForceAndRotationObject.cpp:37
UtVec3dX GetMaximumAngularAcceleration_rps2() const
Definition WsfSixDOF_ForceAndRotationObject.hpp:65
ForceAndRotationObject * Clone() const
Definition WsfSixDOF_ForceAndRotationObject.cpp:16
void ClearForcesAndRotation()
Definition WsfSixDOF_ForceAndRotationObject.cpp:30
UtVec3dX mForceVec_lbs
Definition WsfSixDOF_ForceAndRotationObject.hpp:84
UtVec3dX GetForce_lbs() const
Definition WsfSixDOF_ForceAndRotationObject.cpp:69
UtVec3dX mMaximumOmegaDot_rps2
Definition WsfSixDOF_ForceAndRotationObject.hpp:85
void SetMaximumAngularAcceleration_rps2(const UtVec3dX &aOmegaDot_rps2)
Definition WsfSixDOF_ForceAndRotationObject.hpp:59
void AddStabilizingFrequency_rps(const UtVec3dX &aOmega_rps)
Definition WsfSixDOF_ForceAndRotationObject.hpp:74
UtVec3dX mStabilizingFrequency_rps
Definition WsfSixDOF_ForceAndRotationObject.hpp:86
UtVec3dX GetStabilizingFrequency_rps() const
Definition WsfSixDOF_ForceAndRotationObject.hpp:77
double GetForceMagnitude_lbs() const
Definition WsfSixDOF_ForceAndRotationObject.cpp:52
ForceAndRotationObject & operator+=(const ForceAndRotationObject &aSrc)
Definition WsfSixDOF_ForceAndRotationObject.cpp:21
void SetStabilizingFrequency_rps(const UtVec3dX &aOmega_rps)
Definition WsfSixDOF_ForceAndRotationObject.hpp:71
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