1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 11:40:33 +00:00

Bug correction in SUPL client (the assistance TOW scale was 0.08 s instead of 1 s)

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@409 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Javier Arribas 2013-08-23 08:56:24 +00:00
parent 0139591baa
commit 545f50fa47
2 changed files with 9 additions and 5 deletions

View File

@ -179,7 +179,8 @@ void gnss_sdr_supl_client::read_supl_data()
// READ REFERENCE TIME
if (assist.set & SUPL_RRLP_ASSIST_REFTIME)
{
gps_time.d_TOW = (double)assist.time.gps_tow;
/* TS 44.031: GPSTOW, range 0-604799.92, resolution 0.08 sec, 23-bit presentation */
gps_time.d_TOW = ((double)assist.time.gps_tow)*0.08;
gps_time.d_Week = (double)assist.time.gps_week;
gps_time.d_tv_sec = (double)assist.time.stamp.tv_sec;
gps_time.d_tv_usec = (double)assist.time.stamp.tv_usec;
@ -265,7 +266,8 @@ void gnss_sdr_supl_client::read_supl_data()
if (gps_time.valid)
{
gps_eph_iterator->second.i_GPS_week = assist.time.gps_week;
gps_eph_iterator->second.d_TOW = assist.time.gps_tow;
/* TS 44.031: GPSTOW, range 0-604799.92, resolution 0.08 sec, 23-bit presentation */
gps_eph_iterator->second.d_TOW = ((double)assist.time.gps_tow)*0.08;
}
else
{

View File

@ -197,7 +197,9 @@ static time_t utc_time(int week, long tow) {
/* soon week will wrap again, uh oh... */
/* TS 44.031: GPSTOW, range 0-604799.92, resolution 0.08 sec, 23-bit presentation */
t += (1024 + week) * 604800 + tow*0.08;
/* The factor 0.08 was applied in the ephemeris SUPL class */
/* here the tow is in [s] */
t += (1024 + week) * 604800 + tow;
return t;
}
@ -417,8 +419,8 @@ int main(int argc, char** argv)
std::cout << "Reference location (defined in config file):" << std::endl;
std::cout << "Latitude=" << lat_deg << " [¼]" << std::endl;
std::cout << "Longitude=" << lon_deg << " [¼]" << std::endl;
std::cout << "Latitude=" << lat_deg << " [<EFBFBD>]" << std::endl;
std::cout << "Longitude=" << lon_deg << " [<EFBFBD>]" << std::endl;
std::cout << "Altitude=" << altitude_m << " [m]" << std::endl;
if (doppler_measurements_map.size() == 0)