mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Small fixes
This commit is contained in:
parent
b3f1cdb5fc
commit
82b7a244eb
@ -802,5 +802,5 @@ gr::basic_block_sptr RtklibPvt::get_left_block()
|
||||
|
||||
gr::basic_block_sptr RtklibPvt::get_right_block()
|
||||
{
|
||||
return pvt_; // this is a sink, nothing downstream
|
||||
return nullptr; // this is a sink, nothing downstream
|
||||
}
|
||||
|
@ -562,8 +562,6 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
||||
xml_base_path = xml_base_path + boost::filesystem::path::preferred_separator;
|
||||
}
|
||||
|
||||
d_pvt_solver = std::make_shared<rtklib_solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
||||
d_pvt_solver->set_averaging_depth(1);
|
||||
|
||||
d_rx_time = 0.0;
|
||||
|
||||
@ -580,7 +578,10 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
||||
|
||||
udp_sink_ptr = std::unique_ptr<Monitor_Pvt_Udp_Sink>(new Monitor_Pvt_Udp_Sink(udp_addr_vec, conf_.udp_port));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
udp_sink_ptr = nullptr;
|
||||
}
|
||||
|
||||
// Create Sys V message queue
|
||||
first_fix = true;
|
||||
@ -591,6 +592,9 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
||||
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
d_pvt_solver = std::make_shared<rtklib_solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
||||
d_pvt_solver->set_averaging_depth(1);
|
||||
start = std::chrono::system_clock::now();
|
||||
}
|
||||
|
||||
@ -1210,14 +1214,28 @@ bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name)
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char delim)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
|
||||
while (std::getline(ss, item, delim))
|
||||
{
|
||||
*(std::back_inserter(v)++) = item;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
||||
double* latitude_deg,
|
||||
double* height_m,
|
||||
double* ground_speed_kmh,
|
||||
double* course_over_ground_deg,
|
||||
time_t* UTC_time)
|
||||
time_t* UTC_time) const
|
||||
{
|
||||
gr::thread::scoped_lock lock(d_setlock);
|
||||
if (d_pvt_solver->is_valid_position())
|
||||
{
|
||||
*latitude_deg = d_pvt_solver->get_latitude();
|
||||
@ -1225,7 +1243,7 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
||||
*height_m = d_pvt_solver->get_height();
|
||||
*ground_speed_kmh = d_pvt_solver->get_speed_over_ground() * 3600.0 / 1000.0;
|
||||
*course_over_ground_deg = d_pvt_solver->get_course_over_ground();
|
||||
*UTC_time = to_time_t(d_pvt_solver->get_position_UTC_time());
|
||||
*UTC_time = convert_to_time_t(d_pvt_solver->get_position_UTC_time());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1237,8 +1255,6 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
||||
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
{
|
||||
gr::thread::scoped_lock l(d_setlock);
|
||||
|
||||
for (int32_t epoch = 0; epoch < noutput_items; epoch++)
|
||||
{
|
||||
bool flag_display_pvt = false;
|
||||
@ -3284,17 +3300,3 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char delim)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
|
||||
while (std::getline(ss, item, delim))
|
||||
{
|
||||
*(std::back_inserter(v)++) = item;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
@ -85,15 +85,15 @@ private:
|
||||
|
||||
bool b_rtcm_writing_started;
|
||||
bool b_rtcm_enabled;
|
||||
int32_t d_rtcm_MT1045_rate_ms; //!< Galileo Broadcast Ephemeris
|
||||
int32_t d_rtcm_MT1019_rate_ms; //!< GPS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1020_rate_ms; //!< GLONASS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1077_rate_ms; //!< The type 7 Multiple Signal Message format for the USA’s GPS system, popular
|
||||
int32_t d_rtcm_MT1087_rate_ms; //!< GLONASS MSM7. The type 7 Multiple Signal Message format for the Russian GLONASS system
|
||||
int32_t d_rtcm_MT1097_rate_ms; //!< Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system
|
||||
int32_t d_rtcm_MT1045_rate_ms; // Galileo Broadcast Ephemeris
|
||||
int32_t d_rtcm_MT1019_rate_ms; // GPS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1020_rate_ms; // GLONASS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1077_rate_ms; // The type 7 Multiple Signal Message format for the USA’s GPS system, popular
|
||||
int32_t d_rtcm_MT1087_rate_ms; // GLONASS MSM7. The type 7 Multiple Signal Message format for the Russian GLONASS system
|
||||
int32_t d_rtcm_MT1097_rate_ms; // Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system
|
||||
int32_t d_rtcm_MSM_rate_ms;
|
||||
|
||||
int32_t d_last_status_print_seg; //for status printer
|
||||
int32_t d_last_status_print_seg; // for status printer
|
||||
|
||||
uint32_t d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
@ -132,14 +132,14 @@ private:
|
||||
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
|
||||
bool save_gnss_synchro_map_xml(const std::string& file_name); //debug helper function
|
||||
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 load_gnss_synchro_map_xml(const std::string& file_name); // debug helper function
|
||||
|
||||
bool d_xml_storage;
|
||||
std::string xml_base_path;
|
||||
|
||||
inline std::time_t to_time_t(boost::posix_time::ptime pt)
|
||||
inline std::time_t convert_to_time_t(const boost::posix_time::ptime pt) const
|
||||
{
|
||||
return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
|
||||
}
|
||||
@ -153,8 +153,10 @@ public:
|
||||
const Pvt_Conf& conf_,
|
||||
const rtk_t& rtk);
|
||||
|
||||
~rtklib_pvt_cc(); //!< Default destructor
|
||||
|
||||
/*!
|
||||
* \brief Get latest set of ephemeris from PVT block
|
||||
* \brief Get latest set of GPS ephemeris from PVT block
|
||||
*
|
||||
*/
|
||||
std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const;
|
||||
@ -183,9 +185,7 @@ public:
|
||||
double* height_m,
|
||||
double* ground_speed_kmh,
|
||||
double* course_over_ground_deg,
|
||||
time_t* UTC_time);
|
||||
|
||||
~rtklib_pvt_cc(); //!< Default destructor
|
||||
time_t* UTC_time) const;
|
||||
|
||||
int work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items); //!< PVT Signal Processing
|
||||
|
@ -293,7 +293,11 @@ int ControlThread::run()
|
||||
}
|
||||
catch (const boost::thread_interrupted &interrupt)
|
||||
{
|
||||
DLOG(INFO) << "Thread interrupted";
|
||||
DLOG(WARNING) << "Thread interrupted";
|
||||
}
|
||||
catch (const boost::system::system_error &e)
|
||||
{
|
||||
LOG(WARNING) << "System error";
|
||||
}
|
||||
|
||||
if (restart_)
|
||||
|
Loading…
Reference in New Issue
Block a user