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 
25 #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:
40  std::vector<float> range,
41  std::vector<float> velocity,
42  std::vector<float> rcs,
43  std::vector<float> azimuth,
44  std::vector<float> position_rx,
45  int samp_rate,
46  float center_freq,
47  float self_coupling_db,
48  bool rndm_phaseshift,
49  bool self_coupling,
50  const std::string& len_key
51  );
53 
54  void setup_targets(
55  std::vector<float> range,
56  std::vector<float> velocity,
57  std::vector<float> rcs,
58  std::vector<float> azimuth,
59  std::vector<float> position_rx,
60  int samp_rate,
61  float center_freq,
62  float self_coupling_db,
63  bool rndm_phaseshift,
64  bool self_coupling
65  );
66 
72 
75 
77  std::vector<float> d_freq;
78  std::vector<float> d_doppler, d_scale_ampl, d_timeshift;
79  std::vector<std::vector<float> > d_timeshift_azimuth;
81  std::vector<gr_complex> d_hold_in;
82 
83  fftwf_plan d_fft_plan, d_ifft_plan;
84  std::vector<gr_complex> d_in_fft;
85  std::vector<std::vector<gr_complex> > d_filt_doppler, d_filt_phase, d_filt_self_coupling;
86  std::vector<std::vector<gr_complex> > d_filt_time;
87  std::vector<std::vector<std::vector<gr_complex> > > d_filt_time_azimuth;
88 
89  pmt::pmt_t d_key, d_val, d_srcid;
90  uint64_t d_time_sec;
92 
93  constexpr static float c_light = 3e8;
94 
95  // Where all the action really happens
96  int work(int noutput_items,
97  gr_vector_int &ninput_items,
98  gr_vector_const_void_star &input_items,
99  gr_vector_void_star &output_items);
100  };
101 
102  } // namespace radar
103 } // namespace gr
104 
105 #endif /* INCLUDED_RADAR_STATIC_TARGET_SIMULATOR_CC_IMPL_H */
106 
std::vector< float > d_timeshift
Definition: static_target_simulator_cc_impl.h:78
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:80
std::vector< float > d_position_rx
Definition: static_target_simulator_cc_impl.h:67
std::vector< float > d_scale_ampl
Definition: static_target_simulator_cc_impl.h:78
float d_self_coupling_db
Definition: static_target_simulator_cc_impl.h:74
std::vector< float > d_rcs
Definition: static_target_simulator_cc_impl.h:67
pmt::pmt_t d_srcid
Definition: static_target_simulator_cc_impl.h:89
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:79
Definition: static_target_simulator_cc.h:96
pmt::pmt_t d_val
Definition: static_target_simulator_cc_impl.h:89
pmt::pmt_t d_key
Definition: static_target_simulator_cc_impl.h:89
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:69
gr_complex d_phase_random
Definition: static_target_simulator_cc_impl.h:80
std::vector< std::vector< std::vector< gr_complex > > > d_filt_time_azimuth
Definition: static_target_simulator_cc_impl.h:87
std::vector< gr_complex > d_in_fft
Definition: static_target_simulator_cc_impl.h:84
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:85
Definition: crop_matrix_vcvc.h:28
gr_complex d_phase_time
Definition: static_target_simulator_cc_impl.h:80
uint64_t d_time_sec
Definition: static_target_simulator_cc_impl.h:90
std::vector< float > d_azimuth
Definition: static_target_simulator_cc_impl.h:67
bool d_self_coupling
Definition: static_target_simulator_cc_impl.h:73
std::vector< std::vector< gr_complex > > d_filt_doppler
Definition: static_target_simulator_cc_impl.h:85
std::vector< std::vector< gr_complex > > d_filt_time
Definition: static_target_simulator_cc_impl.h:86
std::vector< float > d_range
Definition: static_target_simulator_cc_impl.h:67
int d_hold_noutput
Definition: static_target_simulator_cc_impl.h:70
int d_samp_rate
Definition: static_target_simulator_cc_impl.h:68
int d_num_targets
Definition: static_target_simulator_cc_impl.h:76
double d_time_frac_sec
Definition: static_target_simulator_cc_impl.h:91
static constexpr float c_light
Definition: static_target_simulator_cc_impl.h:93
std::vector< gr_complex > d_hold_in
Definition: static_target_simulator_cc_impl.h:81
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:77
fftwf_plan d_ifft_plan
Definition: static_target_simulator_cc_impl.h:83
fftwf_plan d_fft_plan
Definition: static_target_simulator_cc_impl.h:83
std::vector< std::vector< gr_complex > > d_filt_phase
Definition: static_target_simulator_cc_impl.h:85
bool d_rndm_phaseshift
Definition: static_target_simulator_cc_impl.h:71
std::vector< float > d_velocity
Definition: static_target_simulator_cc_impl.h:67
std::vector< float > d_doppler
Definition: static_target_simulator_cc_impl.h:78