GNU Radio Radar Toolbox
signal_generator_fmcw_c_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_SIGNAL_GENERATOR_FMCW_C_IMPL_H
22#define INCLUDED_RADAR_SIGNAL_GENERATOR_FMCW_C_IMPL_H
23
25
26namespace gr {
27namespace radar {
28
30{
31public:
32 signal_generator_fmcw_c_impl(const int samp_rate,
33 const int samp_up,
34 const int samp_down,
35 const int samp_cw,
36 const float freq_cw,
37 const float freq_sweep,
38 const float amplitude,
39 const std::string& len_key);
41
42 int work(int noutput_items,
43 gr_vector_const_void_star& input_items,
44 gr_vector_void_star& output_items);
45
46private:
47 const int d_samp_rate; //!< Sample rate of signal (sps)
48 const int d_samp_up; //!< Number of samples on the up-sweep
49 const int d_samp_down; //!< Number of samples on the down-sweep
50 const int d_samp_cw; //!< Number of samples on the CW part
51 const int d_packet_len; //!< Total length of packet (up, down, CW)
52 const float d_freq_cw; //!< Frequency of the CW part
53 const float d_freq_sweep; //!< Sweep frequency
54 const float d_amplitude; //!< Amplitude
55
56 const pmt::pmt_t d_key_len; //!< Tag identifier for TSB length tags
57 const pmt::pmt_t d_value_len; //!< Precalculated value of TSB tag
58 const pmt::pmt_t d_srcid; //!< srcid for TSB tag
59
60 std::complex<float> d_phase; //!< Store phase state
61 std::vector<float> d_waveform; //!< Phase increment of the waveform
62 int d_wv_counter; //!< Stores the current position in the waveform
63};
64
65} // namespace radar
66} // namespace gr
67
68#endif /* INCLUDED_RADAR_SIGNAL_GENERATOR_FMCW_C_IMPL_H */
Definition signal_generator_fmcw_c_impl.h:30
signal_generator_fmcw_c_impl(const int samp_rate, const int samp_up, const int samp_down, const int samp_cw, const float freq_cw, const float freq_sweep, const float amplitude, const std::string &len_key)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition signal_generator_fmcw_c.h:48
Definition crop_matrix_vcvc.h:28