diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 7f8998236..85a048f78 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -168,7 +168,8 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, d_show_local_time_zone(conf_.show_local_time_zone), d_waiting_obs_block_rx_clock_offset_correction_msg(false), d_enable_rx_clock_correction(conf_.enable_rx_clock_correction), - d_an_printer_enabled(conf_.an_output_enabled) + d_an_printer_enabled(conf_.an_output_enabled), + d_log_timetag(conf_.log_source_timetag) { // Send feedback message to observables block with the receiver clock offset this->message_port_register_out(pmt::mp("pvt_to_observables")); @@ -560,10 +561,9 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, tracelevel(conf_.rtk_trace_level); // timetag - d_log_timetag = conf_.log_source_timetag; if (d_log_timetag) { - d_log_timetag_file = std::fstream(conf_.log_source_timetag_file, std::ios::out | std::ios::binary); + d_log_timetag_file.open(conf_.log_source_timetag_file, std::ios::out | std::ios::binary); std::cout << "Log PVT timetag metadata enabled, log file: " << conf_.log_source_timetag_file << "\n"; } d_start = std::chrono::system_clock::now(); diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h index dcdbca307..bfd53db63 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h @@ -30,12 +30,13 @@ #include // for size_t #include // for int32_t #include // for time_t +#include // for std::fstream #include // for map #include // for shared_ptr, unique_ptr -#include -#include // for string -#include // for key_t -#include // for vector +#include // for std::queue +#include // for string +#include // for key_t +#include // for vector /** \addtogroup PVT * \{ */ @@ -167,7 +168,6 @@ private: bool save_gnss_synchro_map_xml(const std::string& file_name); // debug helper function bool load_gnss_synchro_map_xml(const std::string& file_name); // debug helper function - bool d_log_timetag; std::fstream d_log_timetag_file; std::shared_ptr d_internal_pvt_solver; @@ -286,6 +286,7 @@ private: bool d_enable_rx_clock_correction; bool d_enable_has_messages; bool d_an_printer_enabled; + bool d_log_timetag; };