mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-16 23:04:57 +00:00
Fix computation of lock time
LLI still not implemented, values will be incorrect upon first loss of lock.
This commit is contained in:
parent
0ea36db356
commit
8fe691dc76
@ -271,19 +271,21 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), g
|
|||||||
// ############ 1. READ PSEUDORANGES ####
|
// ############ 1. READ PSEUDORANGES ####
|
||||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||||
{
|
{
|
||||||
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
|
|
||||||
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
|
|
||||||
if (in[i][0].Flag_valid_pseudorange == true)
|
if (in[i][0].Flag_valid_pseudorange == true)
|
||||||
{
|
{
|
||||||
gnss_pseudoranges_map.insert(std::pair<int,Gnss_Synchro>(in[i][0].PRN, in[i][0])); // store valid pseudoranges in a map
|
gnss_pseudoranges_map.insert(std::pair<int,Gnss_Synchro>(in[i][0].PRN, in[i][0])); // store valid pseudoranges in a map
|
||||||
d_rx_time = in[i][0].d_TOW_at_current_symbol; // all the channels have the same RX timestamp (common RX time pseudoranges)
|
d_rx_time = in[i][0].d_TOW_at_current_symbol; // all the channels have the same RX timestamp (common RX time pseudoranges)
|
||||||
d_rtcm_printer->lock_time(gps_ephemeris_iter->second, d_rx_time, in[i][0]); // keep track of locking time
|
if(d_ls_pvt->gps_ephemeris_map.size() > 0)
|
||||||
}
|
{
|
||||||
else
|
std::map<int,Gps_Ephemeris>::iterator tmp_eph_iter = d_ls_pvt->gps_ephemeris_map.find(in[i][0].PRN);
|
||||||
{
|
if(tmp_eph_iter != d_ls_pvt->gps_ephemeris_map.end())
|
||||||
d_rtcm_printer->lock_time(gps_ephemeris_iter->second, 0.0, in[i][0]);
|
{
|
||||||
|
d_rtcm_printer->lock_time(d_ls_pvt->gps_ephemeris_map.find(in[i][0].PRN)->second, d_rx_time, in[i][0]); // keep track of locking time
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ############ 2 COMPUTE THE PVT ################################
|
// ############ 2 COMPUTE THE PVT ################################
|
||||||
if (gnss_pseudoranges_map.size() > 0 and d_ls_pvt->gps_ephemeris_map.size() > 0)
|
if (gnss_pseudoranges_map.size() > 0 and d_ls_pvt->gps_ephemeris_map.size() > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user