WSF
WsfEnvironment.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 WSFENVIRONMENT_HPP
13#define WSFENVIRONMENT_HPP
14
15#include "wsf_export.h"
16
17#include <functional>
18
19#include "TblLookup.hpp"
20namespace ut
21{
22class CentralBodyEllipsoid;
23}
24#include "UtCentralPoint.hpp"
25#include "UtCloneablePtr.hpp"
26#include "UtInput.hpp"
28class WsfScenario;
29
35
37{
38public:
59
63 {
64 cINVALID = 0, // Land Formation Enumeration Starts at 1.
65 cLEVEL = 1,
72 cSTEEP = 8,
75 };
76
90
93 {
94 public:
96
97 TblIndVarU<double> mAltitude;
98 TblDepVar1<double> mWindDirection;
99 TblDepVar1<double> mWindSpeed;
100 TblLookupLU<double> mAltLookup;
101 };
102
103
104 WsfEnvironment(WsfScenario& aScenario);
108
109 bool ProcessInput(UtInput& aInput);
110
112 LandCover GetLandCover() const { return mLandCover; }
113
114 LandFormation GetLandFormation() const { return mLandFormation; }
115
116 LandCover GetLandCover(double aLat, double aLon) const;
117
118 LandFormation GetLandFormation(double aLat, double aLon) const;
119
120 typedef std::function<LandCover(double, double)> GetLandCoverFunction;
121 void SetLandCoverStrategy(const GetLandCoverFunction& aFunction);
122
123 SeaState GetSeaState() const { return mSeaState; }
124
125 double GetWindSpeed() const { return mWindSpeed; }
126
127 void SetWindSpeed(double aSpeed) { mWindSpeed = aSpeed; }
128
129 double GetWindDirection() const { return mWindDirection; }
130
131 void SetWindDirection(double aDirection) { mWindDirection = aDirection; }
132
133 void GetWind(double aLat, double aLon, double aAlt, double& aWindHeading, double& aWindSpeed);
134
138 void GetCloudLevel(double& aLowerAlt, double& aUpperAlt) const
139 {
140 aLowerAlt = mCloudLowerAlt;
141 aUpperAlt = mCloudUpperAlt;
142 }
143
144 bool LOS_ClearOfClouds(const double aEmissionPointWCS[3], const double aTargetPointWCS[3]) const;
145
146 bool LOS_AdjustedClearOfClouds(const double aEmissionPointWCS[3], double aTargetPointWCS[3]) const;
147
150 double GetCloudWaterDensity() const { return mCloudWaterDensity; }
151
154 double GetRainUpperLevel() const { return mRainUpperAlt; }
155
158 double GetRainRate() const { return mRainRate; }
159
160 double GetDustStormVisibility() const { return mDustStormVisibility; }
161
162 void CreateWindAltitudeTable();
163
164 WindAltitudeTable* GetWindAltitudeTablePtr() { return mWindAltitudeTablePtr; }
165
166 WsfNoiseCloudTypes& GetNoiseCloudTypes() const { return *mNoiseCloudTypes; }
167
168 bool UsingPolarOffsetAngles() const;
169
170 const ut::CentralPoint& GetCentralPoint() const { return *mCentralPointPtr; }
171
172 const ut::CentralBody& GetCentralBody() const { return mCentralPointPtr->GetAsCentralBody(); }
173
174 const ut::CentralBodyEllipsoid& GetEllipsoid() const;
175
176 void GetPolarOffsetAngles(double& aPolarOffsetAngleX, double& aPolarOffsetAngleY) const;
177
178private:
179 ut::CentralBody& GetCentralBodyP() { return mCentralPointPtr->GetAsCentralBody(); }
180
181 LandCover mLandCover;
182 LandFormation mLandFormation;
183 SeaState mSeaState;
184 double mWindSpeed;
185 double mWindDirection;
186
187 double mCloudLowerAlt;
188 double mCloudUpperAlt;
189 double mCloudWaterDensity;
190 double mRainRate;
191 double mRainUpperAlt;
192 double mDustStormVisibility;
193 double mPolarOffsetAngleX;
194 double mPolarOffsetAngleY;
195
196 WindAltitudeTable* mWindAltitudeTablePtr;
197 GetLandCoverFunction mGetLandCoverFunction;
198
199 WsfNoiseCloudTypes* mNoiseCloudTypes;
200 ut::CloneablePtr<ut::CentralPoint> mCentralPointPtr;
201};
202
203#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
A table to get wind direction and speed as a function of altitude above MSL.
Definition WsfEnvironment.hpp:93
TblLookupLU< double > mAltLookup
Definition WsfEnvironment.hpp:100
TblIndVarU< double > mAltitude
Definition WsfEnvironment.hpp:97
WindAltitudeTable()
Constructor for the WindAltitudeTable.
Definition WsfEnvironment.cpp:434
TblDepVar1< double > mWindSpeed
Definition WsfEnvironment.hpp:99
TblDepVar1< double > mWindDirection
Definition WsfEnvironment.hpp:98
void SetWindSpeed(double aSpeed)
Definition WsfEnvironment.hpp:127
double GetCloudWaterDensity() const
Definition WsfEnvironment.hpp:150
const ut::CentralBody & GetCentralBody() const
Definition WsfEnvironment.hpp:172
LandCover
Definition WsfEnvironment.hpp:42
@ cFOREST_MIXED
Definition WsfEnvironment.hpp:50
@ cFOREST_BLOCKCUT
Definition WsfEnvironment.hpp:52
@ cURBAN
Definition WsfEnvironment.hpp:44
@ cWETLAND_FORESTED
Definition WsfEnvironment.hpp:53
@ cFOREST_DECIDUOUS
Definition WsfEnvironment.hpp:48
@ cRANGELAND_SHRUB
Definition WsfEnvironment.hpp:47
@ cBARREN
Definition WsfEnvironment.hpp:55
@ cNUM_LAND_COVERS
Definition WsfEnvironment.hpp:57
@ cRANGELAND_HERBACEOUS
Definition WsfEnvironment.hpp:46
@ cGENERAL
Definition WsfEnvironment.hpp:43
@ cFOREST_CONIFEROUS
Definition WsfEnvironment.hpp:49
@ cWATER
Definition WsfEnvironment.hpp:56
@ cFOREST_CLEARCUT
Definition WsfEnvironment.hpp:51
@ cAGRICULTURAL
Definition WsfEnvironment.hpp:45
@ cWETLAND_NONFORESTED
Definition WsfEnvironment.hpp:54
WsfEnvironment(WsfScenario &aScenario)
Definition WsfEnvironment.cpp:25
SeaState
Definition WsfEnvironment.hpp:80
@ cVERY_ROUGH
Definition WsfEnvironment.hpp:87
@ cCALM_RIPPLED
Definition WsfEnvironment.hpp:82
@ cSLIGHT
Definition WsfEnvironment.hpp:84
@ cMODERATE
Definition WsfEnvironment.hpp:85
@ cNUM_SEA_STATES
Definition WsfEnvironment.hpp:88
@ cSMOOTH
Definition WsfEnvironment.hpp:83
@ cROUGH
Definition WsfEnvironment.hpp:86
@ cCALM_GLASSY
Definition WsfEnvironment.hpp:81
WsfEnvironment & operator=(const WsfEnvironment &)=delete
void GetCloudLevel(double &aLowerAlt, double &aUpperAlt) const
Definition WsfEnvironment.hpp:138
double GetWindSpeed() const
Definition WsfEnvironment.hpp:125
LandFormation GetLandFormation() const
Definition WsfEnvironment.hpp:114
void SetWindDirection(double aDirection)
Definition WsfEnvironment.hpp:131
const ut::CentralPoint & GetCentralPoint() const
Definition WsfEnvironment.hpp:170
double GetRainUpperLevel() const
Definition WsfEnvironment.hpp:154
LandFormation
Definition WsfEnvironment.hpp:63
@ cMODERATELY_STEEP
Definition WsfEnvironment.hpp:71
@ cROLLING
Definition WsfEnvironment.hpp:68
@ cLEVEL
Definition WsfEnvironment.hpp:65
@ cHUMMOCKY
Definition WsfEnvironment.hpp:69
@ cNUM_LAND_FORMS
Definition WsfEnvironment.hpp:74
@ cSTEEP
Definition WsfEnvironment.hpp:72
@ cUNDULATING
Definition WsfEnvironment.hpp:67
@ cRIDGED
Definition WsfEnvironment.hpp:70
@ cINVALID
Definition WsfEnvironment.hpp:64
@ cBROKEN
Definition WsfEnvironment.hpp:73
@ cINCLINED
Definition WsfEnvironment.hpp:66
WsfEnvironment(const WsfEnvironment &)=delete
SeaState GetSeaState() const
Definition WsfEnvironment.hpp:123
double GetWindDirection() const
Definition WsfEnvironment.hpp:129
void SetLandCoverStrategy(const GetLandCoverFunction &aFunction)
Definition WsfEnvironment.cpp:552
std::function< LandCover(double, double)> GetLandCoverFunction
Definition WsfEnvironment.hpp:120
double GetDustStormVisibility() const
Definition WsfEnvironment.hpp:160
bool ProcessInput(UtInput &aInput)
Definition WsfEnvironment.cpp:81
double GetRainRate() const
Definition WsfEnvironment.hpp:158
WindAltitudeTable * GetWindAltitudeTablePtr()
Definition WsfEnvironment.hpp:164
LandCover GetLandCover() const
Global Land Cover / Land Form methods.
Definition WsfEnvironment.hpp:112
WsfNoiseCloudTypes & GetNoiseCloudTypes() const
Definition WsfEnvironment.hpp:166
Definition WsfNoiseCloud.hpp:76
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfSensorErrorModel.hpp:21
Copyrights Multiple, All Rights Reserved