GNU Radio's SATNOGS Package
golay24.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) 2016, 2017, 2018
6 * Libre Space Foundation <http://librespacefoundation.org/>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef INCLUDED_SATNOGS_GOLAY24_H
23#define INCLUDED_SATNOGS_GOLAY24_H
24
26
27#include <cstdint>
28#include <vector>
29
30namespace gr {
31namespace satnogs {
32
33/*!
34 * \brief A binary Golay (24,12,8) encoder and decoder.
35 *
36 * A binary Golay (24,12,8) encoder and decoder. The implementation uses LUT
37 * based on the process described in the book:
38 *
39 * Morelos-Zaragoza, Robert H. The art of error correcting coding.
40 * John Wiley & Sons, 2006.
41 *
42 */
44{
45public:
48
49 static const std::vector<uint32_t> G_P;
50 static const std::vector<uint32_t> G_I;
51
52 uint32_t encode12(uint16_t in, bool lsb_parity = true);
53
54 bool decode24(uint32_t* out, uint32_t in);
55};
56
57} // namespace satnogs
58} // namespace gr
59
60#endif /* INCLUDED_SATNOGS_GOLAY24_H */
#define SATNOGS_API
Definition: api.h:19
A binary Golay (24,12,8) encoder and decoder.
Definition: golay24.h:44
uint32_t encode12(uint16_t in, bool lsb_parity=true)
static const std::vector< uint32_t > G_P
Definition: golay24.h:49
bool decode24(uint32_t *out, uint32_t in)
static const std::vector< uint32_t > G_I
Definition: golay24.h:50
Definition: amsat_duv_decoder.h:29