WSF
WsfAtmosphericTurbulence.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// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef WSFATMOSPHERICTURBULENCE_HPP
16#define WSFATMOSPHERICTURBULENCE_HPP
17
18#include "wsf_mil_export.h"
19
20#include <map>
21
22#include "UtInput.hpp"
23#include "UtIntegrand.hpp"
24#include "WsfObjectTypeList.hpp"
25class WsfScenario;
26#include "WsfStringId.hpp"
27
28namespace wsf
29{
30
32class CN2 : public WsfObject
33{
34public:
35 using CN2_Ftn = std::function<double(double)>;
36
37 CN2(const CN2_Ftn& aCN2_Ftn)
38 : mCN2_Ftn(aCN2_Ftn)
39 {
40 }
41
42 WsfObject* Clone() const override { return new CN2(*this); }
43
44 double operator()(double aHeight) const { return mCN2_Ftn(aHeight); }
45
46private:
47 CN2_Ftn mCN2_Ftn;
48};
49
50
54class WSF_MIL_EXPORT AtmosphericTurbulence
55{
56public:
57 AtmosphericTurbulence(const WsfScenario& aScenario);
58 virtual ~AtmosphericTurbulence() = default;
59
60 virtual bool ProcessInput(UtInput& aInput);
61
62 const std::string& GetCN2Form();
63 void SetCN2Form(const std::string& aCN2Form);
64
65 const CN2& GetCN2();
66
67 double BeamSpreadAngle(double aSlantRange, double aTargetHeight, double aPlatformHeight, double aWavelength);
68
69protected:
70private:
71 class TurbulentBeamSpreadIntegrand : public UtIntegrand
72 {
73 public:
74 TurbulentBeamSpreadIntegrand(double aSlantRange,
75 double aTargetHeight,
76 double aPlatformHeight,
77 double aWavelength,
78 const wsf::CN2& aCN2form);
79 double Function(double aVal) override;
80
81 private:
82 TurbulentBeamSpreadIntegrand() = delete;
83
84 double mSlantRange;
85 double mTargetHeight;
86 double mPlatformHeight;
87 double mWavelength;
88 wsf::CN2 mCN2form;
89 };
90
91 const WsfScenario& mScenario;
92 const CN2* mCN2_Ptr;
93};
94
96class CN2_Types : public WsfObjectTypeList<CN2>
97{
98public:
99 static WSF_MIL_EXPORT CN2_Types& Get(WsfScenario& aScenario);
100 static WSF_MIL_EXPORT const CN2_Types& Get(const WsfScenario& aScenario);
101
102 CN2_Types(WsfScenario& aScenario);
103
104private:
105 static double hv57(double aHeight);
106};
107
108}; // namespace wsf
109
110#endif
An abstract base class for sensor_plot function.
Definition Function.hpp:29
WsfObjectTypeList(WsfScenario &aScenario, unsigned int aFlags, const std::string &aBlockName)
Definition WsfObjectTypeList.hpp:76
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
const std::string & GetCN2Form()
Definition WsfAtmosphericTurbulence.cpp:96
virtual bool ProcessInput(UtInput &aInput)
Definition WsfAtmosphericTurbulence.cpp:144
AtmosphericTurbulence(const WsfScenario &aScenario)
Definition WsfAtmosphericTurbulence.cpp:67
const CN2 & GetCN2()
Definition WsfAtmosphericTurbulence.cpp:111
double BeamSpreadAngle(double aSlantRange, double aTargetHeight, double aPlatformHeight, double aWavelength)
Definition WsfAtmosphericTurbulence.cpp:127
void SetCN2Form(const std::string &aCN2Form)
Definition WsfAtmosphericTurbulence.cpp:101
virtual ~AtmosphericTurbulence()=default
CN2_Types(WsfScenario &aScenario)
Definition WsfAtmosphericTurbulence.cpp:173
static WSF_MIL_EXPORT CN2_Types & Get(WsfScenario &aScenario)
Return a modifiable reference to the type list associated with the specified scenario.
Definition WsfAtmosphericTurbulence.cpp:160
An encapsulation of a turbulent CN2 model.
Definition WsfAtmosphericTurbulence.hpp:33
WsfObject * Clone() const override
Definition WsfAtmosphericTurbulence.hpp:42
CN2(const CN2_Ftn &aCN2_Ftn)
Definition WsfAtmosphericTurbulence.hpp:37
double operator()(double aHeight) const
Definition WsfAtmosphericTurbulence.hpp:44
std::function< double(double)> CN2_Ftn
Definition WsfAtmosphericTurbulence.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved