WSF
WsfSixDOF_SizeFactor.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 WSFSIXDOFSIZEFACTOR_HPP
13#define WSFSIXDOFSIZEFACTOR_HPP
14
15#include "wsf_six_dof_export.h"
16
17namespace wsf
18{
19namespace six_dof
20{
21// The SizeFactor is used to indicate the physical size of the object relative
22// to its 'nominal' size. For most objects, this is always one (1), but some
23// objects, such as parachutes and balloons, can change size and use values
24// other than 1 during their 'lifetime'. Size factor is a relative area to the
25// initial area to support aerodynamic reference areas. Physical radius is also
26// supported via a secondary parameter.
27class WSF_SIX_DOF_EXPORT SizeFactor
28{
29public:
30 SizeFactor() = default;
31
32 void CalculateSizeFactor(double dT_sec);
33
34 void InitializeValues();
35
36 bool IsEnabled() const { return mSizeFactorEnabled; }
37
38 double GetSizeFactorRadius() const;
39
40 void SetSizeFactorEnabled(bool aEnabled);
41 void SetRefSizeFactorRadius_m(double aValue_m);
42 void SetSizeFactorMin(double aValue);
43 void SetSizeFactorMax(double aValue);
44
45 void SetSizeFactorVolumeRate_m3_perSec(double aVolumeRate_m3_perSec);
46 void SetSizeFactorAreaRate_m2_perSec(double aAreaRate_m2_perSec);
47 void SetSizeFactorRadiusRate_m_perSec(double aRadiusRate_m_perSec);
48
49protected:
50 bool mSizeFactorEnabled = false;
54
55 // This is used as the "reference" size (the default is 1m)
59
60 // Max and min size factors (relative to nominal radius)
61 double mSizeFactorMin = 1.0;
62 double mSizeFactorMax = 1.0;
63
64 // Only one of the three 'rates' below may be specified
65 // If more than use is specified, the last one specified will be used
66 double mSizeFactorVolumeRate_m3_perSec = 0.0; // Increase size by volume (good for balloons)
67 double mSizeFactorAreaRate_m2_perSec = 0.0; // Increase size by area (good for parachutes)
68 double mSizeFactorRadiusRate_m_perSec = 0.0; // Increase size by radius (good for parachutes)
69
70 double mSizeFactorVolume = 1.0;
71 double mSizeFactorArea = 1.0;
72 double mSizeFactorRadius = 1.0;
76};
77} // namespace six_dof
78} // namespace wsf
79
80#endif
double mRefSizeFactorRadius_m
Definition WsfSixDOF_SizeFactor.hpp:56
void CalculateSizeFactor(double dT_sec)
Definition WsfSixDOF_SizeFactor.cpp:16
bool mSizeFactorVolumeEnabled
Definition WsfSixDOF_SizeFactor.hpp:51
double mSizeFactorMin
Definition WsfSixDOF_SizeFactor.hpp:61
double mSizeFactorVolume
Definition WsfSixDOF_SizeFactor.hpp:70
bool mSizeFactorRadiusEnabled
Definition WsfSixDOF_SizeFactor.hpp:53
double mSizeFactorAreaRate_m2_perSec
Definition WsfSixDOF_SizeFactor.hpp:67
double mSizeFactorRadiusRate_m_perSec
Definition WsfSixDOF_SizeFactor.hpp:68
double mSizeFactorMax
Definition WsfSixDOF_SizeFactor.hpp:62
bool mSizeFactorEnabled
Definition WsfSixDOF_SizeFactor.hpp:50
void InitializeValues()
Definition WsfSixDOF_SizeFactor.cpp:63
double mCurrentSizeFactorArea_m2
Definition WsfSixDOF_SizeFactor.hpp:74
double mSizeFactorVolumeRate_m3_perSec
Definition WsfSixDOF_SizeFactor.hpp:66
bool mSizeFactorAreaEnabled
Definition WsfSixDOF_SizeFactor.hpp:52
double mRefSizeFactorVolume_m3
Definition WsfSixDOF_SizeFactor.hpp:58
double mSizeFactorArea
Definition WsfSixDOF_SizeFactor.hpp:71
bool IsEnabled() const
Definition WsfSixDOF_SizeFactor.hpp:36
double mSizeFactorRadius
Definition WsfSixDOF_SizeFactor.hpp:72
double mCurrentSizeFactorRadius_m
Definition WsfSixDOF_SizeFactor.hpp:73
double mRefSizeFactorArea_m2
Definition WsfSixDOF_SizeFactor.hpp:57
double mCurrentSizeFactorVolume_m3
Definition WsfSixDOF_SizeFactor.hpp:75
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