summaryrefslogtreecommitdiff
path: root/driver_superstar2.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-10-01 23:24:21 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-10-01 23:24:21 +0000
commita93eedd514133ea4a60fd0756947c827546d72c5 (patch)
tree9ae1bba752acb0130dcf1c1cf82e8a4452b28153 /driver_superstar2.c
parent1711ebc03a92948579855c860759f18fa9d328d0 (diff)
downloadgpsd-a93eedd514133ea4a60fd0756947c827546d72c5.tar.gz
Clear up some driver-level confusion surrounding timestamp setting.
There was lots of duplicative setting of gpsdata.fix.time and gpsdata.sentence_time. The latter is now gone. The only case the sentence_time member was actually used for was timestamping skyviews; a new gpsdata.skyview_time now handles that, and all drivers set it properly.
Diffstat (limited to 'driver_superstar2.c')
-rw-r--r--driver_superstar2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver_superstar2.c b/driver_superstar2.c
index ce2a60ab..06fd8c99 100644
--- a/driver_superstar2.c
+++ b/driver_superstar2.c
@@ -102,7 +102,7 @@ superstar2_msg_navsol_lla(struct gps_device_t *session,
tm.tm_mday = (int)getub(buf, 14);
tm.tm_mon = (int)getub(buf, 15) - 1;
tm.tm_year = (int)getleuw(buf, 16) - 1900;
- session->gpsdata.fix.time = session->gpsdata.sentence_time =
+ session->gpsdata.fix.time =
timegm(&tm) + (d - tm.tm_sec);
mask |= TIME_SET;
@@ -199,7 +199,7 @@ superstar2_msg_navsol_ecef(struct gps_device_t *session,
session->driver.superstar2.gps_week = getleuw(buf, 12);
tm = gpstime_to_unix((int)session->driver.superstar2.gps_week, tow) -
session->context->leap_seconds;
- session->gpsdata.fix.time = session->gpsdata.sentence_time = tm;
+ session->gpsdata.fix.time = tm;
mask |= TIME_SET;
/* extract the earth-centered, earth-fixed (ECEF) solution */
@@ -299,6 +299,7 @@ superstar2_msg_svinfo(struct gps_device_t *session,
if(session->gpsdata.PRN[i])
st++;
}
+ session->gpsdata.skyview_time = timestamp();
session->gpsdata.satellites_used = nsv;
session->gpsdata.satellites_visible = st;
gpsd_report(LOG_DATA,