GNU Radio's IRIDIUM Package
iridium_qpsk_demod_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
26namespace gr {
27namespace iridium {
28
30{
31private:
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 float qpskFirstOrderPLL(const gr_complex* x, int size, float alpha, gr_complex* y);
51 size_t demod_qpsk(const gr_complex* burst,
52 size_t n_symbols,
53 int* out,
54 float* level,
55 int* confidence);
56 bool check_sync_word(int* d_demodulated_burst,
57 size_t n_symbols,
58 ::iridium::direction direction);
59 void decode_deqpsk(int* demodulated_burst, size_t n_symbols);
60 void map_symbols_to_bits(const int* demodulated_burst,
61 size_t n_symbols,
62 std::vector<uint8_t>& bits);
63
64public:
65 iridium_qpsk_demod_impl(int n_channels);
67
71
72 int work(int noutput_items,
73 gr_vector_const_void_star& input_items,
74 gr_vector_void_star& output_items);
75};
76
77} // namespace iridium
78} // namespace gr
79
80#endif /* INCLUDED_IRIDIUM_IRIDIUM_QPSK_DEMOD_CPP_IMPL_H */
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
<+description of block+>
Definition iridium_qpsk_demod.h:36
Definition burst_downmix.h:28
Definition burst_downmix.h:27
direction
Definition iridium.h:4
Definition fft_burst_tagger_impl.h:30