mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 20:50:33 +00:00
Handle RTCM printer exceptions
This commit is contained in:
parent
74e8af01f9
commit
e4bada8176
@ -34,12 +34,14 @@
|
|||||||
#include <boost/archive/xml_oarchive.hpp>
|
#include <boost/archive/xml_oarchive.hpp>
|
||||||
#include <boost/archive/xml_iarchive.hpp>
|
#include <boost/archive/xml_iarchive.hpp>
|
||||||
#include <boost/serialization/map.hpp>
|
#include <boost/serialization/map.hpp>
|
||||||
|
#include <boost/exception/all.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
@ -544,7 +546,8 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
// store valid observables in a map.
|
// store valid observables in a map.
|
||||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(i, in[i][epoch]));
|
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(i, in[i][epoch]));
|
||||||
}
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
if (d_ls_pvt->gps_ephemeris_map.size() > 0)
|
if (d_ls_pvt->gps_ephemeris_map.size() > 0)
|
||||||
{
|
{
|
||||||
if (tmp_eph_iter_gps != d_ls_pvt->gps_ephemeris_map.end())
|
if (tmp_eph_iter_gps != d_ls_pvt->gps_ephemeris_map.end())
|
||||||
@ -574,6 +577,17 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (const boost::exception& ex)
|
||||||
|
{
|
||||||
|
std::cout << "RTCM boost exception: " << boost::diagnostic_information(ex) << std::endl;
|
||||||
|
LOG(ERROR) << "RTCM boost exception: " << boost::diagnostic_information(ex);
|
||||||
|
}
|
||||||
|
catch (const std::exception& ex)
|
||||||
|
{
|
||||||
|
std::cout << "RTCM std exception: " << ex.what() << std::endl;
|
||||||
|
LOG(ERROR) << "RTCM std exception: " << ex.what();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ############ 2 COMPUTE THE PVT ################################
|
// ############ 2 COMPUTE THE PVT ################################
|
||||||
@ -590,10 +604,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
// compute on the fly PVT solution
|
// compute on the fly PVT solution
|
||||||
if (flag_compute_pvt_output == true)
|
if (flag_compute_pvt_output == true)
|
||||||
{
|
{
|
||||||
bool pvt_result;
|
if (d_ls_pvt->get_PVT(gnss_observables_map, d_rx_time, false))
|
||||||
pvt_result = d_ls_pvt->get_PVT(gnss_observables_map, d_rx_time, false);
|
|
||||||
|
|
||||||
if (pvt_result == true)
|
|
||||||
{
|
{
|
||||||
if (std::fabs(current_RX_time - last_pvt_display_T_rx_s) * 1000.0 >= static_cast<double>(d_display_rate_ms))
|
if (std::fabs(current_RX_time - last_pvt_display_T_rx_s) * 1000.0 >= static_cast<double>(d_display_rate_ms))
|
||||||
{
|
{
|
||||||
@ -1177,6 +1188,8 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ####################### RTCM MESSAGES #################
|
// ####################### RTCM MESSAGES #################
|
||||||
|
try
|
||||||
|
{
|
||||||
if (b_rtcm_writing_started)
|
if (b_rtcm_writing_started)
|
||||||
{
|
{
|
||||||
if (type_of_rx == 1) // GPS L1 C/A
|
if (type_of_rx == 1) // GPS L1 C/A
|
||||||
@ -1692,10 +1705,21 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (const boost::exception& ex)
|
||||||
|
{
|
||||||
|
std::cout << "RTCM boost exception: " << boost::diagnostic_information(ex) << std::endl;
|
||||||
|
LOG(ERROR) << "RTCM boost exception: " << boost::diagnostic_information(ex);
|
||||||
|
}
|
||||||
|
catch (const std::exception& ex)
|
||||||
|
{
|
||||||
|
std::cout << "RTCM std exception: " << ex.what() << std::endl;
|
||||||
|
LOG(ERROR) << "RTCM std exception: " << ex.what();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG MESSAGE: Display position in console output
|
// DEBUG MESSAGE: Display position in console output
|
||||||
if ((d_ls_pvt->is_valid_position() == true) && (flag_display_pvt == true))
|
if (d_ls_pvt->is_valid_position() and flag_display_pvt)
|
||||||
{
|
{
|
||||||
std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
||||||
<< " UTC using " << d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
<< " UTC using " << d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
||||||
|
@ -637,14 +637,7 @@ void dll_pll_veml_tracking::run_dll_pll(bool disable_costas_loop)
|
|||||||
|
|
||||||
void dll_pll_veml_tracking::clear_tracking_vars()
|
void dll_pll_veml_tracking::clear_tracking_vars()
|
||||||
{
|
{
|
||||||
if (d_veml)
|
std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0));
|
||||||
{
|
|
||||||
*d_Very_Early = gr_complex(0.0, 0.0);
|
|
||||||
*d_Very_Late = gr_complex(0.0, 0.0);
|
|
||||||
}
|
|
||||||
*d_Early = gr_complex(0.0, 0.0);
|
|
||||||
*d_Prompt = gr_complex(0.0, 0.0);
|
|
||||||
*d_Late = gr_complex(0.0, 0.0);
|
|
||||||
d_carr_error_hz = 0.0;
|
d_carr_error_hz = 0.0;
|
||||||
d_carr_error_filt_hz = 0.0;
|
d_carr_error_filt_hz = 0.0;
|
||||||
d_code_error_chips = 0.0;
|
d_code_error_chips = 0.0;
|
||||||
@ -1069,11 +1062,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
|||||||
*out[0] = current_synchro_data;
|
*out[0] = current_synchro_data;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int dll_pll_veml_tracking::save_matfile()
|
int dll_pll_veml_tracking::save_matfile()
|
||||||
|
Loading…
Reference in New Issue
Block a user