[hamradio-commits] [gnss-sdr] 75/303: Improve TTFF report

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:35:49 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 ba73218747f711a3f803be6bf4c30507e803bef2
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Sun Oct 2 21:14:58 2016 +0200

    Improve TTFF report
---
 src/tests/CMakeLists.txt              |  8 ++++++++
 src/tests/system-tests/ttff_gps_l1.cc | 31 +++++++++++++++++++++++++++----
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index d755ef9..5739b7d 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -376,6 +376,14 @@ add_dependencies(check control_thread_test flowgraph_test gnss_block_test
 
 # Addition of System Tests
 if(ENABLE_SYSTEM_TESTING)
+    set(HOST_SYSTEM "Unknown")
+    if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+        set(HOST_SYSTEM "GNU/LINUX ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCH_}")
+    endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+        set(HOST_SYSTEM "MacOS")
+    endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
     add_executable(ttff
         ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/ttff_gps_l1.cc )
     if(NOT ${GTEST_DIR_LOCAL})
diff --git a/src/tests/system-tests/ttff_gps_l1.cc b/src/tests/system-tests/ttff_gps_l1.cc
index 00d8988..3f3ea8b 100644
--- a/src/tests/system-tests/ttff_gps_l1.cc
+++ b/src/tests/system-tests/ttff_gps_l1.cc
@@ -76,7 +76,7 @@ class TTFF_GPS_L1_CA_Test: public ::testing::Test
 public:
     void config_1();
     void config_2();
-    void print_TTFF_report(const std::vector<double> & ttff_v);
+    void print_TTFF_report(const std::vector<double> & ttff_v, std::shared_ptr<ConfigurationInterface> config_);
 
     std::shared_ptr<InMemoryConfiguration> config;
     std::shared_ptr<FileConfiguration> config2;
@@ -267,9 +267,13 @@ void receive_msg()
 }
 
 
-void TTFF_GPS_L1_CA_Test::print_TTFF_report(const std::vector<double> & ttff_v)
+void TTFF_GPS_L1_CA_Test::print_TTFF_report(const std::vector<double> & ttff_v, std::shared_ptr<ConfigurationInterface> config_)
 {
     std::vector<double> ttff = ttff_v;
+    bool read_ephemeris;
+    read_ephemeris = config->property("GNSS-SDR.SUPL_read_gps_assistance_xml", "false");
+    bool agnss;
+    agnss = config->property("GNSS-SDR.SUPL_gps_enabled", "false");
     double sum = std::accumulate(ttff.begin(), ttff.end(), 0.0);
     double mean = sum / ttff.size();
     double sq_sum = std::inner_product(ttff.begin(), ttff.end(), ttff.begin(), 0.0);
@@ -279,6 +283,24 @@ void TTFF_GPS_L1_CA_Test::print_TTFF_report(const std::vector<double> & ttff_v)
     std::cout << "---------------------------" << std::endl;
     std::cout << " Time-To-First-Fix Report" << std::endl;
     std::cout << "---------------------------" << std::endl;
+    std::cout << "Initial receiver status: ";
+    if (read_ephemeris)
+        {
+            std::cout << "Hot start." << std::endl;
+        }
+    else
+        {
+            std::cout << "Cold start." << std::endl;
+        }
+    std::cout << "AGNSS: ";
+    if (agnss && read_ephemeris)
+        {
+            std::cout << "Enabled." << std::endl;
+        }
+    else
+        {
+            std::cout << "Disabled." << std::endl;
+        }
     std::cout << "Valid measurements (" << ttff.size() << "/" << FLAGS_num_measurements << "): ";
     for(double ttff_ : ttff) std::cout << ttff_ << " ";
     std::cout << std::endl;
@@ -289,6 +311,7 @@ void TTFF_GPS_L1_CA_Test::print_TTFF_report(const std::vector<double> & ttff_v)
             std::cout << "TTFF min: " << *min_ttff << " [s]" << std::endl;
         }
     std::cout << "TTFF stdev: " << stdev << " [s]" << std::endl;
+    std::cout << "Operating System: " << std::string(HOST_SYSTEM) << std::endl;
     std::cout << "---------------------------" << std::endl;
 }
 
@@ -304,7 +327,7 @@ TEST_F(TTFF_GPS_L1_CA_Test, ColdStart)
 
     config_2();
     // Ensure Cold Start
-    config2->set_property("GNSS-SDR.SUPL_read_gps_assistance_xml", "false");
+    config2->set_property("GNSS-SDR.SUPL_gps_enabled", "false");
     config2->set_property("GNSS-SDR.SUPL_read_gps_assistance_xml", "false");
     config2->set_property("PVT.flag_rtcm_server", "false");
 
@@ -357,7 +380,7 @@ TEST_F(TTFF_GPS_L1_CA_Test, ColdStart)
         }
 
     // Print TTFF report
-    print_TTFF_report(TTFF_v);
+    print_TTFF_report(TTFF_v, config);
 }
 
 

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