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