From 83c06a47297cfe1e97240e52e98b403dfcfc858e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 26 May 2018 09:33:57 +0200 Subject: [PATCH 1/2] Catch all exceptions --- src/utils/front-end-cal/main.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index 7a90e0cc8..0b1429b8c 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -308,11 +308,18 @@ int main(int argc, char** argv) // 2. Get SUPL information from server: Ephemeris record, assistance info and TOW - if (front_end_cal.get_ephemeris() == true) + try { - std::cout << "SUPL data received OK!" << std::endl; + if (front_end_cal.get_ephemeris() == true) + { + std::cout << "SUPL data received OK!" << std::endl; + } + else + { + std::cout << "Failure connecting to SUPL server" << std::endl; + } } - else + catch (const boost::exception& e) { std::cout << "Failure connecting to SUPL server" << std::endl; } From e720d49fccc4b31e1e6251f11a8e7dcc72e987e7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 27 May 2018 02:09:49 +0200 Subject: [PATCH 2/2] Remove blank lines, minor cleaning --- src/utils/front-end-cal/main.cc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index 0b1429b8c..52ab62218 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -146,8 +146,6 @@ FrontEndCal_msg_rx::FrontEndCal_msg_rx() : gr::block("FrontEndCal_msg_rx", gr::i FrontEndCal_msg_rx::~FrontEndCal_msg_rx() {} -// ########################################################### - void wait_message() { while (!stop) @@ -234,8 +232,6 @@ bool front_end_capture(std::shared_ptr configuration) return false; } - //delete conditioner; - //delete source; return true; } @@ -275,7 +271,6 @@ int main(int argc, char** argv) if (FLAGS_log_dir.empty()) { std::cout << "Logging will be done at " - << "/tmp" << std::endl << "Use front-end-cal --log_dir=/path/to/log to change that." @@ -296,17 +291,13 @@ int main(int argc, char** argv) << FLAGS_log_dir << std::endl; } - // 0. Instantiate the FrontEnd Calibration class FrontEndCal front_end_cal; // 1. Load configuration parameters from config file - std::shared_ptr configuration = std::make_shared(FLAGS_config_file); - front_end_cal.set_configuration(configuration); - // 2. Get SUPL information from server: Ephemeris record, assistance info and TOW try { @@ -385,11 +376,6 @@ int main(int argc, char** argv) exit(0); } - //gr_basic_block_sptr head = gr_make_head(sizeof(gr_complex), nsamples); - //gr_head_sptr head_sptr = boost::dynamic_pointer_cast(head); - //head_sptr->set_length(nsamples); - //head_sptr->reset(); - try { acquisition->connect(top_block); @@ -530,8 +516,8 @@ int main(int argc, char** argv) std::cout << "Reference location (defined in config file):" << std::endl; - std::cout << "Latitude=" << lat_deg << " [�]" << std::endl; - std::cout << "Longitude=" << lon_deg << " [�]" << std::endl; + std::cout << "Latitude=" << lat_deg << " [º]" << std::endl; + std::cout << "Longitude=" << lon_deg << " [º]" << std::endl; std::cout << "Altitude=" << altitude_m << " [m]" << std::endl; if (doppler_measurements_map.size() == 0)