WSF
WsfOpticalEnvironment.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 2018 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 WSFOPTICALBACKGROUND_HPP
13#define WSFOPTICALBACKGROUND_HPP
14
15#include "wsf_mil_export.h"
16
17#include <mutex>
18#include <vector>
19
20#include "UtCalendar.hpp"
21#include "UtLog.hpp"
22class UtInput;
23#include "UtVec3.hpp"
24class WsfPlatform;
25#include "WsfEM_Types.hpp"
26#include "WsfSensor.hpp"
27
29class WSF_MIL_EXPORT WsfOpticalEnvironment
30{
31public:
35
36 using BandList = std::vector<WsfEM_Types::OpticalBand>;
37
38 bool Initialize(double aSimTime, WsfPlatform* aPlatformPtr);
39
40 bool ProcessInput(UtInput& aInput);
41
42 double ComputeBackgroundRadiance(double aSimTime, const BandList& aBands, WsfSensorResult& aResult, double& aSolarNoise);
43
44 double ComputePathRadiance(double aSimTime, const BandList& aBand, WsfSensorResult& aResult);
45
47
48 double ComputeDynamicBackgroundRadiance(const BandList& aBands,
49 const UtVec3d& aViewerLoc,
50 const UtVec3d& aViewerDir,
51 const UtVec3d& aSunLoc,
52 const UtVec3d& aMoonLoc,
53 double& aSolarNoise);
55
56 static double GetBlackbodyRadiance(const BandList& aBands, double aTemperature);
57
58 static double GetSolarRadiantIntensity(const BandList& aBands);
59
61
62 static void GetWavelengthLimits(WsfEM_Types::OpticalBand aBand, double& aLowerWavelength, double& aUpperWavelength);
63
64 static void PrintComputedData();
65
66private:
67 void UpdateSunMoonData(double aSimTime);
68
69 double ReadRadianceValue(UtInput& aInput);
70
71 static void ComputeAndPrintBandData(const char* aName,
72 double aLowerWavelength,
73 double aUpperWavelength,
74 double& aL,
75 double& aPhi,
76 ut::log::MessageStream& aStream);
77
78 WsfPlatform* mPlatformPtr;
79
81 double mBackgroundRadianceAboveHorizon;
82
84 double mBackgroundRadianceBelowHorizon;
85
87 double mLowerTransitionAngle;
88
90 double mUpperTransitionAngle;
91
93 double mPathRadiance;
94
96 bool mUseDynamicModel;
97
100
101 std::recursive_mutex mSunMoonUpdateMutex;
102 double mLastSunMoonUpdateTime;
103 UtCalendar mCurrentTime;
104 UtVec3d mSunLoc;
105 UtVec3d mMoonLoc;
107};
108
109#endif
bool ProcessInput(UtInput &aInput)
Definition WsfOpticalEnvironment.cpp:211
double ComputePathRadiance(double aSimTime, const BandList &aBand, WsfSensorResult &aResult)
Definition WsfOpticalEnvironment.cpp:325
static double GetBlackbodyRadiance(const BandList &aBands, double aTemperature)
Definition WsfOpticalEnvironment.cpp:467
std::vector< WsfEM_Types::OpticalBand > BandList
Definition WsfOpticalEnvironment.hpp:36
static void GetWavelengthLimits(WsfEM_Types::OpticalBand aBand, double &aLowerWavelength, double &aUpperWavelength)
Definition WsfOpticalEnvironment.cpp:512
WsfOpticalEnvironment & operator=(const WsfOpticalEnvironment &)=delete
static double GetSolarRadiantIntensity(const BandList &aBands)
Definition WsfOpticalEnvironment.cpp:485
WsfOpticalEnvironment()
Definition WsfOpticalEnvironment.cpp:168
double ComputeBackgroundRadiance(double aSimTime, const BandList &aBands, WsfSensorResult &aResult, double &aSolarNoise)
Definition WsfOpticalEnvironment.cpp:265
static void PrintComputedData()
Definition WsfOpticalEnvironment.cpp:577
double ComputeDynamicBackgroundRadiance(const BandList &aBands, const UtVec3d &aViewerLoc, const UtVec3d &aViewerDir, const UtVec3d &aSunLoc, const UtVec3d &aMoonLoc, double &aSolarNoise)
Definition WsfOpticalEnvironment.cpp:331
bool Initialize(double aSimTime, WsfPlatform *aPlatformPtr)
Definition WsfOpticalEnvironment.cpp:202
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfSensorResult.hpp:27
OpticalBand
Definition WsfEM_Types.hpp:48
Copyrights Multiple, All Rights Reserved