GNU Radio's IRIDIUM Package
iridium_qpsk_demod_cpp_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2020 gr-iridium author.
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_IRIDIUM_QPSK_DEMOD_CPP_IMPL_H
22 #define INCLUDED_IRIDIUM_IRIDIUM_QPSK_DEMOD_CPP_IMPL_H
23 
25 
26 namespace gr {
27  namespace iridium {
28 
30  {
31  private:
32  size_t d_max_burst_size;
33  float d_alpha;
34 
35  float * d_magnitude_f;
36  gr_complex * d_burst_after_pll;
37  gr_complex * d_decimated_burst;
38  int * d_demodulated_burst;
39  int d_symbol_mapping[4];
40  uint64_t d_n_handled_bursts;
41  uint64_t d_n_access_ok_bursts;
42  uint64_t d_n_access_ok_sub_bursts;
43 
44  std::vector<uint8_t> d_bits;
45  std::vector<uint64_t> d_channel_id;
46 
47  void handler(int channel, pmt::pmt_t msg);
48  void update_buffer_sizes(size_t burst_size);
49  int decimate(const gr_complex * in, int size, int sps, gr_complex * out);
50  void qpskFirstOrderPLL(const gr_complex* x, int size, float alpha, gr_complex* y);
51  size_t demod_qpsk(const gr_complex *burst, size_t n_symbols, int * out, float * level, int * confidence);
52  bool check_sync_word(int * d_demodulated_burst, size_t n_symbols, ::iridium::direction direction);
53  void decode_deqpsk(int * demodulated_burst, size_t n_symbols);
54  void map_symbols_to_bits(const int * demodulated_burst, size_t n_symbols, std::vector<uint8_t> &bits);
55  public:
56  iridium_qpsk_demod_cpp_impl(int n_channels);
58 
59  uint64_t get_n_handled_bursts();
60  uint64_t get_n_access_ok_bursts();
61  uint64_t get_n_access_ok_sub_bursts();
62 
63  int work(int noutput_items,
64  gr_vector_const_void_star &input_items,
65  gr_vector_void_star &output_items);
66  };
67 
68  } // namespace iridium
69 } // namespace gr
70 
71 #endif /* INCLUDED_IRIDIUM_IRIDIUM_QPSK_DEMOD_CPP_IMPL_H */
72 
Definition: fft_burst_tagger_impl.h:30
direction
Definition: iridium.h:4
Definition: burst_downmix.h:27
Definition: iridium_qpsk_demod_cpp_impl.h:29
<+description of block+>
Definition: iridium_qpsk_demod_cpp.h:35
Definition: iridium.h:2
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)