From 545f50fa472e61130bf6fabf301322c8369fea6b Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Fri, 23 Aug 2013 08:56:24 +0000 Subject: [PATCH] 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 --- src/core/libs/gnss_sdr_supl_client.cc | 6 ++++-- src/utils/front-end-cal/main.cc | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/libs/gnss_sdr_supl_client.cc b/src/core/libs/gnss_sdr_supl_client.cc index ba0dfaf65..35f402fa0 100644 --- a/src/core/libs/gnss_sdr_supl_client.cc +++ b/src/core/libs/gnss_sdr_supl_client.cc @@ -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 { diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index eb4f8a0c8..a65af4fe6 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -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 << " [�]" << std::endl; + std::cout << "Longitude=" << lon_deg << " [�]" << std::endl; std::cout << "Altitude=" << altitude_m << " [m]" << std::endl; if (doppler_measurements_map.size() == 0)