WSF
WsfAtmosphericDragTerm.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 WSFATMOSPHERICDRAGTERM_HPP
13#define WSFATMOSPHERICDRAGTERM_HPP
14
16
17class UtCalendar;
18class UtInput;
19#include "wsf_space_export.h"
20
21#include "UtVec3.hpp"
22#include "WsfAtmosphere.hpp"
23
25class WSF_SPACE_EXPORT WsfAtmosphericDragTerm : public WsfOrbitalDynamicsTerm
26{
27public:
30 ~WsfAtmosphericDragTerm() override = default;
31
32 bool ProcessInput(UtInput& aInput) override;
33
34 WsfAtmosphericDragTerm* Clone() const override { return new WsfAtmosphericDragTerm{*this}; }
35
36 const char* GetScriptClassName() const override { return "WsfAtmosphericDragTerm"; }
37
38 UtVec3d ComputeAcceleration(double aMass,
39 const UtCalendar& aTime,
40 const UtVec3d& aPosition,
41 const UtVec3d& aVelocity) const override;
42
43 bool Initialize(const WsfOrbitalDynamics& aDynamics) override;
44
46 double GetDragCoefficient() const { return mDragCoefficient; }
47
49 void SetDragCoefficient(double aDragCoefficient) { mDragCoefficient = aDragCoefficient; }
50
52 double GetCrossSectionalArea() const { return mCrossSectionalArea; }
53
54 // Set the cross sectional area in m^2 used by this term.
55 void SetCrossSectionalArea(double aCrossSectionalArea) { mCrossSectionalArea = aCrossSectionalArea; }
56
58 const std::string& GetAtmosphereModelName() const { return mModelName; }
59
61 void SetAtmosphereModelName(const std::string& aModelName) { mModelName = aModelName; }
62
63 std::string GetTermType() const override { return cTYPE; }
64
65 constexpr static const char* cTYPE{"atmospheric_drag"};
66
67private:
68 double mDragCoefficient{0.0};
69 double mCrossSectionalArea{0.0};
70 std::string mModelName{};
71 const wsf::space::Atmosphere* mAtmospherePtr{nullptr};
72};
73
74#endif // WSFATMOSPHERICDRAGTERM_HPP
const char * GetScriptClassName() const override
Definition WsfAtmosphericDragTerm.hpp:36
static constexpr const char * cTYPE
Definition WsfAtmosphericDragTerm.hpp:65
void SetDragCoefficient(double aDragCoefficient)
Set the drag coefficient used by this term.
Definition WsfAtmosphericDragTerm.hpp:49
const std::string & GetAtmosphereModelName() const
Get the name of the atmosphere model used by this term to compute the density.
Definition WsfAtmosphericDragTerm.hpp:58
double GetDragCoefficient() const
Return the drag coefficient used by this term.
Definition WsfAtmosphericDragTerm.hpp:46
double GetCrossSectionalArea() const
Return the cross sectional area in m^2 used by this term.
Definition WsfAtmosphericDragTerm.hpp:52
std::string GetTermType() const override
Return a string indicating the type of term.
Definition WsfAtmosphericDragTerm.hpp:63
~WsfAtmosphericDragTerm() override=default
WsfAtmosphericDragTerm()=default
WsfAtmosphericDragTerm(const WsfAtmosphericDragTerm &aOther)=default
void SetCrossSectionalArea(double aCrossSectionalArea)
Definition WsfAtmosphericDragTerm.hpp:55
void SetAtmosphereModelName(const std::string &aModelName)
Set the name of the atmosphere model used by this term to compute the density.
Definition WsfAtmosphericDragTerm.hpp:61
WsfAtmosphericDragTerm * Clone() const override
Definition WsfAtmosphericDragTerm.hpp:34
virtual bool ProcessInput(UtInput &aInput)
Definition WsfObject.cpp:140
WsfOrbitalDynamicsTerm()
Definition WsfOrbitalDynamicsTerm.hpp:34
virtual bool Initialize(const WsfOrbitalDynamics &aDynamics)
Definition WsfOrbitalDynamicsTerm.hpp:78
virtual UtVec3d ComputeAcceleration(double aMass, const UtCalendar &aTime, const UtVec3d &aPosition, const UtVec3d &aVelocity) const =0
Definition WsfOrbitalDynamics.hpp:32
Copyrights Multiple, All Rights Reserved