GNU Radio Radar Toolbox
signal_generator_fmcw_c.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_H
22#define INCLUDED_RADAR_SIGNAL_GENERATOR_FMCW_C_H
23
24#include <gnuradio/sync_block.h>
25#include <radar/api.h>
26
27namespace gr {
28namespace radar {
29
30/*! Generates a signal for FMCW radar in baseband.
31 *
32 * The generated signal consists of three parts, in this order:
33 *
34 * 1. CW part with constant frequency
35 * 2. Up-chirp
36 * 3. Down-chirp
37 *
38 * The up-chirp goes from CW frequency to CW frequency plus sweep frequency
39 * and the down-chirp goes in the opposite direction. All of these parts
40 * can be disabled by setting the corresponding length to zero.
41 *
42 * The packet length for subsequent tagged streams is calculated by the sum
43 * of the number of samples of the single modulations parts.
44 *
45 * \ingroup radar
46 */
47class RADAR_API signal_generator_fmcw_c : virtual public gr::sync_block
48{
49public:
50 typedef std::shared_ptr<signal_generator_fmcw_c> sptr;
51
52 /*!
53 * \param samp_rate Signal sample rate (samples per second)
54 * \param samp_up Number samples of up-chirp part
55 * \param samp_down Number samples of down-chirp part
56 * \param samp_cw Number samples of CW part
57 * \param freq_cw CW signal frequency in baseband
58 * \param freq_sweep Sweep frequency of up- and down-chirp
59 * \param amplitude Signal amplitude
60 * \param len_key Packet length key for tagged stream
61 */
62 static sptr make(const int samp_rate,
63 const int samp_up,
64 const int samp_down,
65 const int samp_cw,
66 const float freq_cw,
67 const float freq_sweep,
68 const float amplitude,
69 const std::string& len_key = "packet_len");
70};
71
72} // namespace radar
73} // namespace gr
74
75#endif /* INCLUDED_RADAR_SIGNAL_GENERATOR_FMCW_C_H */
#define RADAR_API
Definition api.h:31
Definition signal_generator_fmcw_c.h:48
std::shared_ptr< signal_generator_fmcw_c > sptr
Definition signal_generator_fmcw_c.h:50
static sptr make(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="packet_len")
Definition crop_matrix_vcvc.h:28