From 1957ebfd42a22ebdeb9489d457f027fecdad932c Mon Sep 17 00:00:00 2001 From: "Alexander V. Joura" Date: Wed, 7 Sep 2022 19:58:23 +0300 Subject: [PATCH] refactoring: removed unnecessary class members --- .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc | 6 ++---- .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc index b44dc0abc..5f9a6298f 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc @@ -74,8 +74,6 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs( d_sample_counter(0ULL), d_preamble_index(0ULL), d_last_valid_preamble(0), - d_bits_per_preamble(GPS_CA_PREAMBLE_LENGTH_BITS), - d_samples_per_preamble(GPS_CA_PREAMBLE_LENGTH_BITS), d_preamble_period_symbols(GPS_SUBFRAME_BITS), d_CRC_error_counter(0), d_channel(0), @@ -117,7 +115,7 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs( // preamble bits to sampled symbols d_max_symbols_without_valid_frame = d_required_symbols * 20; // rise alarm 120 segs without valid tlm int32_t n = 0; - for (int32_t i = 0; i < d_bits_per_preamble; i++) + for (int32_t i = 0; i < GPS_CA_PREAMBLE_LENGTH_BITS; i++) { if (GPS_CA_PREAMBLE[i] == '1') { @@ -486,7 +484,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__ } } } - if (abs(corr_value) >= d_samples_per_preamble) + if (abs(corr_value) >= GPS_CA_PREAMBLE_LENGTH_BITS) { d_preamble_index = d_sample_counter; // record the preamble sample stamp if (corr_value < 0) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h index da9dbc50d..c966df3c5 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h @@ -92,8 +92,6 @@ private: uint64_t d_preamble_index; uint64_t d_last_valid_preamble; - int32_t d_bits_per_preamble; - int32_t d_samples_per_preamble; int32_t d_preamble_period_symbols; int32_t d_CRC_error_counter; int32_t d_channel;