GNSS-SDR  0.0.14
An Open Source GNSS Software Defined Receiver
Galileo_CNAV.h
Go to the documentation of this file.
1 /*!
2  * \file Galileo_CNAV.h
3  * \brief Galileo CNAV mesage constants. Data from:
4  * Galileo High Accuracy Service E6-B Signal-In-Space Message Specification v1.2
5  * (April 2020).
6  * \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es
7  *
8  *
9  * -----------------------------------------------------------------------------
10  *
11  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
12  * This file is part of GNSS-SDR.
13  *
14  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 #ifndef GNSS_SDR_GALILEO_CNAV_H
21 #define GNSS_SDR_GALILEO_CNAV_H
22 
23 #include <cstddef>
24 #include <cstdint>
25 #include <utility>
26 
27 /** \addtogroup Core
28  * \{ */
29 /** \addtogroup System_Parameters
30  * \{ */
31 
32 
33 // Galileo HAS message field lengths
34 constexpr size_t HAS_MSG_NSYS_LENGTH = 4;
35 constexpr size_t HAS_MSG_ID_MASK_LENGTH = 4;
36 constexpr size_t HAS_MSG_SATELLITE_MASK_LENGTH = 40;
37 constexpr size_t HAS_MSG_SIGNAL_MASK_LENGTH = 16;
38 constexpr size_t HAS_MSG_NAV_MESSAGE_LENGTH = 3;
39 constexpr size_t HAS_MSG_VALIDITY_INDEX_LENGTH = 4;
40 constexpr size_t HAS_MSG_IOD_GPS_LENGTH = 8;
41 constexpr size_t HAS_MSG_IOD_GAL_LENGTH = 10;
42 constexpr size_t HAS_MSG_DELTA_RADIAL_LENGTH = 14;
43 constexpr size_t HAS_MSG_DELTA_ALONG_TRACK_LENGTH = 12;
44 constexpr size_t HAS_MSG_DELTA_CROSS_TRACK_LENGTH = 12;
45 constexpr size_t HAS_MSG_DELTA_CLOCK_C0_MULTIPLIER_LENGTH = 2;
46 constexpr size_t HAS_MSG_DELTA_CLOCK_C0_LENGTH = 14;
47 constexpr size_t HAS_MSG_NSYSPRIME_LENGTH = 4;
48 constexpr size_t HAS_MSG_ID_CLOCK_SUBSET_LENGTH = 4;
49 constexpr size_t HAS_MSG_DELTA_CLOCK_MULTIPLIER_SUBSET_LENGTH = 2;
50 constexpr size_t HAS_MSG_DELTA_CLOCK_C0_SUBSET_LENGTH = 14;
51 constexpr size_t HAS_MSG_CODE_BIAS_LENGTH = 11;
52 constexpr size_t HAS_MSG_PHASE_BIAS_LENGTH = 11;
53 constexpr size_t HAS_MSG_PHASE_DISCONTINUITY_INDICATOR_LENGTH = 2;
54 constexpr size_t HAS_MSG_URA_LENGTH = 2;
55 
56 // Galileo CNAV message structure
57 constexpr int32_t GALILEO_CNAV_SYMBOLS_PER_PAGE = 1000; //!< Total numer of symbols per HAS page including the sync pattern
58 constexpr int32_t GALILEO_CNAV_PREAMBLE_PERIOD_SYMBOLS = 1000;
59 constexpr int32_t GALILEO_CNAV_PAGE_MS = 1; //!< Duration in ms of a CNAV page
60 constexpr int32_t GALILEO_CNAV_INTERLEAVER_ROWS = 8;
61 constexpr int32_t GALILEO_CNAV_INTERLEAVER_COLS = 123;
62 constexpr int32_t GALILEO_CNAV_TELEMETRY_RATE_BITS_SECOND = 1000; // bps
63 constexpr int32_t GALILEO_CNAV_HAS_PAGE_DATA_BITS = 448;
64 constexpr int32_t GALILEO_CNAV_PAGE_RESERVED_BITS = 14;
65 constexpr int32_t GALILEO_CNAV_BITS_FOR_CRC = GALILEO_CNAV_HAS_PAGE_DATA_BITS + GALILEO_CNAV_PAGE_RESERVED_BITS; // 462
66 constexpr int32_t GALILEO_CNAV_BYTES_FOR_CRC = 60;
67 constexpr int32_t GALILEO_CNAV_CRC_LENGTH = 24;
68 constexpr int32_t GALILEO_CNAV_MESSAGE_BITS_PER_PAGE = 424;
69 constexpr int32_t GALILEO_CNAV_PAGE_HEADER_BITS = 24;
70 constexpr int32_t GALILEO_CNAV_PREAMBLE_LENGTH_BITS = 16;
71 constexpr int32_t GALILEO_CNAV_MAX_NUMBER_ENCODED_BLOCKS = 255;
72 constexpr int32_t GALILEO_CNAV_MT1_HEADER_BITS = 32;
73 
74 constexpr int32_t HAS_MSG_MAX_SATS = 40;
75 constexpr int32_t HAS_MSG_MAX_SIGNALS = 16;
76 
77 constexpr uint8_t HAS_MSG_GPS_SYSTEM = 0; // Table 8 ICD
78 constexpr uint8_t HAS_MSG_GALILEO_SYSTEM = 2; // Table 8 ICD
79 
80 constexpr char GALILEO_CNAV_PREAMBLE[17] = "1011011101110000";
81 
82 const std::pair<int32_t, int32_t> GALILEO_HAS_STATUS({1, 2});
83 const std::pair<int32_t, int32_t> GALILEO_HAS_MESSAGE_TYPE({5, 2});
84 const std::pair<int32_t, int32_t> GALILEO_HAS_MESSAGE_ID({7, 5});
85 const std::pair<int32_t, int32_t> GALILEO_HAS_MESSAGE_SIZE({12, 5});
86 const std::pair<int32_t, int32_t> GALILEO_HAS_MESSAGE_PAGE_ID({17, 8});
87 
88 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_TOH({1, 12});
89 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_MASK_FLAG({13, 1});
90 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_ORBIT_CORRECTION_FLAG({14, 1});
91 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_CLOCK_FULLSET_FLAG({15, 1});
92 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_CLOCK_SUBSET_FLAG({16, 1});
93 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_CODE_BIAS_FLAG({17, 1});
94 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_PHASE_BIAS_FLAG({18, 1});
95 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_URA_FLAG({19, 1});
96 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_MASK_ID({23, 5});
97 const std::pair<int32_t, int32_t> GALILEO_MT1_HEADER_IOD_ID({28, 5});
98 
99 
100 /** \} */
101 /** \} */
102 #endif // GNSS_SDR_GALILEO_CNAV_H
constexpr int32_t GALILEO_CNAV_SYMBOLS_PER_PAGE
Total numer of symbols per HAS page including the sync pattern.
Definition: Galileo_CNAV.h:57
constexpr int32_t GALILEO_CNAV_PAGE_MS
Duration in ms of a CNAV page.
Definition: Galileo_CNAV.h:59