mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-12 02:10:34 +00:00
bugfix: Fixes signal identifier for GLONASS GNAV
Signal identifier for GLONASS L1 C/A was changed internally to be `1G` instead of the '1C' originally conceived from the navigation software. Also, forces PRN number update from decoding interface
This commit is contained in:
parent
e0dfd90916
commit
ea675b4baa
@ -67,7 +67,16 @@ Observables.dump_filename=/archive/glo_observables.dat
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.averaging_depth=100
|
||||
PVT.flag_averaging=true
|
||||
PVT.output_rate_ms=10
|
||||
PVT.positioning_mode=PPP_Static
|
||||
PVT.output_rate_ms=100
|
||||
PVT.display_rate_ms=500
|
||||
PVT.trop_model=Saastamoinen
|
||||
PVT.flag_rtcm_server=true
|
||||
PVT.flag_rtcm_tty_port=false
|
||||
PVT.rtcm_dump_devname=/dev/pts/1
|
||||
PVT.rtcm_tcp_port=2101
|
||||
PVT.rtcm_MT1019_rate_ms=5000
|
||||
PVT.rtcm_MT1045_rate_ms=5000
|
||||
PVT.rtcm_MT1097_rate_ms=1000
|
||||
PVT.rtcm_MT1077_rate_ms=1000
|
||||
PVT.rinex_version=2
|
||||
|
@ -547,8 +547,8 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
|| ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2S") == 0))
|
||||
|| ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1B") == 0))
|
||||
|| ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("5X") == 0))
|
||||
|| ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1C") == 0))
|
||||
|| ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2C") == 0)))
|
||||
|| ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1G") == 0))
|
||||
|| ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2G") == 0)))
|
||||
{
|
||||
// store valid observables in a map.
|
||||
gnss_observables_map.insert(std::pair<int,Gnss_Synchro>(i, in[i][epoch]));
|
||||
@ -579,7 +579,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
{
|
||||
if(tmp_eph_iter_glo_gnav != d_ls_pvt->glonass_gnav_ephemeris_map.end())
|
||||
{
|
||||
//d_rtcm_printer->lock_time(d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
|
||||
d_rtcm_printer->lock_time(d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
|
||||
}
|
||||
}
|
||||
|
||||
@ -839,7 +839,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
}
|
||||
if(type_of_rx == 23) // GLONASS L1 C/A only
|
||||
{
|
||||
std::string signal("1C");
|
||||
std::string signal("1G");
|
||||
if (glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend())
|
||||
{
|
||||
rp->rinex_obs_header(rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
||||
@ -849,7 +849,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
}
|
||||
if(type_of_rx == 24) // GLONASS L2 C/A only
|
||||
{
|
||||
std::string signal("2C");
|
||||
std::string signal("2G");
|
||||
if (glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend())
|
||||
{
|
||||
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
|
||||
@ -859,7 +859,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
}
|
||||
if(type_of_rx == 25) // GLONASS L1 C/A + GLONASS L2 C/A
|
||||
{
|
||||
std::string signal("1C 2C");
|
||||
std::string signal("1G 2G");
|
||||
if (glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend())
|
||||
{
|
||||
rp->rinex_obs_header(rp->obsFile, glonass_gnav_ephemeris_iter->second, d_rx_time, signal);
|
||||
@ -872,7 +872,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) )
|
||||
{
|
||||
std::string glo_signal("1C");
|
||||
std::string glo_signal("1G");
|
||||
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
@ -882,7 +882,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) )
|
||||
{
|
||||
std::string glo_signal("1C");
|
||||
std::string glo_signal("1G");
|
||||
std::string gal_signal("1B");
|
||||
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
|
||||
@ -1112,7 +1112,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) )
|
||||
{
|
||||
std::string glo_signal("1C");
|
||||
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, gnss_observables_map);
|
||||
|
||||
}
|
||||
|
@ -3208,9 +3208,9 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem
|
||||
strm << numberTypesObservations;
|
||||
line += Rinex_Printer::rightJustify(strm.str(), 3);
|
||||
|
||||
std::string signal_ = "1C";
|
||||
std::string signal_ = "1G";
|
||||
std::size_t found_1C = glonass_bands.find(signal_);
|
||||
signal_ = "2C";
|
||||
signal_ = "2G";
|
||||
std::size_t found_2C = glonass_bands.find(signal_);
|
||||
|
||||
if(found_1C != std::string::npos)
|
||||
@ -3535,13 +3535,13 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
|
||||
// Find GLONASS Signal in Mixed file
|
||||
unsigned int number_of_observations_glo = 0;
|
||||
std::string signal_("1C");
|
||||
std::string signal_("1G");
|
||||
std::size_t found_1C = glonass_bands.find(signal_);
|
||||
if(found_1C != std::string::npos)
|
||||
{
|
||||
number_of_observations_glo = number_of_observations_glo + 4;
|
||||
}
|
||||
signal_ = "2C";
|
||||
signal_ = "2G";
|
||||
std::size_t found_2C = glonass_bands.find(signal_);
|
||||
if(found_2C != std::string::npos)
|
||||
{
|
||||
@ -3851,13 +3851,13 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
|
||||
|
||||
line.clear();
|
||||
unsigned int number_of_observations_glo = 0;
|
||||
signal_ = "1C";
|
||||
signal_ = "1G";
|
||||
std::size_t found_1C = glonass_bands.find(signal_);
|
||||
if(found_1C != std::string::npos)
|
||||
{
|
||||
number_of_observations_glo = number_of_observations_glo + 4;
|
||||
}
|
||||
signal_ = "2C";
|
||||
signal_ = "2G";
|
||||
std::size_t found_2C = glonass_bands.find(signal_);
|
||||
if(found_2C != std::string::npos)
|
||||
{
|
||||
|
@ -282,7 +282,7 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
|
||||
{
|
||||
std::string sig_(gnss_observables_iter->second.Signal);
|
||||
// GLONASS GNAV L1
|
||||
if(sig_.compare("1C") == 0)
|
||||
if(sig_.compare("1G") == 0)
|
||||
{
|
||||
// 1 Glo - find the ephemeris for the current GLONASS SV observation. The SV Slot Number (PRN ID) is the map key
|
||||
glonass_gnav_ephemeris_iter = glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
@ -305,7 +305,7 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
|
||||
|
||||
}
|
||||
// GLONASS GNAV L2
|
||||
if(sig_.compare("2C") == 0)
|
||||
if(sig_.compare("2G") == 0)
|
||||
{
|
||||
// 1 Gal - find the ephemeris for the current GALILEO SV observation. The SV PRN ID is the map key
|
||||
glonass_gnav_ephemeris_iter = glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
@ -364,6 +364,7 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
|
||||
int result = 0;
|
||||
nav_t nav_data;
|
||||
nav_data.eph = eph_data;
|
||||
nav_data.geph = geph_data;
|
||||
nav_data.n = valid_obs;
|
||||
for (int i = 0; i < MAXSAT; i++)
|
||||
{
|
||||
|
@ -71,24 +71,24 @@ geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris & glonass_gnav_eph)
|
||||
gtime_t t_utc;
|
||||
struct tm utcinfo;
|
||||
|
||||
rtklib_sat.sat = glonass_gnav_eph.i_satellite_slot_number; /* satellite number */
|
||||
rtklib_sat.iode = glonass_gnav_eph.d_iode; /* IODE (0-6 bit of tb field) */
|
||||
rtklib_sat.frq = glonass_gnav_eph.i_satellite_freq_channel; /* satellite frequency number */
|
||||
rtklib_sat.svh = glonass_gnav_eph.d_l3rd_n; /* satellite health*/
|
||||
rtklib_sat.sva = glonass_gnav_eph.d_F_T; /* satellite accuracy*/
|
||||
rtklib_sat.age = glonass_gnav_eph.d_E_n; /* satellite age*/
|
||||
rtklib_sat.pos[0] = glonass_gnav_eph.d_Xn*1000; /* satellite position (ecef) (m) */
|
||||
rtklib_sat.pos[1] = glonass_gnav_eph.d_Yn*1000; /* satellite position (ecef) (m) */
|
||||
rtklib_sat.pos[2] = glonass_gnav_eph.d_Zn*1000; /* satellite position (ecef) (m) */
|
||||
rtklib_sat.vel[0] = glonass_gnav_eph.d_VXn*1000; /* satellite velocity (ecef) (m/s) */
|
||||
rtklib_sat.vel[1] = glonass_gnav_eph.d_VYn*1000; /* satellite velocity (ecef) (m/s) */
|
||||
rtklib_sat.vel[2] = glonass_gnav_eph.d_VZn*1000; /* satellite velocity (ecef) (m/s) */
|
||||
rtklib_sat.acc[0] = glonass_gnav_eph.d_AXn*1000; /* satellite acceleration (ecef) (m/s^2) */
|
||||
rtklib_sat.acc[1] = glonass_gnav_eph.d_AYn*1000; /* satellite acceleration (ecef) (m/s^2) */
|
||||
rtklib_sat.acc[2] = glonass_gnav_eph.d_AZn*1000; /* satellite acceleration (ecef) (m/s^2) */
|
||||
rtklib_sat.taun = glonass_gnav_eph.d_tau_n; /* SV clock bias (s) */
|
||||
rtklib_sat.gamn = glonass_gnav_eph.d_gamma_n; /* SV relative freq bias */
|
||||
rtklib_sat.age = glonass_gnav_eph.d_Delta_tau_n; /* delay between L1 and L2 (s) */
|
||||
rtklib_sat.sat = glonass_gnav_eph.i_satellite_slot_number; /* satellite number */
|
||||
rtklib_sat.iode = static_cast<int>(glonass_gnav_eph.d_t_b); /* IODE (0-6 bit of tb field) */
|
||||
rtklib_sat.frq = glonass_gnav_eph.i_satellite_freq_channel; /* satellite frequency number */
|
||||
rtklib_sat.svh = glonass_gnav_eph.d_l3rd_n; /* satellite health*/
|
||||
rtklib_sat.sva = static_cast<int>(glonass_gnav_eph.d_F_T); /* satellite accuracy*/
|
||||
rtklib_sat.age = static_cast<int>(glonass_gnav_eph.d_E_n); /* satellite age*/
|
||||
rtklib_sat.pos[0] = glonass_gnav_eph.d_Xn*1000; /* satellite position (ecef) (m) */
|
||||
rtklib_sat.pos[1] = glonass_gnav_eph.d_Yn*1000; /* satellite position (ecef) (m) */
|
||||
rtklib_sat.pos[2] = glonass_gnav_eph.d_Zn*1000; /* satellite position (ecef) (m) */
|
||||
rtklib_sat.vel[0] = glonass_gnav_eph.d_VXn*1000; /* satellite velocity (ecef) (m/s) */
|
||||
rtklib_sat.vel[1] = glonass_gnav_eph.d_VYn*1000; /* satellite velocity (ecef) (m/s) */
|
||||
rtklib_sat.vel[2] = glonass_gnav_eph.d_VZn*1000; /* satellite velocity (ecef) (m/s) */
|
||||
rtklib_sat.acc[0] = glonass_gnav_eph.d_AXn*1000; /* satellite acceleration (ecef) (m/s^2) */
|
||||
rtklib_sat.acc[1] = glonass_gnav_eph.d_AYn*1000; /* satellite acceleration (ecef) (m/s^2) */
|
||||
rtklib_sat.acc[2] = glonass_gnav_eph.d_AZn*1000; /* satellite acceleration (ecef) (m/s^2) */
|
||||
rtklib_sat.taun = glonass_gnav_eph.d_tau_n; /* SV clock bias (s) */
|
||||
rtklib_sat.gamn = glonass_gnav_eph.d_gamma_n; /* SV relative freq bias */
|
||||
rtklib_sat.age = static_cast<int>(glonass_gnav_eph.d_Delta_tau_n); /* delay between L1 and L2 (s) */
|
||||
|
||||
utcinfo.tm_mon = 0;
|
||||
utcinfo.tm_mday = glonass_gnav_eph.d_N_T;
|
||||
|
@ -379,6 +379,7 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attrib
|
||||
current_symbol.Flag_valid_word = false;
|
||||
}
|
||||
|
||||
current_symbol.PRN = this->d_satellite.get_PRN();
|
||||
current_symbol.TOW_at_current_symbol_s = floor(d_TOW_at_current_symbol*1000.0)/1000.0;
|
||||
current_symbol.TOW_at_current_symbol_s -=delta_t; //Galileo to GPS TOW
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user