From b822bec184b9274da176bec299dc56f257ebfba3 Mon Sep 17 00:00:00 2001 From: Damian Miralles Date: Tue, 5 Mar 2019 19:45:44 -0600 Subject: [PATCH 1/2] bds_b1i: fixing bug with D2 messages --- .../gnuradio_blocks/beidou_b1i_telemetry_decoder_cc.cc | 5 +++++ src/utils/matlab/hybrid_observables_plot_sample.m | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_cc.cc index 6f50fd1c5..b60dd8f63 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_cc.cc @@ -317,8 +317,13 @@ void beidou_b1i_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satell volk_gnsssdr_free(d_secondary_code_symbols); volk_gnsssdr_free(d_subframe_symbols); + d_samples_per_symbol = (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS) / BEIDOU_D2NAV_SYMBOL_RATE_SPS; + d_symbols_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS; + d_samples_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS * d_samples_per_symbol; d_secondary_code_symbols = nullptr; d_preamble_samples = static_cast(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment())); + d_preamble_period_samples = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS*d_samples_per_symbol; + //d_subframe_length_symbols = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; // Setting samples of preamble code int32_t n = 0; diff --git a/src/utils/matlab/hybrid_observables_plot_sample.m b/src/utils/matlab/hybrid_observables_plot_sample.m index 9105c5bbd..2a8a784e5 100644 --- a/src/utils/matlab/hybrid_observables_plot_sample.m +++ b/src/utils/matlab/hybrid_observables_plot_sample.m @@ -29,10 +29,10 @@ clearvars; close all; addpath('./libs'); -samplingFreq = 6625000; %[Hz] -channels=5; -path='/archive/'; -observables_log_path=[path 'glo_observables.dat']; +samplingFreq = 25000000; %[Hz] +channels=10; +path='/home/dmiralles/Documents/gnss-sdr/'; +observables_log_path=[path 'observables.dat']; GNSS_observables= read_hybrid_observables_dump(channels,observables_log_path); %% From 68173b0920690d270e3fc7e92e0846b67eb19f98 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 08:54:29 +0100 Subject: [PATCH 2/2] Apply clang-format --- .../gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc index d08d40c35..020fcb980 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc @@ -326,8 +326,7 @@ void beidou_b1i_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satell d_samples_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS * d_samples_per_symbol; d_secondary_code_symbols = nullptr; d_preamble_samples = static_cast(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment())); - d_preamble_period_samples = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS*d_samples_per_symbol; - //d_subframe_length_symbols = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; + d_preamble_period_samples = BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * d_samples_per_symbol; // Setting samples of preamble code int32_t n = 0;