[hamradio-commits] [gnss-sdr] 68/303: Small fixes
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 36f313d6f0f93f30feac362c8c1339b293c5535a
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Sun Oct 2 02:02:42 2016 +0200
Small fixes
---
src/tests/system-tests/ttff_gps_l1.cc | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/tests/system-tests/ttff_gps_l1.cc b/src/tests/system-tests/ttff_gps_l1.cc
index a6cd4e8..abe56ad 100644
--- a/src/tests/system-tests/ttff_gps_l1.cc
+++ b/src/tests/system-tests/ttff_gps_l1.cc
@@ -104,6 +104,7 @@ void receive_msg()
return;
}
+
void print_TTFF_report(const std::vector<double> & ttff_v)
{
std::vector<double> ttff = ttff_v;
@@ -114,14 +115,17 @@ void print_TTFF_report(const std::vector<double> & ttff_v)
auto max_ttff = std::max_element(std::begin(ttff), std::end(ttff));
auto min_ttff = std::min_element(std::begin(ttff), std::end(ttff));
std::cout << "---------------------------" << std::endl;
- std::cout << " Time-To-First FIX Report" << std::endl;
+ std::cout << " Time-To-First-Fix Report" << std::endl;
std::cout << "---------------------------" << std::endl;
std::cout << "Valid measurements (" << ttff.size() << "/" << FLAGS_num_measurements << "): ";
for(double ttff_ : ttff) std::cout << ttff_ << " ";
std::cout << std::endl;
std::cout << "TTFF mean: " << mean << " [s]" << std::endl;
- std::cout << "TTFF max: " << *max_ttff << " [s]" << std::endl;
- std::cout << "TTFF min: " << *min_ttff << " [s]" << std::endl;
+ if (ttff.size() > 0)
+ {
+ std::cout << "TTFF max: " << *max_ttff << " [s]" << std::endl;
+ std::cout << "TTFF min: " << *min_ttff << " [s]" << std::endl;
+ }
std::cout << "TTFF stdev: " << stdev << " [s]" << std::endl;
std::cout << "---------------------------" << std::endl;
}
@@ -160,6 +164,11 @@ TEST(TTFF_GPS_L1_CA_Test, ColdStart)
float threshold = 0.01;
float doppler_max = 8000.0;
float doppler_step = 500.0;
+ int max_dwells = 1;
+ int tong_init_val = 2;
+ int tong_max_val = 10;
+ int tong_max_dwells = 30;
+
// Set the Signal Source
config->set_property("GNSS-SDR.internal_fs_hz", std::to_string(FLAGS_fs_in));
@@ -217,10 +226,10 @@ TEST(TTFF_GPS_L1_CA_Test, ColdStart)
config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max));
config->set_property("Acquisition_1C.doppler_step", std::to_string(doppler_step));
config->set_property("Acquisition_1C.bit_transition_flag", "false");
- config->set_property("Acquisition_1C.max_dwells", std::to_string(1));
- config->set_property("Acquisition_1C.tong_init_val", std::to_string(2));
- config->set_property("Acquisition_1C.tong_max_val", std::to_string(10));
- config->set_property("Acquisition_1C.tong_max_dwells", std::to_string(30));
+ config->set_property("Acquisition_1C.max_dwells", std::to_string(max_dwells));
+ config->set_property("Acquisition_1C.tong_init_val", std::to_string(tong_init_val));
+ config->set_property("Acquisition_1C.tong_max_val", std::to_string(tong_max_val));
+ config->set_property("Acquisition_1C.tong_max_dwells", std::to_string(tong_max_dwells));
// Set Tracking
config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
@@ -269,7 +278,7 @@ TEST(TTFF_GPS_L1_CA_Test, ColdStart)
config2->set_property("GNSS-SDR.SUPL_read_gps_assistance_xml", "false");
config2->set_property("PVT.flag_rtcm_server", "false");
- std::shared_ptr<ControlThread> control_thread = std::make_shared<ControlThread>(config2);
+ std::unique_ptr<ControlThread> control_thread(new ControlThread(config2));
// record startup time
struct timeval tv;
@@ -300,7 +309,7 @@ TEST(TTFF_GPS_L1_CA_Test, ColdStart)
num_measurements = num_measurements + 1;
std::cout << "Measurement " << num_measurements << ", which took " << ttff << " seconds." << std::endl;
- std::this_thread::sleep_until(std::chrono::system_clock::now() + std::chrono::seconds(5));
+ std::this_thread::sleep_until(std::chrono::system_clock::now() + std::chrono::seconds(5)); // add random waiting!
}
// Print TTFF report
--
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