mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-05 17:04:11 +00:00
Avoid pointer arithmetics
This commit is contained in:
parent
bf1ac2cb50
commit
6796a73820
@ -128,7 +128,7 @@ beidou_b1i_telemetry_decoder_gs::~beidou_b1i_telemetry_decoder_gs()
|
||||
}
|
||||
|
||||
|
||||
void beidou_b1i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits, int32_t *decbits)
|
||||
void beidou_b1i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits, std::array<int32_t, 15> &decbits)
|
||||
{
|
||||
int32_t bit, err;
|
||||
std::array<int32_t, 4> reg{1, 1, 1, 1};
|
||||
@ -184,8 +184,8 @@ void beidou_b1i_telemetry_decoder_gs::decode_word(
|
||||
}
|
||||
}
|
||||
|
||||
decode_bch15_11_01(&bitsbch[0], first_branch.data());
|
||||
decode_bch15_11_01(&bitsbch[15], second_branch.data());
|
||||
decode_bch15_11_01(&bitsbch[0], first_branch);
|
||||
decode_bch15_11_01(&bitsbch[15], second_branch);
|
||||
|
||||
for (uint32_t j = 0; j < 11; j++)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ private:
|
||||
|
||||
void decode_subframe(float *symbols);
|
||||
void decode_word(int32_t word_counter, const float *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, std::array<int32_t, 15> &decbits);
|
||||
|
||||
// Preamble decoding
|
||||
std::array<int32_t, BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS> d_preamble_samples{};
|
||||
|
@ -129,7 +129,7 @@ beidou_b3i_telemetry_decoder_gs::~beidou_b3i_telemetry_decoder_gs()
|
||||
|
||||
|
||||
void beidou_b3i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits,
|
||||
int32_t *decbits)
|
||||
std::array<int32_t, 15> &decbits)
|
||||
{
|
||||
int32_t bit, err;
|
||||
std::array<int32_t, 4> reg{1, 1, 1, 1};
|
||||
@ -185,8 +185,8 @@ void beidou_b3i_telemetry_decoder_gs::decode_word(
|
||||
}
|
||||
}
|
||||
|
||||
decode_bch15_11_01(&bitsbch[0], first_branch.data());
|
||||
decode_bch15_11_01(&bitsbch[15], second_branch.data());
|
||||
decode_bch15_11_01(&bitsbch[0], first_branch);
|
||||
decode_bch15_11_01(&bitsbch[15], second_branch);
|
||||
|
||||
for (uint32_t j = 0; j < 11; j++)
|
||||
{
|
||||
@ -409,8 +409,8 @@ int beidou_b3i_telemetry_decoder_gs::general_work(
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol{}; // structure to save the synchronization
|
||||
// information and send the output object to the
|
||||
// next block
|
||||
// information and send the output object to the
|
||||
// next block
|
||||
// 1. Copy the current tracking output
|
||||
current_symbol = in[0][0];
|
||||
d_symbol_history.push_back(current_symbol.Prompt_I); // add new symbol to the symbol queue
|
||||
|
@ -79,7 +79,7 @@ private:
|
||||
void decode_subframe(float *symbols);
|
||||
void decode_word(int32_t word_counter, const float *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, std::array<int32_t, 15> &decbits);
|
||||
|
||||
// Preamble decoding
|
||||
std::array<int32_t, BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS> d_preamble_samples{};
|
||||
|
Loading…
x
Reference in New Issue
Block a user