[hamradio-commits] [gnss-sdr] 61/303: Stop receiver after TFFF detection

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:35:48 UTC 2017


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

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

commit 3e1cff4e7e4214ef58ce46136dee704cfc293120
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Sat Oct 1 17:42:47 2016 +0200

    Stop receiver after TFFF detection
---
 src/tests/system-tests/ttff_gps_l1.cc | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/tests/system-tests/ttff_gps_l1.cc b/src/tests/system-tests/ttff_gps_l1.cc
index 308e3a7..5979f9d 100644
--- a/src/tests/system-tests/ttff_gps_l1.cc
+++ b/src/tests/system-tests/ttff_gps_l1.cc
@@ -71,10 +71,15 @@ typedef struct  {
 void receive_msg()
 {
     ttff_msgbuf msg;
+    ttff_msgbuf msg_stop;
+    msg_stop.mtype = 2;
+    msg_stop.ttff = 200;
     double ttff_msg = 0.0;
     int msgrcv_size = sizeof(msg.ttff);
     int msqid;
+    int msqid_stop;
     key_t key = 1101;
+    key_t key_stop = 1102;
     // wait for the queue to be created
     while((msqid = msgget(key, 0644)) == -1){}
 
@@ -85,6 +90,10 @@ void receive_msg()
                 {
                     TTFF_v.push_back(ttff_msg / (100 * 10)); // Fix this !  averaging_depth * output_rate_ms
                     LOG(INFO) << "Valid Time-To-First-Fix: " << ttff_msg / (100 * 10) << "[s]";
+                    // Stop the receiver
+                    while((msqid_stop = msgget(key_stop, 0644)) == -1){}
+                    double msgsend_size = sizeof(msg_stop.ttff);
+                    msgsnd(msqid_stop, &msg_stop, msgsend_size, IPC_NOWAIT);
                 }
 
             if(ttff_msg != -1)
@@ -128,6 +137,8 @@ TEST(TTFF_GPS_L1_CA_Test, ColdStart)
 
     double central_freq = 1575420000.0;
     double gain_dB = 40.0;
+    int number_of_taps = 11;
+    int number_of_bands = 2;
 
     // Set the Signal Source
     config->set_property("GNSS-SDR.internal_fs_hz", std::to_string(FLAGS_fs_in));
@@ -149,8 +160,8 @@ TEST(TTFF_GPS_L1_CA_Test, ColdStart)
     config->set_property("InputFilter.input_item_type", "cshort");
     config->set_property("InputFilter.output_item_type", "gr_complex");
     config->set_property("InputFilter.taps_item_type", "float");
-    config->set_property("InputFilter.number_of_taps", std::to_string(11));
-    config->set_property("InputFilter.number_of_bands", std::to_string(2));
+    config->set_property("InputFilter.number_of_taps", std::to_string(number_of_taps));
+    config->set_property("InputFilter.number_of_bands", std::to_string(number_of_bands));
     config->set_property("InputFilter.band1_begin", std::to_string(0.0));
     config->set_property("InputFilter.band1_end", std::to_string(0.48));
     config->set_property("InputFilter.band2_begin", std::to_string(0.52));

-- 
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