WSF
P6DofIntegrator.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 P6DOFINTEGRATOR_H
13#define P6DOFINTEGRATOR_H
14
15#include "p6dof_export.h"
16
17#include <cstdint>
18
19#include "UtVec3dX.hpp"
20
24class P6DofVehicle;
25
26// P6DofIntegrator integrates the state of P6DofObjects.
27class P6DOF_EXPORT P6DofIntegrator
28{
29public:
30 P6DofIntegrator() = default;
31 ~P6DofIntegrator() = default;
32 P6DofIntegrator& operator=(const P6DofIntegrator& other) = delete;
33
34 P6DofIntegrator* Clone() const;
35
36 static void Update(P6DofVehicle* aObject, int64_t aSimTime_nanosec, double aDeltaT_sec);
37
38protected:
39 P6DofIntegrator(const P6DofIntegrator& other) = default;
40
41 // This is called to calculate forces and moments
42 static void CalculateFM(P6DofVehicle* aObject,
43 P6DofKinematicState& aState,
44 int64_t aSimTime_nanosec,
45 double aDeltaT_sec,
46 P6DofForceAndMomentsObject& aForcesMomentsAtRP,
47 P6DofForceAndMomentsObject& aForcesMomentsAtCM);
48
49 // This is called to update fuel burn
50 static void UpdateFuelBurn(P6DofVehicle* aObject, P6DofKinematicState& aState, int64_t aSimTime_nanosec, double aDeltaT_sec);
51
52 // This is called to propagate translation
53 static void PropagateTranslation(P6DofVehicle* aObject,
54 P6DofKinematicState& aState,
55 const UtVec3dX& aInertialAccel_mps2,
56 double aDeltaT_sec);
57
58 // This is called by PropagateTranslation for a spherical earth model
60 P6DofKinematicState& aState,
61 UtVec3dX aInertialAccel_mps2,
62 double aDeltaT_sec);
63
64 // This is called by PropagateTranslation for a WGS earth model
65 static void PropagateTranslationWGSEarth(P6DofVehicle* aObject,
66 P6DofKinematicState& aState,
67 UtVec3dX aInertialAccel_mps2,
68 double aDeltaT_sec);
69
70 // This is called to propagate rotation
71 static void PropagateRotation(P6DofVehicle* aObject,
72 P6DofKinematicState& aState,
73 UtVec3dX aRotationalAccel_rps2,
74 double aDeltaT_sec);
75
76 // This performs calculations (not updates) to propagate through the specified delta t.
77 // It is used in the Update() function to obtain an intermediate step in the integration
78 // process. It does not perform calculations on all state parameters, rather it is limited
79 // to those parameters that will impact changes in aero, propulsion, and/or gravity F&M.
80 static void PropagateUsingFM(P6DofVehicle* aObject,
81 P6DofKinematicState& aState,
82 const P6DofMassProperties& aMassProperties,
83 double aDeltaT_sec,
84 P6DofForceAndMomentsObject& aForcesMomentsAtRP,
85 P6DofForceAndMomentsObject& aForcesMomentsAtCM);
86
87 // This performs a full integration "update" (not just calculate) including changing state
88 // as well as updating all state parameters, including the additional "secondary" data,
89 // as required.
90 static void UpdateUsingFM(P6DofVehicle* aObject,
91 P6DofKinematicState& aState,
92 const P6DofMassProperties& aMassProperties,
93 int64_t aSimTime_nanosec,
94 double aDeltaT_sec,
95 P6DofForceAndMomentsObject& aForcesMomentsAtRP,
96 P6DofForceAndMomentsObject& aForcesMomentsAtCM);
97};
98
99#endif
aObjectPtr Update(simTime)
Definition P6DofForceAndMomentsObject.hpp:24
P6DofIntegrator & operator=(const P6DofIntegrator &other)=delete
static void PropagateTranslationSphericalEarth(P6DofVehicle *aObject, P6DofKinematicState &aState, UtVec3dX aInertialAccel_mps2, double aDeltaT_sec)
Definition P6DofIntegrator.cpp:427
static void PropagateTranslationWGSEarth(P6DofVehicle *aObject, P6DofKinematicState &aState, UtVec3dX aInertialAccel_mps2, double aDeltaT_sec)
Definition P6DofIntegrator.cpp:561
static void CalculateFM(P6DofVehicle *aObject, P6DofKinematicState &aState, int64_t aSimTime_nanosec, double aDeltaT_sec, P6DofForceAndMomentsObject &aForcesMomentsAtRP, P6DofForceAndMomentsObject &aForcesMomentsAtCM)
Definition P6DofIntegrator.cpp:117
P6DofIntegrator * Clone() const
Definition P6DofIntegrator.cpp:26
~P6DofIntegrator()=default
static void UpdateFuelBurn(P6DofVehicle *aObject, P6DofKinematicState &aState, int64_t aSimTime_nanosec, double aDeltaT_sec)
Definition P6DofIntegrator.cpp:272
static void PropagateRotation(P6DofVehicle *aObject, P6DofKinematicState &aState, UtVec3dX aRotationalAccel_rps2, double aDeltaT_sec)
Definition P6DofIntegrator.cpp:705
P6DofIntegrator(const P6DofIntegrator &other)=default
static void UpdateUsingFM(P6DofVehicle *aObject, P6DofKinematicState &aState, const P6DofMassProperties &aMassProperties, int64_t aSimTime_nanosec, double aDeltaT_sec, P6DofForceAndMomentsObject &aForcesMomentsAtRP, P6DofForceAndMomentsObject &aForcesMomentsAtCM)
Definition P6DofIntegrator.cpp:398
static void PropagateTranslation(P6DofVehicle *aObject, P6DofKinematicState &aState, const UtVec3dX &aInertialAccel_mps2, double aDeltaT_sec)
Definition P6DofIntegrator.cpp:412
P6DofIntegrator()=default
static void PropagateUsingFM(P6DofVehicle *aObject, P6DofKinematicState &aState, const P6DofMassProperties &aMassProperties, double aDeltaT_sec, P6DofForceAndMomentsObject &aForcesMomentsAtRP, P6DofForceAndMomentsObject &aForcesMomentsAtCM)
Definition P6DofIntegrator.cpp:281
Definition P6DofKinematicState.hpp:31
Definition P6DofMassProperties.hpp:26
Definition P6DofVehicle.hpp:53
Copyrights Multiple, All Rights Reserved