GNU Radio's IRIDIUM Package
burst_downmix_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2020 Free Software Foundation, Inc.
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_IRIDIUM_BURST_DOWNMIX_IMPL_H
22#define INCLUDED_IRIDIUM_BURST_DOWNMIX_IMPL_H
23
24#include <gnuradio/blocks/rotator.h>
25#include <gnuradio/filter/fir_filter.h>
26
28
29namespace gr {
30namespace iridium {
31
33{
34private:
35 int d_output_sample_rate;
36 int d_output_samples_per_symbol;
37 size_t d_max_burst_size;
38 int d_search_depth;
39 int d_pre_start_samples;
40 int d_cfo_est_fft_size;
41 int d_fft_over_size_facor;
42 int d_corr_fft_size;
43 int d_sync_search_len;
44 int d_hard_max_queue_len;
45 uint64_t d_n_dropped_bursts;
46 bool d_handle_multiple_frames_per_burst;
47 bool d_debug;
48 int64_t d_debug_id;
49
50 gr_complex* d_frame;
51 gr_complex* d_tmp_a;
52 gr_complex* d_tmp_b;
53 gr_complex* d_dl_preamble_reversed_conj_fft;
54 gr_complex* d_ul_preamble_reversed_conj_fft;
55
56 float* d_magnitude_f;
57 float* d_magnitude_filtered_f;
58 float* d_cfo_est_window_f;
59
60 gr::fft::fft_complex_fwd* d_corr_fft;
61 gr::fft::fft_complex_rev* d_corr_dl_ifft;
62 gr::fft::fft_complex_rev* d_corr_ul_ifft;
63
64 filter::kernel::fir_filter_ccf d_input_fir;
65 filter::kernel::fir_filter_fff d_start_finder_fir;
66 filter::kernel::fir_filter_ccf d_rrc_fir;
67 filter::kernel::fir_filter_ccf d_rc_fir;
68
69 volk::vector<gr_complex> d_dl_preamble_reversed_conj;
70 volk::vector<gr_complex> d_ul_preamble_reversed_conj;
71
72 blocks::rotator d_r;
73 gr::fft::fft_complex_fwd d_cfo_est_fft;
74
75 void handler(pmt::pmt_t msg);
76 int process_next_frame(float sample_rate,
77 double center_frequency,
78 uint64_t timestamp,
79 uint64_t sub_id,
80 size_t burst_size,
81 int start,
82 float noise,
83 float magnitude);
84
85 void update_buffer_sizes(size_t burst_size);
86 void initialize_cfo_est_fft(void);
87 void initialize_correlation_filter(void);
88 volk::vector<gr_complex> generate_sync_word(::iridium::direction direction);
89 int fft_shift_index(int index, int fft_size);
90 int fft_unshift_index(int index, int fft_size);
91 float interpolate(float alpha, float beta, float gamma);
92
93public:
94 burst_downmix_impl(int sample_rate,
95 int search_depth,
96 size_t hard_max_queue_len,
97 const std::vector<float>& input_taps,
98 const std::vector<float>& start_finder_taps,
99 bool handle_multiple_frames_per_burst);
101
104 void debug_id(uint64_t id);
105
106 int work(int noutput_items,
107 gr_vector_const_void_star& input_items,
108 gr_vector_void_star& output_items);
109};
110
111} // namespace iridium
112} // namespace gr
113
114#endif /* INCLUDED_IRIDIUM_BURST_DOWNMIX_IMPL_H */
burst_downmix_impl(int sample_rate, int search_depth, size_t hard_max_queue_len, const std::vector< float > &input_taps, const std::vector< float > &start_finder_taps, bool handle_multiple_frames_per_burst)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
<+description of block+>
Definition burst_downmix.h:36
Definition burst_downmix.h:28
Definition burst_downmix.h:27
direction
Definition iridium.h:4