WSF
WsfBistaticSig.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 WSFBISTATICSIG_HPP
13#define WSFBISTATICSIG_HPP
14
15#include "wsf_mil_export.h"
16
17#include <map>
18#include <string>
19#include <vector>
20
21#include "TblLookup.hpp"
22#include "UtAzElTable.hpp"
23#include "UtAzElTypes.hpp"
24#include "UtMath.hpp"
25#include "WsfEM_Types.hpp"
26#include "WsfObject.hpp"
27
29
30class WSF_MIL_EXPORT WsfBistaticSig : public WsfObject
31{
32public:
34 {
35 public:
36 AzElAzElTable() = default;
37 virtual ~AzElAzElTable() = default;
38
39 void CreateConstantTable(float aValue);
40
41 bool Validate(size_t aTgtToRcvrAzCount, size_t aTgtToRcvrElCount);
42
43 TblIndVarU<double> mTgtToXmtrAz;
44 TblIndVarU<double> mTgtToXmtrEl;
45 TblDepVar2<UtAzElTable*> mAzElTables;
46
47 TblLookupU<double> mTgtToXmtrAzU;
48 TblLookupU<double> mTgtToXmtrElU;
49
50 TblLookupLU<double> mTgtToXmtrAzLU;
51 TblLookupLU<double> mTgtToXmtrElLU;
52 };
53
54 // PLT signature table format
55 // Polarization -> Frequency -> AzEl Table
56 using PolFreqTableMapType = std::map<std::string, std::map<double, AzElAzElTable*>>;
57
58 WsfBistaticSig() = default;
59
60 ~WsfBistaticSig() override;
61
62 WsfBistaticSig* Clone() const override;
63
64 virtual bool Initialize();
65
66 bool ProcessInput(UtInput& aInput) override;
67
68 bool AddTable(AzElAzElTable* aTablePtr,
69 WsfStringId aState,
70 WsfEM_Types::Polarization aPolarization,
71 double aFrequency,
72 bool aIsACopy = false);
73
74 bool AddTable(UtAzElTable* aTablePtr,
75 WsfStringId aState,
76 WsfEM_Types::Polarization aPolarization,
77 double aFrequency,
78 double aTgtToXmtrAz,
79 double aTgtToXmtrEl,
80 bool aIsACopy = false);
81
82 float GetSignature(UtAzElLookup& aContext,
83 WsfStringId aStateId,
84 WsfEM_Types::Polarization aPolarization,
85 double aFrequency,
86 double aTgtToXmtrAz,
87 double aTgtToXmtrEl,
88 double aTgtToRcvrAz,
89 double aTgtToRcvrEl);
90
91 void SelectTable(AzElAzElTable& aContext, WsfStringId aState, WsfEM_Types::Polarization aPolarization, double aFrequency);
92
94
96
97 // The following nested classes were 'private', but the Sun Workshop
98 // compilers would not compile this file if they weren't 'public'.
99
101 class Table
102 {
103 public:
104 Table(double aFrequencyLimit, AzElAzElTable* aTablePtr, bool aIsACopy);
105
108
111
116 };
117
121 using TableSet = std::vector<Table>;
122
123 using TableIndex = std::vector<Table>::size_type;
124
126 class State
127 {
128 public:
129 State(WsfStringId aStateId);
130
132
135 };
136
137 using States = std::vector<State>;
138 using StateIndex = std::vector<State>::size_type;
139
143 const States& GetStates() const { return mStates; }
144
145 using InterpolationType = ut::azel::InterpolationType;
146 void SetInterpolateTables(bool aInterpolateTables) { mInterpolateTables = aInterpolateTables; }
147 void SetInterpolationType(InterpolationType aInterpolationType) { mInterpolationType = aInterpolationType; }
148
149 void SetInterpTgtToXmtrAngles(bool aInterpTgtToXmtrAngles) { mInterpTgtToXmtrAngles = aInterpTgtToXmtrAngles; }
150 void SetInterpTgtToXmtrType(InterpolationType aIType) { mInterpTgtToXmtrType = aIType; }
151
152private:
153 // the following private methods are added to simplify ProcessInput
154 void ProcessInputState(UtInput& aInput);
155 void ProcessInputPolarization(UtInput& aInput);
156 void ProcessInputFrequencyLimit(UtInput& aInput);
157 void ProcessInputAzimuth(UtInput& aInput);
158 void ProcessInputElevation(UtInput& aInput);
159 bool ProcessInputTableData(UtInput& aInput);
160
161 void UseDefaultPolarization(State& aState, int aPolarization);
162
163 // Input processing aids
164 WsfStringId mCurrentStateId{"default"};
166 double mCurrentFrequencyLimit{1.0E+30};
167 double mCurrentTgtToXmtrAz{-UtMath::cPI};
168 double mCurrentTgtToXmtrEl{-UtMath::cPI_OVER_2};
169 int mCurrentAzimuthIndex{-1};
170 int mCurrentElevationIndex{-1};
171
172 bool mInterpolateTables{true};
173 InterpolationType mInterpolationType{InterpolationType::cLinear};
174 bool mInterpTgtToXmtrAngles{false};
175 InterpolationType mInterpTgtToXmtrType{InterpolationType::cLinear};
176 StateIndex mDefaultStateIndex{0};
177 States mStates;
178};
179
180#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfBistaticSig.hpp:34
bool Validate(size_t aTgtToRcvrAzCount, size_t aTgtToRcvrElCount)
Definition WsfBistaticSig.cpp:862
TblLookupLU< double > mTgtToXmtrElLU
Definition WsfBistaticSig.hpp:51
void CreateConstantTable(float aValue)
Definition WsfBistaticSig.cpp:839
TblLookupU< double > mTgtToXmtrAzU
Definition WsfBistaticSig.hpp:47
TblDepVar2< UtAzElTable * > mAzElTables
Definition WsfBistaticSig.hpp:45
TblLookupU< double > mTgtToXmtrElU
Definition WsfBistaticSig.hpp:48
TblIndVarU< double > mTgtToXmtrEl
Definition WsfBistaticSig.hpp:44
TblIndVarU< double > mTgtToXmtrAz
Definition WsfBistaticSig.hpp:43
TblLookupLU< double > mTgtToXmtrAzLU
Definition WsfBistaticSig.hpp:50
virtual ~AzElAzElTable()=default
TableSet mPolarization[WsfEM_Types::cPOL_COUNT]
There is one set of tables for each polarization.
Definition WsfBistaticSig.hpp:134
WsfStringId mStateId
Definition WsfBistaticSig.hpp:131
State(WsfStringId aStateId)
Definition WsfBistaticSig.cpp:919
AzElAzElTable * mTablePtr
A pointer to the actual table data for this table.
Definition WsfBistaticSig.hpp:110
double mFrequencyLimit
The upper frequency to which this table applies.
Definition WsfBistaticSig.hpp:107
Table(double aFrequencyLimit, AzElAzElTable *aTablePtr, bool aIsACopy)
Definition WsfBistaticSig.cpp:911
bool mIsACopy
Definition WsfBistaticSig.hpp:115
void SetInterpolateTables(bool aInterpolateTables)
Definition WsfBistaticSig.hpp:146
float GetSignature(UtAzElLookup &aContext, WsfStringId aStateId, WsfEM_Types::Polarization aPolarization, double aFrequency, double aTgtToXmtrAz, double aTgtToXmtrEl, double aTgtToRcvrAz, double aTgtToRcvrEl)
Definition WsfBistaticSig.cpp:630
WsfBistaticSig()=default
const States & GetStates() const
Definition WsfBistaticSig.hpp:143
bool AddTable(AzElAzElTable *aTablePtr, WsfStringId aState, WsfEM_Types::Polarization aPolarization, double aFrequency, bool aIsACopy=false)
Definition WsfBistaticSig.cpp:420
void SetInterpTgtToXmtrAngles(bool aInterpTgtToXmtrAngles)
Definition WsfBistaticSig.hpp:149
virtual bool Initialize()
Definition WsfBistaticSig.cpp:68
bool IsA_ValidState(WsfStringId aId)
Definition WsfBistaticSig.cpp:818
std::vector< State > States
Definition WsfBistaticSig.hpp:137
void SetInterpTgtToXmtrType(InterpolationType aIType)
Definition WsfBistaticSig.hpp:150
std::vector< Table >::size_type TableIndex
Definition WsfBistaticSig.hpp:123
void SetInterpolationType(InterpolationType aInterpolationType)
Definition WsfBistaticSig.hpp:147
static WsfBistaticSig * GetDefaultSig()
Definition WsfBistaticSig.cpp:771
ut::azel::InterpolationType InterpolationType
Definition WsfBistaticSig.hpp:145
std::map< std::string, std::map< double, AzElAzElTable * > > PolFreqTableMapType
Definition WsfBistaticSig.hpp:56
std::vector< Table > TableSet
Definition WsfBistaticSig.hpp:121
void SelectTable(AzElAzElTable &aContext, WsfStringId aState, WsfEM_Types::Polarization aPolarization, double aFrequency)
Definition WsfBistaticSig.cpp:715
std::vector< State >::size_type StateIndex
Definition WsfBistaticSig.hpp:138
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
virtual WsfObject * Clone() const =0
virtual bool ProcessInput(UtInput &aInput)
Definition WsfObject.cpp:140
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