WSF
WsfSixDOF_ForcesObject.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 WSFSIXDOFFORCESOBJECT_HPP
13#define WSFSIXDOFFORCESOBJECT_HPP
14
15#include "wsf_six_dof_export.h"
16
17#include "UtVec3dX.hpp"
18
19namespace wsf
20{
21namespace six_dof
22{
23// The ForcesObject class provides a means to "build-up" forces
24// and moments (F&M) provides a collection of state data for SixDOF_Objects.
25// It should be noted that the class assumes that forces and moments are in
26// body-coordinates.
27class WSF_SIX_DOF_EXPORT ForcesObject
28{
29public:
30 ForcesObject() = default;
31
32 ForcesObject* Clone() const;
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
39 void ClearForces();
40
41 // This moves the reference point to the specified point, and modifies
42 // the current F&M accordingly. This version uses attitude data.
43 void MoveRefPoint_ft(const UtVec3dX& aAngRelToParentYPR_rad);
44
45 // This adds the specified force and moment applied at the specified point.
46 // The function calculates the new F&M at the internal reference point.
47 void AddForce(const UtVec3dX& aForceVec_lbs);
48
49 // This returns (via references) the current force and moment at the specified
50 // point, using the current F&M at the internal reference point.
51 void GetForce(UtVec3dX& aForceVec_lbs) const;
52
53 // This returns the magnitude of the force in lbs
54 double GetForceMagnitude_lbs() const;
55
56 // This returns the vector of the force in lbs
57 UtVec3dX GetForce_lbs() const;
58
59 // This limits the magnitude of the force in lbs, reducing it, if needed
60 void LimitMaxForceMagnitude_lbs(double aMaxForce_lbs);
61
62 // This returns a ForceAndMomentsObject that is the "average" of
63 // the "this" F&M object and the specified F&M object (argument object)
64 ForcesObject CalcAverageWith(const ForcesObject& aOtherFM) const;
65
66protected:
67 UtVec3dX mForceVec_lbs;
68};
69} // namespace six_dof
70} // namespace wsf
71
72#endif
void LimitMaxForceMagnitude_lbs(double aMaxForce_lbs)
Definition WsfSixDOF_ForcesObject.cpp:60
ForcesObject * Clone() const
Definition WsfSixDOF_ForcesObject.cpp:16
ForcesObject & operator+=(const ForcesObject &aSrc)
Definition WsfSixDOF_ForcesObject.cpp:21
UtVec3dX mForceVec_lbs
Definition WsfSixDOF_ForcesObject.hpp:67
ForcesObject CalcAverageWith(const ForcesObject &aOtherFM) const
Definition WsfSixDOF_ForcesObject.cpp:77
void GetForce(UtVec3dX &aForceVec_lbs) const
Definition WsfSixDOF_ForcesObject.cpp:50
double GetForceMagnitude_lbs() const
Definition WsfSixDOF_ForcesObject.cpp:55
void AddForce(const UtVec3dX &aForceVec_lbs)
Definition WsfSixDOF_ForcesObject.cpp:45
void MoveRefPoint_ft(const UtVec3dX &aAngRelToParentYPR_rad)
Definition WsfSixDOF_ForcesObject.cpp:35
void ClearForces()
Definition WsfSixDOF_ForcesObject.cpp:30
UtVec3dX GetForce_lbs() const
Definition WsfSixDOF_ForcesObject.cpp:72
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