1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-04 23:40:04 +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

@ -7,48 +7,49 @@ package gnss_sdr;
/* MonitorPvt represents a search query, with pagination options to
* indicate which results to include in the response. */
message MonitorPvt {
uint32 tow_at_current_symbol_ms = 1; // Time of week of the current symbol, in ms
uint32 week = 2; // PVT GPS week
double rx_time = 3; // PVT GPS time
double user_clk_offset = 4; // User clock offset, in s
uint32 tow_at_current_symbol_ms = 1; // Time of week of the current symbol, in ms
uint32 week = 2; // PVT GPS week
double rx_time = 3; // PVT GPS time
double user_clk_offset = 4; // User clock offset, in s
double pos_x = 5; // Position X component in ECEF, expressed in m
double pos_y = 6; // Position Y component in ECEF, expressed in m
double pos_z = 7; // Position Z component in ECEF, expressed in m
double vel_x = 8; // Velocity X component in ECEF, in m/s
double vel_y = 9; // Velocity Y component in ECEF, in m/s
double vel_z = 10; // Velocity Z component in ECEF, in m/s
double pos_x = 5; // Position X component in ECEF, expressed in m
double pos_y = 6; // Position Y component in ECEF, expressed in m
double pos_z = 7; // Position Z component in ECEF, expressed in m
double vel_x = 8; // Velocity X component in ECEF, in m/s
double vel_y = 9; // Velocity Y component in ECEF, in m/s
double vel_z = 10; // Velocity Z component in ECEF, in m/s
double cov_xx = 11; // Position variance in the Y component, in m2
double cov_yy = 12; // Position variance in the Y component, in m2
double cov_zz = 13; // Position variance in the Z component, in m2
double cov_xy = 14; // Position XY covariance, in m2
double cov_yz = 15; // Position YZ covariance, in m2
double cov_zx = 16; // Position ZX covariance, in m2
double cov_xx = 11; // Position variance in the Y component, in m2
double cov_yy = 12; // Position variance in the Y component, in m2
double cov_zz = 13; // Position variance in the Z component, in m2
double cov_xy = 14; // Position XY covariance, in m2
double cov_yz = 15; // Position YZ covariance, in m2
double cov_zx = 16; // Position ZX covariance, in m2
double latitude = 17; // Latitude, in deg. Positive: North
double longitude = 18; // Longitude, in deg. Positive: East
double height = 19; // Height, in m
double latitude = 17; // Latitude, in deg. Positive: North
double longitude = 18; // Longitude, in deg. Positive: East
double height = 19; // Height, in m
uint32 valid_sats = 20; // Number of valid satellites
uint32 solution_status = 21; // RTKLIB solution status
uint32 solution_type = 22; // RTKLIB solution type (0: xyz-ecef, 1: enu-baseline)
float ar_ratio_factor = 23; // Ambiguity resolution ratio factor for validation
float ar_ratio_threshold = 24; // Ambiguity resolution ratio threshold for validation
uint32 valid_sats = 20; // Number of valid satellites
uint32 solution_status = 21; // RTKLIB solution status
uint32 solution_type = 22; // RTKLIB solution type (0: xyz-ecef, 1: enu-baseline)
float ar_ratio_factor = 23; // Ambiguity resolution ratio factor for validation
float ar_ratio_threshold = 24; // Ambiguity resolution ratio threshold for validation
double gdop = 25; // Geometric Dilution of Precision
double pdop = 26; // Position (3D) Dilution of Precision
double hdop = 27; // Horizontal Dilution of Precision
double vdop = 28; // Vertical Dilution of Precision
double gdop = 25; // Geometric Dilution of Precision
double pdop = 26; // Position (3D) Dilution of Precision
double hdop = 27; // Horizontal Dilution of Precision
double vdop = 28; // Vertical Dilution of Precision
double user_clk_drift_ppm = 29; // User clock drift [ppm]
string utc_time = 30; // PVT UTC time (rfc 3339 datetime string)
double user_clk_drift_ppm = 29; // User clock drift [ppm]
string utc_time = 30; // PVT UTC time (rfc 3339 datetime string)
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 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;
}