BinUtils.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk 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 Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
44 #include "BinUtils.hpp"
45 
46 namespace gnsstk
47 {
48  namespace BinUtils
49  {
50  CRCParam :: CRCParam(int o, unsigned long p, unsigned long i,
51  unsigned long f, bool d, bool ri, bool ro)
52  : order(o), polynom(p), initial(i), final(f), direct(d),
53  refin(ri), refout(ro)
54  {
55  }
56 
57 
58  const CRCParam CRCCCITT(16, 0x1021, 0xffff, 0, true, false, false);
59  const CRCParam CRC16(16, 0x8005, 0, 0, true, true, true);
60  const CRCParam CRC32(32, 0x4c11db7, 0xffffffff, 0xffffffff, true, true, true);
61  const CRCParam CRC24Q(24, 0x823ba9, 0, 0xffffff, true, false, false);
62  const CRCParam CRCGLOL3(24, 0xc3267d, 0, 0xffffff, true, false, false);
63  // CRC24Q (for GPS CNAV): 23 17 13 12 11 9 8 7 5 3 +1
64  // 1000 0010 0011 1011 1010 1001 : 823ba9
65 
66  // CRC-16: 16 15 2 +1
67  // 1000 0000 0000 0101: 8005
68 
69  // CRC-CCITT: 16 12 5 +1
70  // 0001 0000 0010 0001: 1021
71 
72  // CRC-32: 32 26 23 22 16 12 11 10 8 7 5 4 2 +1
73  // 0000 0100 1100 0001 0001 1101 1011 0101 : 04c11db5
74 
75  // GLONASS L3: 24 23 18 17 14 11 10 7 6 5 4 3 1 +1
76  // 1100 0011 0010 0110 0111 1101: c3267d
77  }
78 }
gnsstk::BinUtils::CRC24Q
const CRCParam CRC24Q(24, 0x823ba9, 0, 0xffffff, true, false, false)
CRC-24Q parameters.
Definition: BinUtils.hpp:311
gnsstk::BinUtils::CRCParam::CRCParam
CRCParam(int o, unsigned long p, unsigned long i, unsigned long f, bool d, bool ri, bool ro)
Definition: BinUtils.cpp:50
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::BinUtils::CRCParam
Encapsulate parameters for CRC computation.
Definition: BinUtils.hpp:280
BinUtils.hpp
gnsstk::BinUtils::CRCGLOL3
const CRCParam CRCGLOL3(24, 0xc3267d, 0, 0xffffff, true, false, false)
GLONASS CDMA L3 CRC parameters.
Definition: BinUtils.hpp:313
gnsstk::BinUtils::CRC32
const CRCParam CRC32(32, 0x4c11db7, 0xffffffff, 0xffffffff, true, true, true)
CRC-32 parameters.
Definition: BinUtils.hpp:309
gnsstk::BinUtils::CRC16
const CRCParam CRC16(16, 0x8005, 0, 0, true, true, true)
CRC-16 parameters.
Definition: BinUtils.hpp:307
gnsstk::BinUtils::CRCCCITT
const CRCParam CRCCCITT(16, 0x1021, 0xffff, 0, true, false, false)
CCITT CRC parameters.
Definition: BinUtils.hpp:305


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:38