WSF
WsfRigidBodySixDOF_Integrator.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 WSFRIGIDBODYSIXDOFINTEGRATOR_HPP
13#define WSFRIGIDBODYSIXDOFINTEGRATOR_HPP
14
16
17namespace wsf
18{
19namespace six_dof
20{
22class RigidBodyMover;
23
24// RigidBodyIntegrator integrates the state of RigidBodySixDOF_Objects.
25class WSF_SIX_DOF_EXPORT RigidBodyIntegrator : public Integrator
26{
27public:
32
34
35 void SetParentVehicle(RigidBodyMover* aVehicle);
36
37 void Update(int64_t aSimTime_nanosec, double aDeltaT_sec) const override;
38
39protected:
41
42 Mover* GetParentVehicle() const override;
43
44 // This is called to calculate forces and moments
45 void CalculateFM(KinematicState& aState,
46 int64_t aSimTime_nanosec,
47 double aDeltaT_sec,
48 ForceAndMomentsObject& aForcesMomentsAtRP,
49 ForceAndMomentsObject& aForcesMomentsAtCM) const;
50
51 // This adds support for the simple yaw damper to the base rotation propagation
52 void PropagateRotation(KinematicState& aState, UtVec3dX aRotationalAccel_rps2, double aDeltaT_sec) const override;
53
54 // This performs calculations (not updates) to propagate through the specified delta t.
55 // It is used in the Update() function to obtain an intermediate step in the integration
56 // process. It does not perform calculations on all state parameters, rather it is limited
57 // to those parameters that will impact changes in aero, propulsion, and/or gravity F&M.
59 const MassProperties& aMassProperties,
60 double aDeltaT_sec,
61 ForceAndMomentsObject aForcesMomentsAtRP,
62 ForceAndMomentsObject aForcesMomentsAtCM) const;
63
64 // This performs a full integration "update" (not just calculate) including changing state
65 // as well as updating all state parameters, including the additional "secondary" data,
66 // as required.
67 void UpdateUsingFM(KinematicState& aState,
68 const MassProperties& aMassProperties,
69 int64_t aSimTime_nanosec,
70 double aDeltaT_sec,
71 const ForceAndMomentsObject& aForcesMomentsAtRP,
72 const ForceAndMomentsObject& aForcesMomentsAtCM) const;
73
74private:
75 RigidBodyMover* mVehicle = nullptr;
76};
77} // namespace six_dof
78} // namespace wsf
79
80
81#endif
aObjectPtr Update(simTime)
Definition WsfSixDOF_ForceAndMomentsObject.hpp:28
Definition WsfSixDOF_KinematicState.hpp:34
Definition WsfSixDOF_MassProperties.hpp:29
This is a base class for detailed air movers. This umbrella can cover RB6 or PM6 models.
Definition WsfSixDOF_Mover.hpp:58
RigidBodyIntegrator & operator=(const RigidBodyIntegrator &other)=delete
void PropagateUsingFM(KinematicState &aState, const MassProperties &aMassProperties, double aDeltaT_sec, ForceAndMomentsObject aForcesMomentsAtRP, ForceAndMomentsObject aForcesMomentsAtCM) const
Definition WsfRigidBodySixDOF_Integrator.cpp:295
void SetParentVehicle(RigidBodyMover *aVehicle)
Definition WsfRigidBodySixDOF_Integrator.cpp:39
RigidBodyIntegrator(RigidBodyMover &)
Definition WsfRigidBodySixDOF_Integrator.cpp:24
RigidBodyIntegrator(const RigidBodyIntegrator &other)=default
RigidBodyIntegrator * Clone() const
Definition WsfRigidBodySixDOF_Integrator.cpp:29
void PropagateRotation(KinematicState &aState, UtVec3dX aRotationalAccel_rps2, double aDeltaT_sec) const override
Definition WsfRigidBodySixDOF_Integrator.cpp:415
void CalculateFM(KinematicState &aState, int64_t aSimTime_nanosec, double aDeltaT_sec, ForceAndMomentsObject &aForcesMomentsAtRP, ForceAndMomentsObject &aForcesMomentsAtCM) const
Definition WsfRigidBodySixDOF_Integrator.cpp:143
void UpdateUsingFM(KinematicState &aState, const MassProperties &aMassProperties, int64_t aSimTime_nanosec, double aDeltaT_sec, const ForceAndMomentsObject &aForcesMomentsAtRP, const ForceAndMomentsObject &aForcesMomentsAtCM) const
Definition WsfRigidBodySixDOF_Integrator.cpp:397
Mover * GetParentVehicle() const override
Definition WsfRigidBodySixDOF_Integrator.cpp:34
Definition WsfRigidBodySixDOF_Mover.hpp:38
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