WSF
WsfStandardRadarSignature.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 WSFSTANDARDRADARSIGNATURE_HPP
13#define WSFSTANDARDRADARSIGNATURE_HPP
14
15#include "wsf_export.h"
16
17#include <memory>
18#include <vector>
19
20class UtAzElLookup;
21class UtAzElTable;
22#include "UtAzElTypes.hpp"
23#include "WsfRadarSignature.hpp"
24
26
28{
29public:
30 static WsfRadarSignature* ObjectFactory(const std::string& aTypeName);
31
33
34 WsfRadarSignature* Clone() const override;
35
36 bool InitializeType() override;
37
38 std::vector<WsfStringId> GetStateNames() const override;
39
40 bool ProcessInput(UtInput& aInput) override;
41
42 float GetSignature(WsfStringId aStateId,
43 WsfEM_Types::Polarization aPolarization,
44 double aFrequency,
45 double aTgtToXmtrAz,
46 double aTgtToXmtrEl,
47 double aTgtToRcvrAz,
48 double aTgtToRcvrEl,
49 WsfEM_Xmtr* aXmtrPtr = nullptr,
50 WsfEM_Rcvr* aRcvrPtr = nullptr) override;
51
52 std::pair<float, float> GetSignatureLimits(WsfStringId aStateId, WsfEM_Types::Polarization aPolarization) const override;
53
54 // The following nested classes are public to allow some applications to access the raw signature data.
55
57 class Table
58 {
59 public:
60 Table(double aFrequencyLimit, UtAzElTable* aTablePtr, bool aIsACopy);
61
64
66 UtAzElTable* mTablePtr;
67
72 };
73
77 using TableSet = std::vector<Table>;
78 using TableIndex = std::vector<Table>::size_type;
79
91
92 using States = std::vector<State>;
93 using StateIndex = std::vector<State>::size_type;
94
95 const States& GetStates() const;
96
97 bool AddTable(UtAzElTable* aTablePtr, WsfStringId aStateId, WsfEM_Types::Polarization aPolarization, double aFrequencyLimit);
98
99 void SelectTable(UtAzElLookup& aContext, WsfStringId aState, WsfEM_Types::Polarization aPolarization, double aFrequency);
100
101private:
102 class SharedData
103 {
104 using InterpolationType = ut::azel::InterpolationType;
105
106 public:
107 SharedData() = default;
108 ~SharedData();
109
110 bool InitializeType(WsfObject& aBase);
111
112 bool IsA_ValidState(WsfStringId aId) const;
113
114 bool ProcessInput(UtInput& aInput, WsfObject& aBase);
115
116 bool AddTable(UtAzElTable* aTablePtr,
117 WsfStringId aStateId,
118 WsfEM_Types::Polarization aPolarization,
119 double aFrequencyLimit,
120 bool aIsACopy = false);
121
122 const TableSet& SelectTableSet(WsfStringId aStateId, WsfEM_Types::Polarization aPolarization) const;
123
124 void SelectTable(UtAzElLookup& aContext, WsfStringId aState, WsfEM_Types::Polarization aPolarization, double aFrequency);
125
126 void UseDefaultPolarization(State& aState, int aPolarization);
127
128 // The following helper methods are all called by ProcessInput
129 // They were added to simplify ProcessInput
130 void ProcessInputState(UtInput& aInput, WsfObject& aBase);
131
132 void ProcessInputPolarization(UtInput& aInput, WsfObject& aBase);
133
134 void ProcessInputFrequencyLimit(UtInput& aInput, WsfObject& aBase);
135
136 bool ProcessInputTableData(UtInput& aInput, WsfObject& aBase);
137
138 // Input processing aids
139 WsfStringId mCurrentStateId{"default"};
141 double mCurrentFrequencyLimit{1.0E+30};
142
143 StateIndex mDefaultStateIndex{0};
144 States mStates;
145
146 bool mUseBisectorForBistatic{true};
147 bool mMonoStaticSigDefined{true};
148
149 bool mInterpolateTables{true};
150 InterpolationType mInterpolationType{InterpolationType::cLinear};
151 };
152
153 std::shared_ptr<SharedData> mSharedDataPtr{new SharedData()};
154};
155
156#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfEM_Rcvr.hpp:68
Definition WsfEM_Xmtr.hpp:55
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
WsfRadarSignature()
Definition WsfRadarSignature.cpp:30
virtual std::pair< float, float > GetSignatureLimits(WsfStringId aStateId, WsfEM_Types::Polarization aPolarization) const
Definition WsfRadarSignature.cpp:35
virtual float GetSignature(WsfStringId aStateId, WsfEM_Types::Polarization aPolarization, double aFrequency, double aTgtToXmtrAz, double aTgtToXmtrEl, double aTgtToRcvrAz, double aTgtToRcvrEl, WsfEM_Xmtr *aXmtrPtr=nullptr, WsfEM_Rcvr *aRcvrPtr=nullptr)=0
WsfRadarSignature * Clone() const override=0
bool ProcessInput(UtInput &aInput) override
Definition WsfSignature.cpp:74
virtual bool InitializeType()
Definition WsfSignature.cpp:40
virtual std::vector< WsfStringId > GetStateNames() const
get the list of all valid states belonging to the signature
Definition WsfSignature.hpp:43
virtual bool IsA_ValidState(WsfStringId aId) const
Definition WsfSignature.cpp:62
A 'State' represents all of the tables for a given signature state.
Definition WsfStandardRadarSignature.hpp:82
TableSet mPolarization[WsfEM_Types::cPOL_COUNT]
There is one set of tables for each polarization.
Definition WsfStandardRadarSignature.hpp:89
WsfStringId mStateId
Definition WsfStandardRadarSignature.hpp:86
State(WsfStringId aStateId)
Definition WsfStandardRadarSignature.cpp:627
double mFrequencyLimit
The upper frequency to which this table applies.
Definition WsfStandardRadarSignature.hpp:63
bool mIsACopy
Definition WsfStandardRadarSignature.hpp:71
UtAzElTable * mTablePtr
A pointer to the actual table data for this table.
Definition WsfStandardRadarSignature.hpp:66
Table(double aFrequencyLimit, UtAzElTable *aTablePtr, bool aIsACopy)
Definition WsfStandardRadarSignature.cpp:620
std::vector< Table > TableSet
Definition WsfStandardRadarSignature.hpp:77
WsfStandardRadarSignature()=default
bool AddTable(UtAzElTable *aTablePtr, WsfStringId aStateId, WsfEM_Types::Polarization aPolarization, double aFrequencyLimit)
Definition WsfStandardRadarSignature.cpp:183
static WsfRadarSignature * ObjectFactory(const std::string &aTypeName)
Factory method called by WsfRadarSignatureTypes.
Definition WsfStandardRadarSignature.cpp:33
bool ProcessInput(UtInput &aInput) override
Definition WsfStandardRadarSignature.cpp:52
bool InitializeType() override
Definition WsfStandardRadarSignature.cpp:67
void SelectTable(UtAzElLookup &aContext, WsfStringId aState, WsfEM_Types::Polarization aPolarization, double aFrequency)
Definition WsfStandardRadarSignature.cpp:156
std::vector< Table >::size_type TableIndex
Definition WsfStandardRadarSignature.hpp:78
std::vector< State > States
Definition WsfStandardRadarSignature.hpp:92
const States & GetStates() const
Definition WsfStandardRadarSignature.cpp:168
std::vector< State >::size_type StateIndex
Definition WsfStandardRadarSignature.hpp:93
Polarization
Polarization of the electromagnetic wave.
Definition WsfEM_Types.hpp:21
@ cPOL_DEFAULT
Default.
Definition WsfEM_Types.hpp:22
@ cPOL_COUNT
Number of polarizations.
Definition WsfEM_Types.hpp:29
Copyrights Multiple, All Rights Reserved