[hamradio-commits] [gnss-sdr] 61/80: Correct minor bug in pcps acquisition blocks

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Sun May 15 20:11:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch upstream
in repository gnss-sdr.

commit fd5cd42b9ae91eaf6262b5420879f859242dac6a
Author: Luis Esteve <luis.esteve.elfau at gmail.com>
Date:   Wed May 11 01:39:11 2016 +0200

    Correct minor bug in pcps acquisition blocks
    
    Change the initialization of max_dwells in pcps acquisition adpaters
    due its value is forced to be 1 in gr_block constructor if boolean
    "bit_transition_flag" is set to TRUE
    
    Resolves: #24
---
 .../galileo_e1_pcps_ambiguous_acquisition.cc       |  9 +--------
 .../adapters/gps_l1_ca_pcps_acquisition.cc         | 22 +++++++---------------
 .../adapters/gps_l2_m_pcps_acquisition.cc          | 14 ++++++--------
 .../gnuradio_blocks/pcps_acquisition_cc.cc         |  4 ++--
 4 files changed, 16 insertions(+), 33 deletions(-)

diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc
index a8d717b..3ade922 100644
--- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc
+++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc
@@ -69,14 +69,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
     bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
     use_CFAR_algorithm_flag_ = configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
 
-    if (!bit_transition_flag_)
-        {
-            max_dwells_ = configuration_->property(role + ".max_dwells", 1);
-        }
-    else
-        {
-            max_dwells_ = 2;
-        }
+    max_dwells_ = configuration_->property(role + ".max_dwells", 1);
 
     dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
 
diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc
index 8c6a4ee..5b6e759 100644
--- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc
+++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc
@@ -66,14 +66,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
     bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
     use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
 
-    if (!bit_transition_flag_)
-        {
-            max_dwells_ = configuration_->property(role + ".max_dwells", 1);
-        }
-    else
-        {
-            max_dwells_ = 2;
-        }
+    max_dwells_ = configuration_->property(role + ".max_dwells", 1);
 
     dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
 
@@ -82,6 +75,11 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
 
     vector_length_ = code_length_ * sampled_ms_;
 
+    if( bit_transition_flag_ )
+        {
+            vector_length_ *= 2;
+        }
+
     code_ = new gr_complex[vector_length_];
 
     if (item_type_.compare("cshort") == 0 )
@@ -102,13 +100,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
 
     stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
     DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
-    //now is supported natively by the acquisition (_sc variant)
-    //    if (item_type_.compare("cshort") == 0)
-    //        {
-    //            cshort_to_float_x2_ = make_cshort_to_float_x2();
-    //            float_to_complex_ = gr::blocks::float_to_complex::make();
-    //        }
-
+    
     if (item_type_.compare("cbyte") == 0)
         {
             cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc
index 14ea78c..2948ee9 100644
--- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc
+++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc
@@ -63,14 +63,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
     bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
     use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
 
-    if (!bit_transition_flag_)
-        {
-            max_dwells_ = configuration_->property(role + ".max_dwells", 1);
-        }
-    else
-        {
-            max_dwells_ = 2;
-        }
+    max_dwells_ = configuration_->property(role + ".max_dwells", 1);
 
     dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
 
@@ -80,6 +73,11 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
 
     vector_length_ = code_length_;
 
+    if( bit_transition_flag_ )
+        {
+            vector_length_ *= 2;
+        }
+
     code_ = new gr_complex[vector_length_];
 
     // if (item_type_.compare("gr_complex") == 0 )
diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
index d8fbe79..7ba6218 100644
--- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
+++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
@@ -90,7 +90,7 @@ pcps_acquisition_cc::pcps_acquisition_cc(
     d_bit_transition_flag = bit_transition_flag;
     d_use_CFAR_algorithm_flag = use_CFAR_algorithm_flag;
     d_threshold = 0.0;
-    d_doppler_step = 250;
+    d_doppler_step = 0;
     d_code_phase = 0;
     d_test_statistics = 0.0;
     d_channel = 0;
@@ -111,7 +111,7 @@ pcps_acquisition_cc::pcps_acquisition_cc(
     if( d_bit_transition_flag )
         {
             d_fft_size *= 2;
-            d_max_dwells = 1;
+            d_max_dwells = 1; //Activation of d_bit_transition_flag invalidates the value of d_max_dwells
         }
 
     d_fft_codes = static_cast<gr_complex*>(volk_malloc(d_fft_size * sizeof(gr_complex), volk_get_alignment()));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list