GNU Radio's SATNOGS Package
lrpt_sync_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
4  *
5  * Copyright (C) 2018, Libre Space Foundation <http://librespacefoundation.org/>
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef INCLUDED_SATNOGS_LRPT_SYNC_IMPL_H
22 #define INCLUDED_SATNOGS_LRPT_SYNC_IMPL_H
23 
24 #include <satnogs/lrpt_sync.h>
26 #include <gnuradio/digital/constellation.h>
27 
28 namespace gr {
29 namespace satnogs {
30 
31 class lrpt_sync_impl : public lrpt_sync {
32 public:
33  lrpt_sync_impl(size_t threshold);
35 
36  int
37  work(int noutput_items,
38  gr_vector_const_void_star &input_items,
39  gr_vector_void_star &output_items);
40 
41 private:
42  const size_t d_thresh;
43  const uint64_t d_asm_coded;
44  const size_t d_asm_coded_len;
45  const uint64_t d_asm_coded_mask;
46  const int d_window;
47  const size_t d_coded_cadu_len;
48  bool d_frame_sync;
49  size_t d_received;
50  gr_complex d_rotate;
51  digital::constellation_qpsk::sptr d_qpsk;
52  uint64_t d_shift_reg0;
53  uint64_t d_shift_reg1;
54  uint64_t d_shift_reg2;
55  uint64_t d_shift_reg3;
56  gr_complex *d_rotate_pi2;
57  gr_complex *d_rotate_2pi2;
58  gr_complex *d_rotate_3pi2;
59  gr_complex *d_corrected;
60  uint8_t *d_coded_cadu;
61 
62  int
63  work_no_sync(const gr_complex *in, int noutput_items);
64 
65  int
66  work_sync(const gr_complex *in, int noutput_items);
67 
68  bool
69  found_sync(uint64_t reg);
70 
71 };
72 
73 
74 } // namespace satnogs
75 } // namespace gr
76 
77 #endif /* INCLUDED_SATNOGS_LRPT_SYNC_IMPL_H */
78 
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
<+description of block+>
Definition: lrpt_sync.h:35
Definition: amsat_duv_decoder.h:29
data_t reg[NROOTS+1]
Definition: decode_rs.h:78
lrpt_sync_impl(size_t threshold)
Definition: lrpt_sync_impl.h:31