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