From 54f9108f15b57b956984a75f1cdf0c927644a76e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 26 Apr 2017 16:01:47 +0200 Subject: [PATCH] Fix segmentation fault --- src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 4 +++- src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index 4656e5538..6cdab65a6 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -216,6 +216,8 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump std::string dump_ls_pvt_filename = dump_filename; type_of_rx = type_of_receiver; + rtklib_options = rtklib_opt; + // GPS Ephemeris data message port in this->message_port_register_in(pmt::mp("telemetry")); this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_cc::msg_handler_telemetry, this, _1)); @@ -280,7 +282,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump d_averaging_depth = averaging_depth; d_flag_averaging = flag_averaging; - d_ls_pvt = std::make_shared((int)nchannels, dump_ls_pvt_filename, d_dump, rtklib_opt); + d_ls_pvt = std::make_shared((int)nchannels, dump_ls_pvt_filename, d_dump, rtklib_options); d_ls_pvt->set_averaging_depth(d_averaging_depth); d_sample_counter = 0; diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h index 4382be696..6d90ac018 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h @@ -144,6 +144,7 @@ private: double d_rx_time; std::shared_ptr d_ls_pvt; + prcopt_t rtklib_options; std::map gnss_observables_map; bool observables_pairCompare_min(const std::pair& a, const std::pair& b);