GNU Radio Radar Toolbox
static_target_simulator_cc_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 Communications Engineering Lab, KIT.
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_RADAR_STATIC_TARGET_SIMULATOR_CC_IMPL_H
22 #define INCLUDED_RADAR_STATIC_TARGET_SIMULATOR_CC_IMPL_H
23 
24 #include <fftw3.h>
26 
27 namespace gr {
28 namespace radar {
29 
31 {
32 private:
33  // Nothing to declare in this block.
34 
35 protected:
36  int calculate_output_stream_length(const gr_vector_int& ninput_items);
37 
38 public:
39  static_target_simulator_cc_impl(std::vector<float> range,
40  std::vector<float> velocity,
41  std::vector<float> rcs,
42  std::vector<float> azimuth,
43  std::vector<float> position_rx,
44  int samp_rate,
45  float center_freq,
46  float self_coupling_db,
47  bool rndm_phaseshift,
48  bool self_coupling,
49  const std::string& len_key);
51 
52  void setup_targets(std::vector<float> range,
53  std::vector<float> velocity,
54  std::vector<float> rcs,
55  std::vector<float> azimuth,
56  std::vector<float> position_rx,
57  int samp_rate,
58  float center_freq,
59  float self_coupling_db,
60  bool rndm_phaseshift,
61  bool self_coupling);
62 
68 
71 
73  std::vector<float> d_freq;
74  std::vector<float> d_doppler, d_scale_ampl, d_timeshift;
75  std::vector<std::vector<float>> d_timeshift_azimuth;
77  std::vector<gr_complex> d_hold_in;
78 
79  fftwf_plan d_fft_plan, d_ifft_plan;
80  std::vector<gr_complex> d_in_fft;
81  std::vector<std::vector<gr_complex>> d_filt_doppler, d_filt_phase,
83  std::vector<std::vector<gr_complex>> d_filt_time;
84  std::vector<std::vector<std::vector<gr_complex>>> d_filt_time_azimuth;
85 
86  pmt::pmt_t d_key, d_val, d_srcid;
87  uint64_t d_time_sec;
89 
90  constexpr static float c_light = 3e8;
91 
92  // Where all the action really happens
93  int work(int noutput_items,
94  gr_vector_int& ninput_items,
95  gr_vector_const_void_star& input_items,
96  gr_vector_void_star& output_items);
97 };
98 
99 } // namespace radar
100 } // namespace gr
101 
102 #endif /* INCLUDED_RADAR_STATIC_TARGET_SIMULATOR_CC_IMPL_H */
std::vector< float > d_timeshift
Definition: static_target_simulator_cc_impl.h:74
void setup_targets(std::vector< float > range, std::vector< float > velocity, std::vector< float > rcs, std::vector< float > azimuth, std::vector< float > position_rx, int samp_rate, float center_freq, float self_coupling_db, bool rndm_phaseshift, bool self_coupling)
gr_complex d_phase_doppler
Definition: static_target_simulator_cc_impl.h:76
std::vector< float > d_position_rx
Definition: static_target_simulator_cc_impl.h:63
std::vector< float > d_scale_ampl
Definition: static_target_simulator_cc_impl.h:74
float d_self_coupling_db
Definition: static_target_simulator_cc_impl.h:70
std::vector< float > d_rcs
Definition: static_target_simulator_cc_impl.h:63
pmt::pmt_t d_srcid
Definition: static_target_simulator_cc_impl.h:86
int calculate_output_stream_length(const gr_vector_int &ninput_items)
std::vector< std::vector< float > > d_timeshift_azimuth
Definition: static_target_simulator_cc_impl.h:75
Definition: static_target_simulator_cc.h:96
pmt::pmt_t d_val
Definition: static_target_simulator_cc_impl.h:86
pmt::pmt_t d_key
Definition: static_target_simulator_cc_impl.h:86
int work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
float d_center_freq
Definition: static_target_simulator_cc_impl.h:65
gr_complex d_phase_random
Definition: static_target_simulator_cc_impl.h:76
std::vector< std::vector< std::vector< gr_complex > > > d_filt_time_azimuth
Definition: static_target_simulator_cc_impl.h:84
std::vector< gr_complex > d_in_fft
Definition: static_target_simulator_cc_impl.h:80
Definition: static_target_simulator_cc_impl.h:30
std::vector< std::vector< gr_complex > > d_filt_self_coupling
Definition: static_target_simulator_cc_impl.h:81
Definition: crop_matrix_vcvc.h:28
gr_complex d_phase_time
Definition: static_target_simulator_cc_impl.h:76
uint64_t d_time_sec
Definition: static_target_simulator_cc_impl.h:87
std::vector< float > d_azimuth
Definition: static_target_simulator_cc_impl.h:63
bool d_self_coupling
Definition: static_target_simulator_cc_impl.h:69
std::vector< std::vector< gr_complex > > d_filt_doppler
Definition: static_target_simulator_cc_impl.h:81
std::vector< std::vector< gr_complex > > d_filt_time
Definition: static_target_simulator_cc_impl.h:83
std::vector< float > d_range
Definition: static_target_simulator_cc_impl.h:63
int d_hold_noutput
Definition: static_target_simulator_cc_impl.h:66
int d_samp_rate
Definition: static_target_simulator_cc_impl.h:64
int d_num_targets
Definition: static_target_simulator_cc_impl.h:72
double d_time_frac_sec
Definition: static_target_simulator_cc_impl.h:88
static constexpr float c_light
Definition: static_target_simulator_cc_impl.h:90
std::vector< gr_complex > d_hold_in
Definition: static_target_simulator_cc_impl.h:77
static_target_simulator_cc_impl(std::vector< float > range, std::vector< float > velocity, std::vector< float > rcs, std::vector< float > azimuth, std::vector< float > position_rx, int samp_rate, float center_freq, float self_coupling_db, bool rndm_phaseshift, bool self_coupling, const std::string &len_key)
std::vector< float > d_freq
Definition: static_target_simulator_cc_impl.h:73
fftwf_plan d_ifft_plan
Definition: static_target_simulator_cc_impl.h:79
fftwf_plan d_fft_plan
Definition: static_target_simulator_cc_impl.h:79
std::vector< std::vector< gr_complex > > d_filt_phase
Definition: static_target_simulator_cc_impl.h:81
bool d_rndm_phaseshift
Definition: static_target_simulator_cc_impl.h:67
std::vector< float > d_velocity
Definition: static_target_simulator_cc_impl.h:63
std::vector< float > d_doppler
Definition: static_target_simulator_cc_impl.h:74