From 95159ebb0f03449e48b8463a8cfea9108d33ebcf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 7 Jun 2019 11:38:50 +0200 Subject: [PATCH 1/2] Fix wrong comparison --- src/algorithms/PVT/adapters/rtklib_pvt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index fa89f74cc..cae7fc052 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -277,7 +277,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, { pvt_output_parameters.type_of_receiver = 21; // GPS L1 C/A + Galileo E1B + GPS L2C } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count = 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) + if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) { pvt_output_parameters.type_of_receiver = 22; // GPS L1 C/A + Galileo E1B + GPS L5 } From ada51b315062dda2b0ff97c7a1067da31185a447 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 7 Jun 2019 12:00:47 +0200 Subject: [PATCH 2/2] Fix data race detected by Coverity Scan --- .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 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 2fb25b023..7d06833e2 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 @@ -261,7 +261,7 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe() { GPS_frame_4bytes ^= 0x3FFFFFC0; // invert the data bits (using XOR) } - //check parity. If ANY word inside the subframe fails the parity, set subframe_synchro_confirmation = false + // check parity. If ANY word inside the subframe fails the parity, set subframe_synchro_confirmation = false if (not gps_l1_ca_telemetry_decoder_gs::gps_word_parityCheck(GPS_frame_4bytes)) { subframe_synchro_confirmation = false; @@ -457,6 +457,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__ { d_CRC_error_counter = 0; d_flag_preamble = true; // valid preamble indicator (initialized to false every work()) + gr::thread::scoped_lock lock(d_setlock); d_last_valid_preamble = d_sample_counter; if (!d_flag_frame_sync) { @@ -537,7 +538,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__ } } - // 3. Make the output (copy the object contents to the GNURadio reserved memory) + // 3. Make the output (copy the object contents to the GNU Radio reserved memory) *out[0] = current_symbol; return 1;