1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-07-10 05:53:03 +00:00
This commit is contained in:
Carles Fernandez 2023-10-05 13:43:46 +02:00
commit 146388d6ed
6 changed files with 46 additions and 44 deletions

View File

@ -48,7 +48,8 @@ double vel_e = 31; // Velocity East component in the local frame, in m/s
double vel_n = 32; // Velocity North component in the local frame, in m/s
double vel_u = 33; // Velocity Up component in the local frame, in m/s
double cog = 34; // Course Over Ground (cog) [deg]
double cog = 34; // Course Over Ground, in deg
uint32 galhas_status = 35; // Galileo HAS status: 1- HAS messages decoded and applied, 0 - HAS not avaliable
uint32 galhas_status = 35; // Galileo HAS status: 1- HAS messages decoded and applied, 0 - HAS not available
string geohash = 36; // Encoded geographic location. See https://en.wikipedia.org/wiki/Geohash
}

View File

@ -179,8 +179,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
d_an_printer_enabled(conf_.an_output_enabled),
d_log_timetag(conf_.log_source_timetag),
d_use_has_corrections(conf_.use_has_corrections),
d_use_unhealthy_sats(conf_.use_unhealthy_sats),
d_flag_geohash_log_out(conf_.flag_geohash_log_out)
d_use_unhealthy_sats(conf_.use_unhealthy_sats)
{
// Send feedback message to observables block with the receiver clock offset
this->message_port_register_out(pmt::mp("pvt_to_observables"));
@ -2428,12 +2427,10 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
// p_time += boost::posix_time::microseconds(round(rtklib_utc_time.sec * 1e6));
// std::cout << TEXT_MAGENTA << "Observable RX time (GPST) " << boost::posix_time::to_simple_string(p_time) << TEXT_RESET << '\n';
if (d_flag_geohash_log_out == true)
{
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
DLOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
<< " UTC using " << d_user_pvt_solver->get_num_valid_observations() << " observations is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
<< " [deg], Height = " << d_user_pvt_solver->get_height() << " [m]";
LOG(INFO) << "geohash=" << d_geohash->encode(d_user_pvt_solver->get_latitude(), d_user_pvt_solver->get_longitude());
/* std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
<< " UTC using "<< d_user_pvt_solver->get_num_valid_observations() <<" observations is HDOP = " << d_user_pvt_solver->get_hdop() << " VDOP = "
<< d_user_pvt_solver->get_vdop()
@ -2445,7 +2442,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
if (d_user_pvt_solver->is_valid_position() && flag_compute_pvt_output == true)
{
const std::shared_ptr<Monitor_Pvt> monitor_pvt = std::make_shared<Monitor_Pvt>(d_user_pvt_solver->get_monitor_pvt());
monitor_pvt->geohash = d_geohash->encode(d_user_pvt_solver->get_latitude(), d_user_pvt_solver->get_longitude());
DLOG(INFO) << "geohash=" << monitor_pvt->geohash;
// publish new position to the gnss_flowgraph channel status monitor
if (current_RX_time_ms % d_report_rate_ms == 0)
{

View File

@ -278,7 +278,6 @@ private:
bool d_log_timetag;
bool d_use_has_corrections;
bool d_use_unhealthy_sats;
bool d_flag_geohash_log_out;
};

View File

@ -98,6 +98,7 @@ public:
// PVT UTC Time (rfc 3339 datetime string)
std::string utc_time;
std::string geohash; // See https://en.wikipedia.org/wiki/Geohash
/*!
* \brief This member function serializes and restores
@ -153,6 +154,7 @@ public:
ar& BOOST_SERIALIZATION_NVP(vel_u);
ar& BOOST_SERIALIZATION_NVP(cog);
ar& BOOST_SERIALIZATION_NVP(geohash);
}
};

View File

@ -70,7 +70,6 @@ public:
uint16_t rtcm_tcp_port = 0;
uint16_t rtcm_station_id = 0;
bool flag_geohash_log_out = false;
bool flag_nmea_tty_port = false;
bool flag_rtcm_server = false;
bool flag_rtcm_tty_port = false;

View File

@ -118,6 +118,8 @@ public:
monitor_.set_vel_u(monitor->vel_u);
monitor_.set_cog(monitor->cog);
monitor_.set_galhas_status(monitor->galhas_status);
monitor_.set_geohash(monitor->geohash);
monitor_.SerializeToString(&data);
return data;
}
@ -161,6 +163,7 @@ public:
monitor.vel_u = mon.vel_u();
monitor.cog = mon.cog();
monitor.galhas_status = mon.galhas_status();
monitor.geohash = mon.geohash();
return monitor;
}