From d1298d67c87f8952a60ed217dabd47be2b708fae Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 27 Apr 2019 12:43:34 +0200 Subject: [PATCH] Remove unused buffer --- .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc | 10 ++++------ .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h | 5 ++--- 2 files changed, 6 insertions(+), 9 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 3bc7b0325..2859ae975 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 @@ -83,8 +83,7 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs( // preamble bits to sampled symbols d_preamble_samples = static_cast(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment())); d_frame_length_symbols = GPS_SUBFRAME_BITS * GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; - d_max_symbols_without_valid_frame = d_required_symbols * 10; //rise alarm 1 minute without valid tlm - d_page_part_symbols = static_cast(volk_gnsssdr_malloc(d_frame_length_symbols * sizeof(double), volk_gnsssdr_get_alignment())); + d_max_symbols_without_valid_frame = d_required_symbols * 10; // rise alarm 1 minute without valid tlm int32_t n = 0; for (int32_t i = 0; i < d_bits_per_preamble; i++) { @@ -127,7 +126,6 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs( gps_l1_ca_telemetry_decoder_gs::~gps_l1_ca_telemetry_decoder_gs() { volk_gnsssdr_free(d_preamble_samples); - volk_gnsssdr_free(d_page_part_symbols); if (d_dump_file.is_open() == true) { try @@ -285,7 +283,7 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe() // NEW GPS SUBFRAME HAS ARRIVED! if (subframe_synchro_confirmation) { - int32_t subframe_ID = d_nav.subframe_decoder(subframe); //decode the subframe + int32_t subframe_ID = d_nav.subframe_decoder(subframe); // decode the subframe if (subframe_ID > 0 and subframe_ID < 6) { std::cout << "New GPS NAV message received in channel " << this->d_channel << ": " @@ -377,7 +375,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__ { case 0: // no preamble information { - //correlate with preamble + // correlate with preamble int32_t corr_value = 0; if (d_symbol_history.size() >= GPS_CA_PREAMBLE_LENGTH_SYMBOLS) { @@ -405,7 +403,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__ } case 1: // possible preamble lock { - //correlate with preamble + // correlate with preamble int32_t corr_value = 0; int32_t preamble_diff = 0; if (d_symbol_history.size() >= GPS_CA_PREAMBLE_LENGTH_SYMBOLS) 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 f3d7790ff..cc01fb6b6 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 @@ -62,6 +62,7 @@ public: void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_channel(int channel); //!< Set receiver's channel void reset(); + /*! * \brief This is where all signal processing takes place */ @@ -76,15 +77,14 @@ private: bool gps_word_parityCheck(uint32_t gpsword); bool decode_subframe(); - // new int32_t d_bits_per_preamble; int32_t d_samples_per_preamble; int32_t d_preamble_period_symbols; int32_t *d_preamble_samples; uint32_t d_required_symbols; uint32_t d_frame_length_symbols; - double *d_page_part_symbols; bool flag_PLL_180_deg_phase_locked; + // navigation message vars Gps_Navigation_Message d_nav; uint32_t d_prev_GPS_frame_4bytes; @@ -103,7 +103,6 @@ private: bool d_flag_preamble; int32_t d_CRC_error_counter; - Gnss_Satellite d_satellite; int32_t d_channel;