1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-16 12:12:57 +00:00

Make use of cstdint typedefs, fix warning, remove unused variable

This commit is contained in:
Carles Fernandez 2019-02-10 12:40:03 +01:00
parent 111c0eec11
commit a6b94eaccf
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 225 additions and 227 deletions

View File

@ -8,7 +8,7 @@
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -73,7 +73,6 @@ beidou_b1i_telemetry_decoder_cc::beidou_b1i_telemetry_decoder_cc(
d_secondary_code_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(BEIDOU_B1I_SECONDARY_CODE_LENGTH * sizeof(int32_t), volk_gnsssdr_get_alignment())); d_secondary_code_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(BEIDOU_B1I_SECONDARY_CODE_LENGTH * sizeof(int32_t), volk_gnsssdr_get_alignment()));
d_preamble_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment())); d_preamble_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment()));
d_preamble_period_samples = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * d_samples_per_symbol; d_preamble_period_samples = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * d_samples_per_symbol;
d_subframe_length_symbols = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS;
// Setting samples of secondary code // Setting samples of secondary code
for (int32_t i = 0; i < BEIDOU_B1I_SECONDARY_CODE_LENGTH; i++) for (int32_t i = 0; i < BEIDOU_B1I_SECONDARY_CODE_LENGTH; i++)
@ -115,7 +114,7 @@ beidou_b1i_telemetry_decoder_cc::beidou_b1i_telemetry_decoder_cc(
} }
} }
d_subframe_symbols = static_cast<double *>(volk_gnsssdr_malloc(d_subframe_length_symbols * sizeof(double), volk_gnsssdr_get_alignment())); d_subframe_symbols = static_cast<double *>(volk_gnsssdr_malloc(BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * sizeof(double), volk_gnsssdr_get_alignment()));
d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol + d_samples_per_preamble; d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol + d_samples_per_preamble;
// Generic settings // Generic settings
@ -154,15 +153,15 @@ beidou_b1i_telemetry_decoder_cc::~beidou_b1i_telemetry_decoder_cc()
void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(const int32_t *bits, int32_t *decbits) void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(const int32_t *bits, int32_t *decbits)
{ {
int bit, err, reg[4] = {1, 1, 1, 1}; int32_t bit, err, reg[4] = {1, 1, 1, 1};
int errind[15] = {14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2}; int32_t errind[15] = {14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
for (unsigned int i = 0; i < 15; i++) for (uint32_t i = 0; i < 15; i++)
{ {
decbits[i] = bits[i]; decbits[i] = bits[i];
} }
for (unsigned int i = 0; i < 15; i++) for (uint32_t i = 0; i < 15; i++)
{ {
bit = reg[3]; bit = reg[3];
reg[3] = reg[2]; reg[3] = reg[2];
@ -180,6 +179,7 @@ void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(const int32_t *bits, in
} }
} }
void beidou_b1i_telemetry_decoder_cc::decode_word( void beidou_b1i_telemetry_decoder_cc::decode_word(
int32_t word_counter, int32_t word_counter,
const double *enc_word_symbols, const double *enc_word_symbols,
@ -189,31 +189,31 @@ void beidou_b1i_telemetry_decoder_cc::decode_word(
if (word_counter == 1) if (word_counter == 1)
{ {
for (unsigned int j = 0; j < 30; j++) for (uint32_t j = 0; j < 30; j++)
{ {
dec_word_symbols[j] = (int32_t)(enc_word_symbols[j] > 0) ? (1) : (-1); dec_word_symbols[j] = static_cast<int32_t>(enc_word_symbols[j] > 0) ? (1) : (-1);
} }
} }
else else
{ {
for (unsigned int r = 0; r < 2; r++) for (uint32_t r = 0; r < 2; r++)
{ {
for (unsigned int c = 0; c < 15; c++) for (uint32_t c = 0; c < 15; c++)
{ {
bitsbch[r * 15 + c] = (int32_t)(enc_word_symbols[c * 2 + r] > 0) ? (1) : (-1); bitsbch[r * 15 + c] = static_cast<int32_t>(enc_word_symbols[c * 2 + r] > 0) ? (1) : (-1);
} }
} }
decode_bch15_11_01(&bitsbch[0], first_branch); decode_bch15_11_01(&bitsbch[0], first_branch);
decode_bch15_11_01(&bitsbch[15], second_branch); decode_bch15_11_01(&bitsbch[15], second_branch);
for (unsigned int j = 0; j < 11; j++) for (uint32_t j = 0; j < 11; j++)
{ {
dec_word_symbols[j] = first_branch[j]; dec_word_symbols[j] = first_branch[j];
dec_word_symbols[j + 11] = second_branch[j]; dec_word_symbols[j + 11] = second_branch[j];
} }
for (unsigned int j = 0; j < 4; j++) for (uint32_t j = 0; j < 4; j++)
{ {
dec_word_symbols[j + 22] = first_branch[11 + j]; dec_word_symbols[j + 22] = first_branch[11 + j];
dec_word_symbols[j + 26] = second_branch[11 + j]; dec_word_symbols[j + 26] = second_branch[11 + j];
@ -222,7 +222,7 @@ void beidou_b1i_telemetry_decoder_cc::decode_word(
} }
void beidou_b1i_telemetry_decoder_cc::decode_subframe(double *frame_symbols, int32_t frame_length) void beidou_b1i_telemetry_decoder_cc::decode_subframe(double *frame_symbols)
{ {
// 1. Transform from symbols to bits // 1. Transform from symbols to bits
std::string data_bits; std::string data_bits;
@ -287,7 +287,7 @@ void beidou_b1i_telemetry_decoder_cc::decode_subframe(double *frame_symbols, int
} }
if (d_nav.have_new_almanac() == true) if (d_nav.have_new_almanac() == true)
{ {
// unsigned int slot_nbr = d_nav.i_alm_satellite_PRN; // uint32_t slot_nbr = d_nav.i_alm_satellite_PRN;
// std::shared_ptr<Beidou_Dnav_Almanac> tmp_obj = std::make_shared<Beidou_Dnav_Almanac>(d_nav.get_almanac(slot_nbr)); // std::shared_ptr<Beidou_Dnav_Almanac> tmp_obj = std::make_shared<Beidou_Dnav_Almanac>(d_nav.get_almanac(slot_nbr));
// this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); // this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "BEIDOU DNAV Almanac have been received in channel" << d_channel << " from satellite " << d_satellite << std::endl; LOG(INFO) << "BEIDOU DNAV Almanac have been received in channel" << d_channel << " from satellite " << d_satellite << std::endl;
@ -321,7 +321,6 @@ void beidou_b1i_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satell
d_secondary_code_symbols = nullptr; d_secondary_code_symbols = nullptr;
d_preamble_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment())); d_preamble_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment()));
d_preamble_period_samples = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * d_samples_per_symbol; d_preamble_period_samples = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * d_samples_per_symbol;
d_subframe_length_symbols = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS;
// Setting samples of preamble code // Setting samples of preamble code
int32_t n = 0; int32_t n = 0;
@ -345,13 +344,13 @@ void beidou_b1i_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satell
} }
} }
d_subframe_symbols = static_cast<double *>(volk_gnsssdr_malloc(d_subframe_length_symbols * sizeof(double), volk_gnsssdr_get_alignment())); d_subframe_symbols = static_cast<double *>(volk_gnsssdr_malloc(BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * sizeof(double), volk_gnsssdr_get_alignment()));
d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol + d_samples_per_preamble; d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol + d_samples_per_preamble;
} }
} }
void beidou_b1i_telemetry_decoder_cc::set_channel(int channel) void beidou_b1i_telemetry_decoder_cc::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
LOG(INFO) << "Navigation channel set to " << channel; LOG(INFO) << "Navigation channel set to " << channel;
@ -399,7 +398,7 @@ int beidou_b1i_telemetry_decoder_cc::general_work(int noutput_items __attribute_
if (d_symbol_history.size() > d_required_symbols) if (d_symbol_history.size() > d_required_symbols)
{ {
//******* preamble correlation ******** //******* preamble correlation ********
for (int i = 0; i < d_samples_per_preamble; i++) for (int32_t i = 0; i < d_samples_per_preamble; i++)
{ {
if (d_symbol_history.at(i) < 0) // symbols clipping if (d_symbol_history.at(i) < 0) // symbols clipping
{ {
@ -454,8 +453,8 @@ int beidou_b1i_telemetry_decoder_cc::general_work(int noutput_items __attribute_
// ******* SAMPLES TO SYMBOLS ******* // ******* SAMPLES TO SYMBOLS *******
if (corr_value > 0) //normal PLL lock if (corr_value > 0) //normal PLL lock
{ {
int k = 0; int32_t k = 0;
for (uint32_t i = 0; i < d_subframe_length_symbols; i++) for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++)
{ {
d_subframe_symbols[i] = 0; d_subframe_symbols[i] = 0;
// integrate samples into symbols // integrate samples into symbols
@ -478,8 +477,8 @@ int beidou_b1i_telemetry_decoder_cc::general_work(int noutput_items __attribute_
} }
else // 180 deg. inverted carrier phase PLL lock else // 180 deg. inverted carrier phase PLL lock
{ {
int k = 0; int32_t k = 0;
for (uint32_t i = 0; i < d_subframe_length_symbols; i++) for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++)
{ {
d_subframe_symbols[i] = 0; d_subframe_symbols[i] = 0;
// integrate samples into symbols // integrate samples into symbols
@ -502,7 +501,7 @@ int beidou_b1i_telemetry_decoder_cc::general_work(int noutput_items __attribute_
} }
// call the decoder // call the decoder
decode_subframe(d_subframe_symbols, d_subframe_length_symbols); decode_subframe(d_subframe_symbols);
if (d_nav.flag_crc_test == true) if (d_nav.flag_crc_test == true)
{ {
@ -565,11 +564,11 @@ int beidou_b1i_telemetry_decoder_cc::general_work(int noutput_items __attribute_
try try
{ {
double tmp_double; double tmp_double;
unsigned long int tmp_ulong_int; uint64_t tmp_ulong_int;
tmp_double = d_TOW_at_current_symbol_ms; tmp_double = d_TOW_at_current_symbol_ms;
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_ulong_int = current_symbol.Tracking_sample_counter; tmp_ulong_int = current_symbol.Tracking_sample_counter;
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int)); d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
tmp_double = 0; tmp_double = 0;
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
} }

View File

@ -9,7 +9,7 @@
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -78,13 +78,12 @@ private:
beidou_b1i_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); beidou_b1i_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);
beidou_b1i_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); beidou_b1i_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);
void decode_subframe(double *symbols, int32_t frame_length); void decode_subframe(double *symbols);
void decode_word(int32_t word_counter, const double *enc_word_symbols, int32_t *dec_word_symbols); void decode_word(int32_t word_counter, const double *enc_word_symbols, int32_t *dec_word_symbols);
void decode_bch15_11_01(const int32_t *bits, int32_t *decbits); void decode_bch15_11_01(const int32_t *bits, int32_t *decbits);
//!< Preamble decoding // Preamble decoding
unsigned short int d_preambles_symbols[BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS];
int32_t *d_preamble_samples; int32_t *d_preamble_samples;
int32_t *d_secondary_code_symbols; int32_t *d_secondary_code_symbols;
uint32_t d_samples_per_symbol; uint32_t d_samples_per_symbol;
@ -92,20 +91,19 @@ private:
int32_t d_samples_per_preamble; int32_t d_samples_per_preamble;
int32_t d_preamble_period_samples; int32_t d_preamble_period_samples;
double *d_subframe_symbols; double *d_subframe_symbols;
uint32_t d_subframe_length_symbols;
uint32_t d_required_symbols; uint32_t d_required_symbols;
//!< Storage for incoming data // Storage for incoming data
std::deque<float> d_symbol_history; std::deque<float> d_symbol_history;
//!< Variables for internal functionality // Variables for internal functionality
uint64_t d_sample_counter; //!< Sample counter as an index (1,2,3,..etc) indicating number of samples processed uint64_t d_sample_counter; // Sample counter as an index (1,2,3,..etc) indicating number of samples processed
uint64_t d_preamble_index; //!< Index of sample number where preamble was found uint64_t d_preamble_index; // Index of sample number where preamble was found
uint32_t d_stat; //!< Status of decoder uint32_t d_stat; // Status of decoder
bool d_flag_frame_sync; //!< Indicate when a frame sync is achieved bool d_flag_frame_sync; // Indicate when a frame sync is achieved
bool d_flag_preamble; //!< Flag indicating when preamble was found bool d_flag_preamble; // Flag indicating when preamble was found
int32_t d_CRC_error_counter; //!< Number of failed CRC operations int32_t d_CRC_error_counter; // Number of failed CRC operations
bool flag_SOW_set; //!< Indicates when time of week is set bool flag_SOW_set; // Indicates when time of week is set
//!< Navigation Message variable //!< Navigation Message variable
Beidou_Dnav_Navigation_Message d_nav; Beidou_Dnav_Navigation_Message d_nav;

View File

@ -33,6 +33,7 @@
#define GNSS_SDR_BEIDOU_B1I_H_ #define GNSS_SDR_BEIDOU_B1I_H_
#include "MATH_CONSTANTS.h" #include "MATH_CONSTANTS.h"
#include <cstdint>
#include <utility> // std::pair #include <utility> // std::pair
#include <vector> #include <vector>
@ -51,9 +52,9 @@ const double BEIDOU_B1I_FREQ_HZ = 1.561098e9; //!< b1I [Hz]
const double BEIDOU_B1I_CODE_RATE_HZ = 2.046e6; //!< beidou b1I code rate [chips/s] const double BEIDOU_B1I_CODE_RATE_HZ = 2.046e6; //!< beidou b1I code rate [chips/s]
const double BEIDOU_B1I_CODE_LENGTH_CHIPS = 2046.0; //!< beidou b1I code length [chips] const double BEIDOU_B1I_CODE_LENGTH_CHIPS = 2046.0; //!< beidou b1I code length [chips]
const double BEIDOU_B1I_CODE_PERIOD = 0.001; //!< beidou b1I code period [seconds] const double BEIDOU_B1I_CODE_PERIOD = 0.001; //!< beidou b1I code period [seconds]
const unsigned int BEIDOU_B1I_CODE_PERIOD_MS = 1; //!< GPS L1 C/A code period [ms] const uint32_t BEIDOU_B1I_CODE_PERIOD_MS = 1; //!< beidou b1I L1 C/A code period [ms]
const double BEIDOU_B1I_CHIP_PERIOD = 4.8875e-07; //!< beidou b1I chip period [seconds] const double BEIDOU_B1I_CHIP_PERIOD = 4.8875e-07; //!< beidou b1I chip period [seconds]
const int BEIDOU_B1I_SECONDARY_CODE_LENGTH = 20; const int32_t BEIDOU_B1I_SECONDARY_CODE_LENGTH = 20;
const std::string BEIDOU_B1I_SECONDARY_CODE = "00000100110101001110"; const std::string BEIDOU_B1I_SECONDARY_CODE = "00000100110101001110";
const std::string BEIDOU_B1I_SECONDARY_CODE_STR = "00000100110101001110"; const std::string BEIDOU_B1I_SECONDARY_CODE_STR = "00000100110101001110";
const std::string BEIDOU_B1I_D2_SECONDARY_CODE_STR = "00"; const std::string BEIDOU_B1I_D2_SECONDARY_CODE_STR = "00";
@ -73,29 +74,29 @@ const double BEIDOU_STARTOFFSET_ms = 68.802; //**************[ms] Initial sign.
// OBSERVABLE HISTORY DEEP FOR INTERPOLATION // OBSERVABLE HISTORY DEEP FOR INTERPOLATION
const int BEIDOU_B1I_HISTORY_DEEP = 100; // **************** const int32_t BEIDOU_B1I_HISTORY_DEEP = 100; // ****************
// NAVIGATION MESSAGE DEMODULATION AND DECODING // NAVIGATION MESSAGE DEMODULATION AND DECODING
const int BEIDOU_B1I_PREAMBLE_LENGTH_BITS = 11; const int32_t BEIDOU_B1I_PREAMBLE_LENGTH_BITS = 11;
const int BEIDOU_B1I_PREAMBLE_LENGTH_SYMBOLS = 220; // ************** const int32_t BEIDOU_B1I_PREAMBLE_LENGTH_SYMBOLS = 220; // **************
const double BEIDOU_B1I_PREAMBLE_DURATION_S = 0.220; const double BEIDOU_B1I_PREAMBLE_DURATION_S = 0.220;
const int BEIDOU_B1I_PREAMBLE_DURATION_MS = 220; const int32_t BEIDOU_B1I_PREAMBLE_DURATION_MS = 220;
const int BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND = 50; //!< D1 NAV message bit rate [bits/s] const int32_t BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND = 50; //!< D1 NAV message bit rate [bits/s]
const int BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT = 20; // ************* const int32_t BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT = 20; // *************
const int BEIDOU_B1I_TELEMETRY_RATE_SYMBOLS_SECOND = BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND * BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT; //************!< NAV message bit rate [symbols/s] const int32_t BEIDOU_B1I_TELEMETRY_RATE_SYMBOLS_SECOND = BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND * BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT; //************!< NAV message bit rate [symbols/s]
const int BEIDOU_WORD_LENGTH = 4; //**************!< CRC + BEIDOU WORD (-2 -1 0 ... 29) Bits = 4 bytes const int32_t BEIDOU_WORD_LENGTH = 4; //**************!< CRC + BEIDOU WORD (-2 -1 0 ... 29) Bits = 4 bytes
const int BEIDOU_SUBFRAME_LENGTH = 40; //**************!< BEIDOU_WORD_LENGTH x 10 = 40 bytes const int32_t BEIDOU_SUBFRAME_LENGTH = 40; //**************!< BEIDOU_WORD_LENGTH x 10 = 40 bytes
const int BEIDOU_DNAV_SUBFRAME_DATA_BITS = 300; //!< Number of bits per subframe in the NAV message [bits] const int32_t BEIDOU_DNAV_SUBFRAME_DATA_BITS = 300; //!< Number of bits per subframe in the NAV message [bits]
const int BEIDOU_SUBFRAME_SECONDS = 6; //!< Subframe duration [seconds] const int32_t BEIDOU_SUBFRAME_SECONDS = 6; //!< Subframe duration [seconds]
const int BEIDOU_SUBFRAME_MS = 6000; //!< Subframe duration [miliseconds] const int32_t BEIDOU_SUBFRAME_MS = 6000; //!< Subframe duration [miliseconds]
const int BEIDOU_WORD_BITS = 30; //!< Number of bits per word in the NAV message [bits] const int32_t BEIDOU_WORD_BITS = 30; //!< Number of bits per word in the NAV message [bits]
const std::string BEIDOU_DNAV_PREAMBLE = "11100010010"; const std::string BEIDOU_DNAV_PREAMBLE = "11100010010";
const int BEIDOU_DNAV_PREAMBLE_LENGTH_BITS = 11; const int32_t BEIDOU_DNAV_PREAMBLE_LENGTH_BITS = 11;
const int BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS = 11; // ************** const int32_t BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS = 11; // **************
const double BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS = 300; const uint32_t BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS = 300;
const double BEIDOU_DNAV_SUBFRAME_SYMBOLS = 300; const uint32_t BEIDOU_DNAV_SUBFRAME_SYMBOLS = 300;
const double BEIDOU_DNAV_DATA_BITS = 300; const double BEIDOU_DNAV_DATA_BITS = 300;
const double BEIDOU_DNAV_WORDS_SUBFRAME = 10; const double BEIDOU_DNAV_WORDS_SUBFRAME = 10;
const double BEIDOU_DNAV_WORD_LENGTH_BITS = 30; const double BEIDOU_DNAV_WORD_LENGTH_BITS = 30;
@ -106,10 +107,10 @@ const double BEIDOU_B1I_PREAMBLE_PERIOD_SYMBOLS = 300;
// BEIDOU D1 NAVIGATION MESSAGE STRUCTURE // BEIDOU D1 NAVIGATION MESSAGE STRUCTURE
// GENERAL // GENERAL
const std::vector<std::pair<int, int> > D1_PRE({{1, 11}}); const std::vector<std::pair<int32_t, int32_t> > D1_PRE({{1, 11}});
const std::vector<std::pair<int, int> > D1_FRAID({{16, 3}}); const std::vector<std::pair<int32_t, int32_t> > D1_FRAID({{16, 3}});
const std::vector<std::pair<int, int> > D1_SOW({{19, 8}, {31, 12}}); const std::vector<std::pair<int32_t, int32_t> > D1_SOW({{19, 8}, {31, 12}});
const std::vector<std::pair<int, int> > D1_PNUM({{44, 7}}); const std::vector<std::pair<int32_t, int32_t> > D1_PNUM({{44, 7}});
// DNAV SCALE FACTORS // DNAV SCALE FACTORS
// EPH // EPH
@ -164,183 +165,183 @@ const double D1_A0UTC_LSB = TWO_N30;
const double D1_A1UTC_LSB = TWO_N50; const double D1_A1UTC_LSB = TWO_N50;
// SUBFRAME 1 // SUBFRAME 1
const std::vector<std::pair<int, int> > D1_SAT_H1({{43, 1}}); const std::vector<std::pair<int32_t, int32_t> > D1_SAT_H1({{43, 1}});
const std::vector<std::pair<int, int> > D1_AODC({{44, 5}}); const std::vector<std::pair<int32_t, int32_t> > D1_AODC({{44, 5}});
const std::vector<std::pair<int, int> > D1_URAI({{49, 4}}); const std::vector<std::pair<int32_t, int32_t> > D1_URAI({{49, 4}});
const std::vector<std::pair<int, int> > D1_WN({{61, 13}}); const std::vector<std::pair<int32_t, int32_t> > D1_WN({{61, 13}});
const std::vector<std::pair<int, int> > D1_TOC({{74, 9}, {91, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_TOC({{74, 9}, {91, 8}});
const std::vector<std::pair<int, int> > D1_TGD1({{99, 10}}); const std::vector<std::pair<int32_t, int32_t> > D1_TGD1({{99, 10}});
const std::vector<std::pair<int, int> > D1_TGD2({{121, 6}}); const std::vector<std::pair<int32_t, int32_t> > D1_TGD2({{121, 6}});
const std::vector<std::pair<int, int> > D1_ALPHA0({{127, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA0({{127, 8}});
const std::vector<std::pair<int, int> > D1_ALPHA1({{135, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA1({{135, 8}});
const std::vector<std::pair<int, int> > D1_ALPHA2({{151, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA2({{151, 8}});
const std::vector<std::pair<int, int> > D1_ALPHA3({{159, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA3({{159, 8}});
const std::vector<std::pair<int, int> > D1_BETA0({{167, 6}, {181, 2}}); const std::vector<std::pair<int32_t, int32_t> > D1_BETA0({{167, 6}, {181, 2}});
const std::vector<std::pair<int, int> > D1_BETA1({{183, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_BETA1({{183, 8}});
const std::vector<std::pair<int, int> > D1_BETA2({{191, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_BETA2({{191, 8}});
const std::vector<std::pair<int, int> > D1_BETA3({{199, 4}, {211, 4}}); const std::vector<std::pair<int32_t, int32_t> > D1_BETA3({{199, 4}, {211, 4}});
const std::vector<std::pair<int, int> > D1_A2({{215, 11}}); const std::vector<std::pair<int32_t, int32_t> > D1_A2({{215, 11}});
const std::vector<std::pair<int, int> > D1_A0({{226, 7}, {241, 17}}); const std::vector<std::pair<int32_t, int32_t> > D1_A0({{226, 7}, {241, 17}});
const std::vector<std::pair<int, int> > D1_A1({{258, 5}, {271, 17}}); const std::vector<std::pair<int32_t, int32_t> > D1_A1({{258, 5}, {271, 17}});
const std::vector<std::pair<int, int> > D1_AODE({{288, 5}}); const std::vector<std::pair<int32_t, int32_t> > D1_AODE({{288, 5}});
//SUBFRAME 2 //SUBFRAME 2
const std::vector<std::pair<int, int> > D1_DELTA_N({{43, 10}, {61, 6}}); const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_N({{43, 10}, {61, 6}});
const std::vector<std::pair<int, int> > D1_CUC({{67, 16}, {91, 2}}); const std::vector<std::pair<int32_t, int32_t> > D1_CUC({{67, 16}, {91, 2}});
const std::vector<std::pair<int, int> > D1_M0({{93, 20}, {121, 12}}); const std::vector<std::pair<int32_t, int32_t> > D1_M0({{93, 20}, {121, 12}});
const std::vector<std::pair<int, int> > D1_E({{133, 10}, {151, 22}}); const std::vector<std::pair<int32_t, int32_t> > D1_E({{133, 10}, {151, 22}});
const std::vector<std::pair<int, int> > D1_CUS({{181, 18}}); const std::vector<std::pair<int32_t, int32_t> > D1_CUS({{181, 18}});
const std::vector<std::pair<int, int> > D1_CRC({{199, 4}, {211, 14}}); const std::vector<std::pair<int32_t, int32_t> > D1_CRC({{199, 4}, {211, 14}});
const std::vector<std::pair<int, int> > D1_CRS({{225, 8}, {241, 10}}); const std::vector<std::pair<int32_t, int32_t> > D1_CRS({{225, 8}, {241, 10}});
const std::vector<std::pair<int, int> > D1_SQRT_A({{251, 12}, {271, 20}}); const std::vector<std::pair<int32_t, int32_t> > D1_SQRT_A({{251, 12}, {271, 20}});
const std::vector<std::pair<int, int> > D1_TOE_SF2({{291, 2}}); const std::vector<std::pair<int32_t, int32_t> > D1_TOE_SF2({{291, 2}});
//SUBFRAME 3 //SUBFRAME 3
const std::vector<std::pair<int, int> > D1_TOE_SF3({{43, 10}, {61, 5}}); const std::vector<std::pair<int32_t, int32_t> > D1_TOE_SF3({{43, 10}, {61, 5}});
const std::vector<std::pair<int, int> > D1_I0({{66, 17}, {91, 15}}); const std::vector<std::pair<int32_t, int32_t> > D1_I0({{66, 17}, {91, 15}});
const std::vector<std::pair<int, int> > D1_CIC({{106, 7}, {121, 11}}); const std::vector<std::pair<int32_t, int32_t> > D1_CIC({{106, 7}, {121, 11}});
const std::vector<std::pair<int, int> > D1_OMEGA_DOT({{132, 11}, {151, 13}}); const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_DOT({{132, 11}, {151, 13}});
const std::vector<std::pair<int, int> > D1_CIS({{164, 9}, {181, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_CIS({{164, 9}, {181, 9}});
const std::vector<std::pair<int, int> > D1_IDOT({{190, 13}, {211, 1}}); const std::vector<std::pair<int32_t, int32_t> > D1_IDOT({{190, 13}, {211, 1}});
const std::vector<std::pair<int, int> > D1_OMEGA0({{212, 21}, {241, 11}}); const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA0({{212, 21}, {241, 11}});
const std::vector<std::pair<int, int> > D1_OMEGA({{252, 11}, {271, 21}}); const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA({{252, 11}, {271, 21}});
//SUBFRAME 4 AND PAGES 1 THROUGH 6 IN SUBFRAME 5 //SUBFRAME 4 AND PAGES 1 THROUGH 6 IN SUBFRAME 5
const std::vector<std::pair<int, int> > D1_SQRT_A_ALMANAC({{51, 2}, {61, 22}}); const std::vector<std::pair<int32_t, int32_t> > D1_SQRT_A_ALMANAC({{51, 2}, {61, 22}});
const std::vector<std::pair<int, int> > D1_A1_ALMANAC({{91, 11}}); const std::vector<std::pair<int32_t, int32_t> > D1_A1_ALMANAC({{91, 11}});
const std::vector<std::pair<int, int> > D1_A0_ALMANAC({{102, 11}}); const std::vector<std::pair<int32_t, int32_t> > D1_A0_ALMANAC({{102, 11}});
const std::vector<std::pair<int, int> > D1_OMEGA0_ALMANAC({{121, 22}, {151, 2}}); const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA0_ALMANAC({{121, 22}, {151, 2}});
const std::vector<std::pair<int, int> > D1_E_ALMANAC({{153, 17}}); const std::vector<std::pair<int32_t, int32_t> > D1_E_ALMANAC({{153, 17}});
const std::vector<std::pair<int, int> > D1_DELTA_I({{170, 3}, {181, 13}}); const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_I({{170, 3}, {181, 13}});
const std::vector<std::pair<int, int> > D1_TOA({{194, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_TOA({{194, 8}});
const std::vector<std::pair<int, int> > D1_OMEGA_DOT_ALMANAC({{202, 1}, {211, 16}}); const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_DOT_ALMANAC({{202, 1}, {211, 16}});
const std::vector<std::pair<int, int> > D1_OMEGA_ALMANAC({{227, 6}, {241, 18}}); const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_ALMANAC({{227, 6}, {241, 18}});
const std::vector<std::pair<int, int> > D1_M0_ALMANAC({{259, 4}, {271, 20}}); const std::vector<std::pair<int32_t, int32_t> > D1_M0_ALMANAC({{259, 4}, {271, 20}});
//SUBFRAME 5 PAGE 7 //SUBFRAME 5 PAGE 7
const std::vector<std::pair<int, int> > D1_HEA1({{51, 2}, {61, 7}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA1({{51, 2}, {61, 7}});
const std::vector<std::pair<int, int> > D1_HEA2({{68, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA2({{68, 9}});
const std::vector<std::pair<int, int> > D1_HEA3({{77, 6}, {91, 3}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA3({{77, 6}, {91, 3}});
const std::vector<std::pair<int, int> > D1_HEA4({{94, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA4({{94, 9}});
const std::vector<std::pair<int, int> > D1_HEA5({{103, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA5({{103, 9}});
const std::vector<std::pair<int, int> > D1_HEA6({{112, 1}, {121, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA6({{112, 1}, {121, 8}});
const std::vector<std::pair<int, int> > D1_HEA7({{129, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA7({{129, 9}});
const std::vector<std::pair<int, int> > D1_HEA8({{138, 5}, {151, 4}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA8({{138, 5}, {151, 4}});
const std::vector<std::pair<int, int> > D1_HEA9({{155, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA9({{155, 9}});
const std::vector<std::pair<int, int> > D1_HEA10({{164, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA10({{164, 9}});
const std::vector<std::pair<int, int> > D1_HEA11({{181, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA11({{181, 9}});
const std::vector<std::pair<int, int> > D1_HEA12({{190, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA12({{190, 9}});
const std::vector<std::pair<int, int> > D1_HEA13({{199, 4}, {211, 5}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA13({{199, 4}, {211, 5}});
const std::vector<std::pair<int, int> > D1_HEA14({{216, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA14({{216, 9}});
const std::vector<std::pair<int, int> > D1_HEA15({{225, 8}, {241, 1}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA15({{225, 8}, {241, 1}});
const std::vector<std::pair<int, int> > D1_HEA16({{242, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA16({{242, 9}});
const std::vector<std::pair<int, int> > D1_HEA17({{251, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA17({{251, 9}});
const std::vector<std::pair<int, int> > D1_HEA18({{260, 3}, {271, 6}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA18({{260, 3}, {271, 6}});
const std::vector<std::pair<int, int> > D1_HEA19({{277, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA19({{277, 9}});
//SUBFRAME 5 PAGE 8 //SUBFRAME 5 PAGE 8
const std::vector<std::pair<int, int> > D1_HEA20({{51, 2}, {61, 7}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA20({{51, 2}, {61, 7}});
const std::vector<std::pair<int, int> > D1_HEA21({{68, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA21({{68, 9}});
const std::vector<std::pair<int, int> > D1_HEA22({{77, 6}, {91, 3}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA22({{77, 6}, {91, 3}});
const std::vector<std::pair<int, int> > D1_HEA23({{94, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA23({{94, 9}});
const std::vector<std::pair<int, int> > D1_HEA24({{103, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA24({{103, 9}});
const std::vector<std::pair<int, int> > D1_HEA25({{112, 1}, {121, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA25({{112, 1}, {121, 8}});
const std::vector<std::pair<int, int> > D1_HEA26({{129, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA26({{129, 9}});
const std::vector<std::pair<int, int> > D1_HEA27({{138, 5}, {151, 4}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA27({{138, 5}, {151, 4}});
const std::vector<std::pair<int, int> > D1_HEA28({{155, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA28({{155, 9}});
const std::vector<std::pair<int, int> > D1_HEA29({{164, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA29({{164, 9}});
const std::vector<std::pair<int, int> > D1_HEA30({{181, 9}}); const std::vector<std::pair<int32_t, int32_t> > D1_HEA30({{181, 9}});
const std::vector<std::pair<int, int> > D1_WNA({{190, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_WNA({{190, 8}});
const std::vector<std::pair<int, int> > D1_TOA2({{198, 5}, {211, 3}}); const std::vector<std::pair<int32_t, int32_t> > D1_TOA2({{198, 5}, {211, 3}});
//SUBFRAME 5 PAGE 9 //SUBFRAME 5 PAGE 9
const std::vector<std::pair<int, int> > D1_A0GPS({{97, 14}}); const std::vector<std::pair<int32_t, int32_t> > D1_A0GPS({{97, 14}});
const std::vector<std::pair<int, int> > D1_A1GPS({{111, 2}, {121, 14}}); const std::vector<std::pair<int32_t, int32_t> > D1_A1GPS({{111, 2}, {121, 14}});
const std::vector<std::pair<int, int> > D1_A0GAL({{135, 8}, {151, 6}}); const std::vector<std::pair<int32_t, int32_t> > D1_A0GAL({{135, 8}, {151, 6}});
const std::vector<std::pair<int, int> > D1_A1GAL({{157, 16}}); const std::vector<std::pair<int32_t, int32_t> > D1_A1GAL({{157, 16}});
const std::vector<std::pair<int, int> > D1_A0GLO({{181, 14}}); const std::vector<std::pair<int32_t, int32_t> > D1_A0GLO({{181, 14}});
const std::vector<std::pair<int, int> > D1_A1GLO({{195, 8}, {211, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_A1GLO({{195, 8}, {211, 8}});
//SUBFRAME 5 PAGE 10 //SUBFRAME 5 PAGE 10
const std::vector<std::pair<int, int> > D1_DELTA_T_LS({{51, 2}, {61, 6}}); const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_T_LS({{51, 2}, {61, 6}});
const std::vector<std::pair<int, int> > D1_DELTA_T_LSF({{67, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_T_LSF({{67, 8}});
const std::vector<std::pair<int, int> > D1_WN_LSF({{75, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_WN_LSF({{75, 8}});
const std::vector<std::pair<int, int> > D1_A0UTC({{91, 22}, {121, 10}}); const std::vector<std::pair<int32_t, int32_t> > D1_A0UTC({{91, 22}, {121, 10}});
const std::vector<std::pair<int, int> > D1_A1UTC({{131, 12}, {151, 12}}); const std::vector<std::pair<int32_t, int32_t> > D1_A1UTC({{131, 12}, {151, 12}});
const std::vector<std::pair<int, int> > D1_DN({{163, 8}}); const std::vector<std::pair<int32_t, int32_t> > D1_DN({{163, 8}});
// D2 NAV Message Decoding Information // D2 NAV Message Decoding Information
const std::vector<std::pair<int, int> > D2_PRE({{1, 11}}); const std::vector<std::pair<int32_t, int32_t> > D2_PRE({{1, 11}});
const std::vector<std::pair<int, int> > D2_FRAID({{16, 3}}); const std::vector<std::pair<int32_t, int32_t> > D2_FRAID({{16, 3}});
const std::vector<std::pair<int, int> > D2_SOW({{19, 8}, {31, 12}}); const std::vector<std::pair<int32_t, int32_t> > D2_SOW({{19, 8}, {31, 12}});
const std::vector<std::pair<int, int> > D2_PNUM({{43, 4}}); const std::vector<std::pair<int32_t, int32_t> > D2_PNUM({{43, 4}});
// D2 NAV, SUBFRAME 1, PAGE 1 // D2 NAV, SUBFRAME 1, PAGE 1
const std::vector<std::pair<int, int> > D2_SAT_H1({{47, 1}}); const std::vector<std::pair<int32_t, int32_t> > D2_SAT_H1({{47, 1}});
const std::vector<std::pair<int, int> > D2_AODC({{48, 5}}); const std::vector<std::pair<int32_t, int32_t> > D2_AODC({{48, 5}});
const std::vector<std::pair<int, int> > D2_URAI({{61, 4}}); const std::vector<std::pair<int32_t, int32_t> > D2_URAI({{61, 4}});
const std::vector<std::pair<int, int> > D2_WN({{65, 13}}); const std::vector<std::pair<int32_t, int32_t> > D2_WN({{65, 13}});
const std::vector<std::pair<int, int> > D2_TOC({{78, 5}, {91, 12}}); const std::vector<std::pair<int32_t, int32_t> > D2_TOC({{78, 5}, {91, 12}});
const std::vector<std::pair<int, int> > D2_TGD1({{103, 10}}); const std::vector<std::pair<int32_t, int32_t> > D2_TGD1({{103, 10}});
const std::vector<std::pair<int, int> > D2_TGD2({{121, 10}}); const std::vector<std::pair<int32_t, int32_t> > D2_TGD2({{121, 10}});
// D2 NAV, SUBFRAME 1, PAGE 2 // D2 NAV, SUBFRAME 1, PAGE 2
const std::vector<std::pair<int, int> > D2_ALPHA0({{47, 6}, {61, 2}}); const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA0({{47, 6}, {61, 2}});
const std::vector<std::pair<int, int> > D2_ALPHA1({{63, 8}}); const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA1({{63, 8}});
const std::vector<std::pair<int, int> > D2_ALPHA2({{71, 8}}); const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA2({{71, 8}});
const std::vector<std::pair<int, int> > D2_ALPHA3({{79, 4}, {91, 4}}); const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA3({{79, 4}, {91, 4}});
const std::vector<std::pair<int, int> > D2_BETA0({{95, 8}}); const std::vector<std::pair<int32_t, int32_t> > D2_BETA0({{95, 8}});
const std::vector<std::pair<int, int> > D2_BETA1({{103, 8}}); const std::vector<std::pair<int32_t, int32_t> > D2_BETA1({{103, 8}});
const std::vector<std::pair<int, int> > D2_BETA2({{111, 2}, {121, 6}}); const std::vector<std::pair<int32_t, int32_t> > D2_BETA2({{111, 2}, {121, 6}});
const std::vector<std::pair<int, int> > D2_BETA3({{127, 8}}); const std::vector<std::pair<int32_t, int32_t> > D2_BETA3({{127, 8}});
// D2 NAV, SUBFRAME 1, PAGE 3 // D2 NAV, SUBFRAME 1, PAGE 3
const std::vector<std::pair<int, int> > D2_A0({{101, 12}, {121, 12}}); const std::vector<std::pair<int32_t, int32_t> > D2_A0({{101, 12}, {121, 12}});
const std::vector<std::pair<int, int> > D2_A1_MSB({{133, 4}}); const std::vector<std::pair<int32_t, int32_t> > D2_A1_MSB({{133, 4}});
const std::vector<std::pair<int, int> > D2_A1_LSB({{47, 6}, {61, 12}}); const std::vector<std::pair<int32_t, int32_t> > D2_A1_LSB({{47, 6}, {61, 12}});
const std::vector<std::pair<int, int> > D2_A1({{279, 22}}); const std::vector<std::pair<int32_t, int32_t> > D2_A1({{279, 22}});
// D2 NAV, SUBFRAME 1, PAGE 4 // D2 NAV, SUBFRAME 1, PAGE 4
const std::vector<std::pair<int, int> > D2_A2({{73, 10}, {91, 1}}); const std::vector<std::pair<int32_t, int32_t> > D2_A2({{73, 10}, {91, 1}});
const std::vector<std::pair<int, int> > D2_AODE({{92, 5}}); const std::vector<std::pair<int32_t, int32_t> > D2_AODE({{92, 5}});
const std::vector<std::pair<int, int> > D2_DELTA_N({{97, 16}}); const std::vector<std::pair<int32_t, int32_t> > D2_DELTA_N({{97, 16}});
const std::vector<std::pair<int, int> > D2_CUC_MSB({{121, 14}}); const std::vector<std::pair<int32_t, int32_t> > D2_CUC_MSB({{121, 14}});
const std::vector<std::pair<int, int> > D2_CUC_LSB({{47, 4}}); const std::vector<std::pair<int32_t, int32_t> > D2_CUC_LSB({{47, 4}});
const std::vector<std::pair<int, int> > D2_CUC({{283, 18}}); const std::vector<std::pair<int32_t, int32_t> > D2_CUC({{283, 18}});
// D2 NAV, SUBFRAME 1, PAGE 5 // D2 NAV, SUBFRAME 1, PAGE 5
const std::vector<std::pair<int, int> > D2_M0({{51, 2}, {61, 22}, {91, 8}}); const std::vector<std::pair<int32_t, int32_t> > D2_M0({{51, 2}, {61, 22}, {91, 8}});
const std::vector<std::pair<int, int> > D2_CUS({{99, 14}, {121, 4}}); const std::vector<std::pair<int32_t, int32_t> > D2_CUS({{99, 14}, {121, 4}});
const std::vector<std::pair<int, int> > D2_E_MSB({{125, 10}}); const std::vector<std::pair<int32_t, int32_t> > D2_E_MSB({{125, 10}});
// D2 NAV, SUBFRAME 1, PAGE 6 // D2 NAV, SUBFRAME 1, PAGE 6
const std::vector<std::pair<int, int> > D2_E_LSB({{47, 6}, {61, 16}}); const std::vector<std::pair<int32_t, int32_t> > D2_E_LSB({{47, 6}, {61, 16}});
const std::vector<std::pair<int, int> > D2_SQRT_A({{77, 6}, {91, 22}, {121, 4}}); const std::vector<std::pair<int32_t, int32_t> > D2_SQRT_A({{77, 6}, {91, 22}, {121, 4}});
const std::vector<std::pair<int, int> > D2_CIC_MSB({{125, 10}}); const std::vector<std::pair<int32_t, int32_t> > D2_CIC_MSB({{125, 10}});
const std::vector<std::pair<int, int> > D2_CIC_LSB({{47, 6}, {61, 2}}); const std::vector<std::pair<int32_t, int32_t> > D2_CIC_LSB({{47, 6}, {61, 2}});
const std::vector<std::pair<int, int> > D2_CIC({{283, 18}}); const std::vector<std::pair<int32_t, int32_t> > D2_CIC({{283, 18}});
// D2 NAV, SUBFRAME 1, PAGE 7 // D2 NAV, SUBFRAME 1, PAGE 7
const std::vector<std::pair<int, int> > D2_CIS({{63, 18}}); const std::vector<std::pair<int32_t, int32_t> > D2_CIS({{63, 18}});
const std::vector<std::pair<int, int> > D2_TOE({{81, 2}, {91, 15}}); const std::vector<std::pair<int32_t, int32_t> > D2_TOE({{81, 2}, {91, 15}});
const std::vector<std::pair<int, int> > D2_I0_MSB({{106, 7}, {121, 14}}); const std::vector<std::pair<int32_t, int32_t> > D2_I0_MSB({{106, 7}, {121, 14}});
const std::vector<std::pair<int, int> > D2_I0_LSB({{47, 6}, {61, 5}}); const std::vector<std::pair<int32_t, int32_t> > D2_I0_LSB({{47, 6}, {61, 5}});
const std::vector<std::pair<int, int> > D2_I0({{269, 32}}); const std::vector<std::pair<int32_t, int32_t> > D2_I0({{269, 32}});
// D2 NAV, SUBFRAME 1, PAGE 8 // D2 NAV, SUBFRAME 1, PAGE 8
const std::vector<std::pair<int, int> > D2_CRC({{66, 17}, {91, 1}}); const std::vector<std::pair<int32_t, int32_t> > D2_CRC({{66, 17}, {91, 1}});
const std::vector<std::pair<int, int> > D2_CRS({{92, 18}}); const std::vector<std::pair<int32_t, int32_t> > D2_CRS({{92, 18}});
const std::vector<std::pair<int, int> > D2_OMEGA_DOT_MSB({{110, 3}, {121, 16}}); const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT_MSB({{110, 3}, {121, 16}});
const std::vector<std::pair<int, int> > D2_OMEGA_DOT_LSB({{47, 5}}); const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT_LSB({{47, 5}});
const std::vector<std::pair<int, int> > D2_OMEGA_DOT({{277, 24}}); const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT({{277, 24}});
// D2 NAV, SUBFRAME 1, PAGE 9 // D2 NAV, SUBFRAME 1, PAGE 9
const std::vector<std::pair<int, int> > D2_OMEGA0({{52, 1}, {61, 22}, {91, 9}}); const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA0({{52, 1}, {61, 22}, {91, 9}});
const std::vector<std::pair<int, int> > D2_OMEGA_MSB({{100, 13}, {121, 14}}); const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_MSB({{100, 13}, {121, 14}});
const std::vector<std::pair<int, int> > D2_OMEGA_LSB({{47, 5}}); const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_LSB({{47, 5}});
const std::vector<std::pair<int, int> > D2_OMEGA({{269, 32}}); const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA({{269, 32}});
// D2 NAV, SUBFRAME 1, PAGE 10 // D2 NAV, SUBFRAME 1, PAGE 10
const std::vector<std::pair<int, int> > D2_IDOT({{52, 1}, {61, 13}}); const std::vector<std::pair<int32_t, int32_t> > D2_IDOT({{52, 1}, {61, 13}});
#endif /* GNSS_SDR_BEIDOU_B1I_H_ */ #endif /* GNSS_SDR_BEIDOU_B1I_H_ */