mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-06 17:34:12 +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++)
|
||||
{
|
||||
|
@ -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