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 {
30 namespace iridium {
31
33 {
34 private:
35 float 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 * d_corr_fft;
61 gr::fft::fft_complex * d_corr_dl_ifft;
62 gr::fft::fft_complex * 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 std::vector<gr_complex> d_dl_preamble_reversed_conj;
70 std::vector<gr_complex> d_ul_preamble_reversed_conj;
71
72 blocks::rotator d_r;
73 gr::fft::fft_complex d_cfo_est_fft;
74
75 void handler(pmt::pmt_t msg);
76 int process_next_frame(float sample_rate, float center_frequency,
77 double offset, uint64_t id, size_t burst_size, int start);
78
79 void update_buffer_sizes(size_t burst_size);
80 void initialize_cfo_est_fft(void);
81 void initialize_correlation_filter(void);
82 std::vector<gr_complex> generate_sync_word(::iridium::direction direction);
83 int fft_shift_index(int index, int fft_size);
84 int fft_unshift_index(int index, int fft_size);
85 float interpolate(float alpha, float beta, float gamma);
86
87 public:
88 burst_downmix_impl(int sample_rate, int search_depth, size_t hard_max_queue_len,
89 const std::vector<float> &input_taps, const std::vector<float> &start_finder_taps,
90 bool handle_multiple_frames_per_burst);
92
95 void debug_id(uint64_t id);
96
97 int work(int noutput_items,
98 gr_vector_const_void_star &input_items,
99 gr_vector_void_star &output_items);
100 };
101
102 } // namespace iridium
103} // namespace gr
104
105#endif /* INCLUDED_IRIDIUM_BURST_DOWNMIX_IMPL_H */
106
Definition: burst_downmix_impl.h:33
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:27
Definition: iridium.h:2
direction
Definition: iridium.h:4