diff options
author | Gary E. Miller <gem@rellim.com> | 2018-10-26 13:06:23 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-10-26 13:06:23 -0700 |
commit | b33816fe2b9219d2a9cca80091b6264bf579275f (patch) | |
tree | 3ba5aa82990a9da47bfe666858c5b802033c6dfd /driver_superstar2.c | |
parent | bd652ce3cdb577ba9f941c7dec0d1a63015cc25c (diff) | |
download | gpsd-b33816fe2b9219d2a9cca80091b6264bf579275f.tar.gz |
rawdata_t: rearrange structure again.
No need for 140 copies of the identical mtime.
Diffstat (limited to 'driver_superstar2.c')
-rw-r--r-- | driver_superstar2.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/driver_superstar2.c b/driver_superstar2.c index 9ff1cf5e..475d258f 100644 --- a/driver_superstar2.c +++ b/driver_superstar2.c @@ -297,23 +297,24 @@ superstar2_msg_measurement(struct gps_device_t *session, unsigned char *buf, return 0; } t = getled64((char *)buf, 7); /* measurement time */ + session->gpsdata.raw.mtime = t; /* this is so we can tell which never got set */ for (i = 0; i < MAXCHANNELS; i++) - session->gpsdata.raw[i].mtime = 0; + session->gpsdata.raw.meas[i].svid = 0; for (i = 0; i < n; i++) { unsigned long ul; - session->gpsdata.raw[i].mtime = t; session->gpsdata.skyview[i].PRN = (short)(getub(buf, 11 * i + 15) & 0x1f); session->gpsdata.skyview[i].ss = (double)getub(buf, 11 * i * 15 + 1) / 4.0; - session->gpsdata.raw[i].codephase = + session->gpsdata.raw.meas[i].codephase = (double)getleu32(buf, 11 * i * 15 + 2); ul = (unsigned long)getleu32(buf, 11 * i * 15 + 6); - session->gpsdata.raw[i].satstat = (unsigned int)(ul & 0x03L); - session->gpsdata.raw[i].carrierphase = (double)((ul >> 2) & 0x03ffL); - session->gpsdata.raw[i].pseudorange = (double)(ul >> 12); + session->gpsdata.raw.meas[i].satstat = (unsigned int)(ul & 0x03L); + session->gpsdata.raw.meas[i].carrierphase = + (double)((ul >> 2) & 0x03ffL); + session->gpsdata.raw.meas[i].pseudorange = (double)(ul >> 12); } /*The above decode does not look correct, do not report */ |