WSF
WsfPD_Filter.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
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 WSFPD_FILTER_HPP
13#define WSFPD_FILTER_HPP
14
15#include <vector>
16
17class UtInput;
18
19class WsfSensor;
20class WsfSensorMode;
21
23{
24public:
26 {
27 cST_TARGET = 1, // sig_target
28 cST_BLADE = 2, // sig_blade
29 cST_CLUTTER = 3, // sig_clutter
30 cST_NOISE_JAM = 4, // sig_noise_jam
31 cST_DECEPT_JAM = 5, // sig_decept_jam
32 cST_NOISE = 6, // sig_noise
33 cST_INTERFERENCE = 7, // SIG_INTERFERENCE
34 cST_RWR_SIGNAL = 8, // sig_rwr_signal
35 cST_RWR_SENS = 9, // sig_rwr_sens
36 cST_PROCESSED_TARGET = 10, // sig_processed_target
37 };
38
39 using DbleVec = std::vector<double>;
40 using DbleDbleVec = std::vector<DbleVec>;
41
42 WsfPD_Filter(bool aZVF_Flag = false, int aMax_PRFs = 16);
43 // WsfPD_Filter(const WsfPD_Filter& aSrc) = default;
44 virtual ~WsfPD_Filter() = default;
45
46 // static WsfPD_Filter* ObjectFactory(const std::string& aTypeName);
47
48 virtual WsfPD_Filter* Clone() const;
49 virtual bool Initialize(double aConicalScanRate,
50 double aDecayConst,
51 double aIF_Bandwidth,
52 int aN_PRFs,
53 DbleVec aPRF,
54 double aPW,
55 double aSigmaC);
56 virtual bool ProcessInput(UtInput& aInput);
57
58 double pd_response(double aF_Dop, int aFlag, int aPRF_Index);
59 void spectral_response_pd(int aPRF_Index,
60 int aCount,
61 DbleVec aFrequencies,
62 DbleVec aPSD,
63 int aMaxPSD_Index,
64 double& aResponse,
65 double& aClutterResponse);
66
67 void set_pd_data(int aN_Filters, int aN_Poles, int aN_PRFs, double aSLR_dB, DbleVec& aFilterBW);
68
69 double get_stop_freq(int aPRF_Index);
70 double noise_bandwidth_pd(int aPRF_Index);
71 double filter_bandwidth_pd(int aPRF_Index);
72
73
74private:
75 enum FilterFunc
76 {
77 cFT_CLTFPD,
78 cFT_CLUT_CUSTOM,
79 cFT_CHFILT
80 };
81
82 struct PdBank
83 {
84 int npoles;
85 double slr_db;
86 DbleVec filter_bw;
87 };
88
89 double romchf(double a, double b, double eps, double center_freq, double stop_freq, FilterFunc aFilterFunc);
90
91 bool init_pd(double aConicalScanRate,
92 double aDecayConst,
93 double aIF_Bandwidth,
94 int aN_PRFs,
95 DbleVec aPRF,
96 double aPW,
97 double aSigmaC,
98 bool aZeroAlign);
99
100 bool init_zvf_pd(PdBank aPdBank,
101 double aConicalScanRate,
102 double aDecayConstant,
103 double aIF_Bandwidth,
104 int aN_PRFs,
105 DbleVec aPRF,
106 double aPW,
107 double aSigmaC/*,
108 char* aBeamTxt*/);
109
110 double filt_func(double aFrequency, double aCenterFrequency, double aStopFrequency, FilterFunc aFilterFunc);
111 double cltfpd(double aFrequency, double aCenterFrequency, double aStopFrequency);
112 double clut_custom(double aFrequency, double aCenterFrequency, double aStopFrequency);
113 double chfilt(double aDopplerFrequency, double aCenterFrequency, double aStopFrequency);
114
115 double chebcf(double aX, double aN_Poles);
116
117 void set_pd_consts(double aSigmaC, double aDecayConst, double aConicalScanRate);
118
119 void set_clutter_psd_pd(DbleVec& aFrequencies, DbleDbleVec& aPSD, int aCount, int aN_PRFs);
120
121 void compute_filter_parms_pd(double aDopplerFrequency,
122 int aPRF_Index,
123 double& aFrequencyAlias,
124 double& aCenterFrequency,
125 double& aStopFrequency,
126 int& aN_Filters);
127
128 int position(int aCount, DbleVec& aArray, double aValue);
129
130 void alloc_data(bool aDoDealloc = true);
131
132 bool even_filter_cnt;
133 bool zero_align;
134 bool zvf_flag;
135 bool zvf_sw;
136
137 int max_prfs;
138 int nfilters;
139 int npsd_lines;
140 int psd_iprf;
141 int npoles;
142 int nprfs;
143
144 double slr_abs;
145 double slr_db;
146
147 double const1;
148 double const2;
149 double sigma3;
150 double decay_const; // from the clutter input environment
151 double conical_scan_rate; // radar parameter
152
153 DbleDbleVec clutter_response;
154
155 DbleVec filter_bw;
156 DbleVec prfhz;
157 DbleVec max_center_freq;
158 DbleVec noise_bw;
159 DbleVec psd_freqs;
160 DbleDbleVec psd_lines;
161 DbleVec unambig_range;
162 DbleVec stop_freqs;
163};
164#endif
virtual WsfPD_Filter * Clone() const
Definition WsfPD_Filter.cpp:63
virtual bool ProcessInput(UtInput &aInput)
Definition WsfPD_Filter.cpp:138
void spectral_response_pd(int aPRF_Index, int aCount, DbleVec aFrequencies, DbleVec aPSD, int aMaxPSD_Index, double &aResponse, double &aClutterResponse)
Definition WsfPD_Filter.cpp:1080
void set_pd_data(int aN_Filters, int aN_Poles, int aN_PRFs, double aSLR_dB, DbleVec &aFilterBW)
Definition WsfPD_Filter.cpp:957
std::vector< double > DbleVec
Definition WsfPD_Filter.hpp:39
double filter_bandwidth_pd(int aPRF_Index)
Definition WsfPD_Filter.cpp:986
virtual ~WsfPD_Filter()=default
double pd_response(double aF_Dop, int aFlag, int aPRF_Index)
Definition WsfPD_Filter.cpp:455
double get_stop_freq(int aPRF_Index)
Definition WsfPD_Filter.cpp:972
double noise_bandwidth_pd(int aPRF_Index)
Definition WsfPD_Filter.cpp:979
SignalType
Definition WsfPD_Filter.hpp:26
@ cST_RWR_SENS
Definition WsfPD_Filter.hpp:35
@ cST_RWR_SIGNAL
Definition WsfPD_Filter.hpp:34
@ cST_BLADE
Definition WsfPD_Filter.hpp:28
@ cST_PROCESSED_TARGET
Definition WsfPD_Filter.hpp:36
@ cST_INTERFERENCE
Definition WsfPD_Filter.hpp:33
@ cST_NOISE
Definition WsfPD_Filter.hpp:32
@ cST_CLUTTER
Definition WsfPD_Filter.hpp:29
@ cST_TARGET
Definition WsfPD_Filter.hpp:27
@ cST_DECEPT_JAM
Definition WsfPD_Filter.hpp:31
@ cST_NOISE_JAM
Definition WsfPD_Filter.hpp:30
WsfPD_Filter(bool aZVF_Flag=false, int aMax_PRFs=16)
Definition WsfPD_Filter.cpp:27
std::vector< DbleVec > DbleDbleVec
Definition WsfPD_Filter.hpp:40
virtual bool Initialize(double aConicalScanRate, double aDecayConst, double aIF_Bandwidth, int aN_PRFs, DbleVec aPRF, double aPW, double aSigmaC)
Definition WsfPD_Filter.cpp:69
Definition WsfSensorMode.hpp:36
Definition WsfSensor.hpp:92
Copyrights Multiple, All Rights Reserved