From dd3b2f11dbaccf9b513935285d6e88da355dd45b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 29 Jun 2019 21:13:14 +0200 Subject: [PATCH] Fix wrong loop --- .../adapters/gps_l1_ca_pcps_quicksync_acquisition.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc index d28420e7c..2867b53a0 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc @@ -242,7 +242,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_local_code() gps_l1_ca_code_gen_complex_sampled(gsl::span>(code, code_length_), gnss_synchro_->PRN, fs_in_, 0); gsl::span code_span(code_, vector_length_); - for (unsigned int i = 0; i < sampled_ms_; i++) + for (unsigned int i = 0; i < (sampled_ms_ / folding_factor_); i++) { std::copy_n(code, code_length_, code_span.subspan(i * code_length_, code_length_).data()); }