WSF
WsfSixDOF_ForceAndMomentsObject.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 WSFSIXDOFFORCEANDMOMENTOBJECT_HPP
13#define WSFSIXDOFFORCEANDMOMENTOBJECT_HPP
14
15#include "wsf_six_dof_export.h"
16
17#include "UtVec3dX.hpp"
18
19namespace wsf
20{
21namespace six_dof
22{
23// The ForceAndMomentsObject class provides a means to "build-up" forces
24// and moments (F&M) provides a collection of state data for SixDOF Movers.
25// It should be noted that the class assumes that forces and moments are in
26// body-coordinates.
27class WSF_SIX_DOF_EXPORT ForceAndMomentsObject
28{
29public:
31
33
34 // This adds aSrc F&M to the current F&M object, transforming the aSrc F&M
35 // as required for the current reference point
37
38 // This clears the force and moment but leaves the reference point unchanged
40
41 // This clears the force, moment, and reference point
43
44 // This moves the reference point to the specified point, and modifies
45 // the current F&M accordingly
46 void MoveRefPoint_ft(const UtVec3dX& aSpecifiedPoint_ft);
47
48 // This moves the reference point to the specified point, and modifies
49 // the current F&M accordingly. This version uses attitude data.
50 void RelocateForce_ft(const UtVec3dX& aSpecifiedPoint_ft, const UtVec3dX& aAngRelToParentYPR_rad);
51
52 // This adds the specified force and moment applied at the specified point.
53 // The function calculates the new F&M at the internal reference point.
54 void AddForceAndMomentAtSpecifiedPoint(const UtVec3dX& aForceVec_lbs,
55 const UtVec3dX& aMomentVec_ftlbs,
56 const UtVec3dX& aSpecifiedPoint_ft);
57
58 // This adds the specified force and moment applied at the reference point.
59 void AddForceAndMomentAtReferencePoint(const UtVec3dX& aForceVec_lbs, const UtVec3dX& aMomentVec_ftlbs);
60
61 // This adds the specified force at the specified point. The function calculates
62 // the new F&M at the internal reference point.
63 void AddForceAtSpecifiedPoint(const UtVec3dX& aForceVec_lbs, const UtVec3dX& aSpecifiedPoint_ft);
64
65 // This adds the specified force at the reference point.
66 void AddForceAtReferencePoint(const UtVec3dX& aForceVec_lbs);
67
68 // This adds the specified moment. The function calculates the new F&M at
69 // the internal reference point.
70 void AddMoment(const UtVec3dX& aMomentVec_ftlbs);
71
72 // This returns (via references) the current force and moment at the specified
73 // point, using the current F&M at the internal reference point.
74 void GetForceAndMomentAtSpecifiedPoint(UtVec3dX& aForceVec_lbs,
75 UtVec3dX& aMomentVec_ftlbs,
76 const UtVec3dX& aSpecifiedPoint_ft) const;
77
78 // This returns (via references) the current force and moment at the current
79 // internal reference point.
80 void GetForceAndMomentAtCurrentRefPoint(UtVec3dX& aForceVec_lbs, UtVec3dX& aMomentVec_ftlbs) const;
81
82 // This returns the magnitude of the force in lbs
83 double GetForceMagnitude_lbs() const;
84
85 // This returns the vector of the force in lbs
86 UtVec3dX GetForceAtRefPoint_lbs() const;
87
88 // This returns the vector of the moment in ft-lbs
89 UtVec3dX GetMomentAtRefPoint_ftlbs() const;
90
91 // This limits the magnitude of the force in lbs, reducing it, if needed
92 void LimitMaxForceMagnitude_lbs(double aMaxForce_lbs);
93
94 // This limits the magnitude of the moment in ft-lbs, reducing it, if needed
95 void LimitMomentMagnitude_ftlbs(double aMaxMoment_ftlbs);
96
97 // This returns a ForceAndMomentsObject that is the "average" of
98 // the "this" F&M object and the specified F&M object (argument object)
100
101 // This returns the vector of the force in lbs
102 UtVec3dX GetReferencePoint_ft() const;
103
104protected:
107 UtVec3dX mRefPoint_ft;
108};
109} // namespace six_dof
110} // namespace wsf
111
112#endif
void ClearForcesAndMoments()
Definition WsfSixDOF_ForceAndMomentsObject.cpp:32
ForceAndMomentsObject CalcAverageWith(const ForceAndMomentsObject &aOtherFM) const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:186
void GetForceAndMomentAtSpecifiedPoint(UtVec3dX &aForceVec_lbs, UtVec3dX &aMomentVec_ftlbs, const UtVec3dX &aSpecifiedPoint_ft) const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:122
ForceAndMomentsObject & operator+=(const ForceAndMomentsObject &aSrc)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:21
double GetForceMagnitude_lbs() const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:147
void RelocateForce_ft(const UtVec3dX &aSpecifiedPoint_ft, const UtVec3dX &aAngRelToParentYPR_rad)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:63
void AddForceAtSpecifiedPoint(const UtVec3dX &aForceVec_lbs, const UtVec3dX &aSpecifiedPoint_ft)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:93
void MoveRefPoint_ft(const UtVec3dX &aSpecifiedPoint_ft)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:45
void LimitMomentMagnitude_ftlbs(double aMaxMoment_ftlbs)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:164
UtVec3dX GetForceAtRefPoint_lbs() const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:176
void AddForceAndMomentAtSpecifiedPoint(const UtVec3dX &aForceVec_lbs, const UtVec3dX &aMomentVec_ftlbs, const UtVec3dX &aSpecifiedPoint_ft)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:78
void AddMoment(const UtVec3dX &aMomentVec_ftlbs)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:117
UtVec3dX mForceVec_lbs
Definition WsfSixDOF_ForceAndMomentsObject.hpp:105
void AddForceAndMomentAtReferencePoint(const UtVec3dX &aForceVec_lbs, const UtVec3dX &aMomentVec_ftlbs)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:86
ForceAndMomentsObject * Clone() const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:16
void AddForceAtReferencePoint(const UtVec3dX &aForceVec_lbs)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:112
void GetForceAndMomentAtCurrentRefPoint(UtVec3dX &aForceVec_lbs, UtVec3dX &aMomentVec_ftlbs) const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:140
void ClearReferenceAndForceAndMoment()
Definition WsfSixDOF_ForceAndMomentsObject.cpp:38
UtVec3dX GetReferencePoint_ft() const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:201
UtVec3dX GetMomentAtRefPoint_ftlbs() const
Definition WsfSixDOF_ForceAndMomentsObject.cpp:181
UtVec3dX mRefPoint_ft
Definition WsfSixDOF_ForceAndMomentsObject.hpp:107
void LimitMaxForceMagnitude_lbs(double aMaxForce_lbs)
Definition WsfSixDOF_ForceAndMomentsObject.cpp:152
UtVec3dX mMomentVec_ftlbs
Definition WsfSixDOF_ForceAndMomentsObject.hpp:106
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