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