summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver_italk.c1
-rw-r--r--driver_nmea0183.c2
-rw-r--r--driver_sirf.c4
-rw-r--r--driver_ubx.c2
-rw-r--r--driver_zodiac.c3
-rw-r--r--gpsutils.c3
6 files changed, 10 insertions, 5 deletions
diff --git a/driver_italk.c b/driver_italk.c
index f15363e2..2a89cb71 100644
--- a/driver_italk.c
+++ b/driver_italk.c
@@ -82,6 +82,7 @@ static gps_mask_t decode_itk_navfix(struct gps_device_t *session,
*/
session->newdata.eps = (double)(getles32(buf, 7 + 254) / 100.0);
/* compute epx/epy in gpsd_error_model(), not here */
+ mask |= HERR_SET;
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
session->gpsdata.satellites_used =
diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index ac47597a..16e33a3e 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -1658,11 +1658,13 @@ static gps_mask_t processPSRFEPE(int c UNUSED, char *field[],
if ('\0' != field[4][0]) {
/* EHPE (Estimated Horizontal Position Error) */
session->newdata.eph = safe_atof(field[4]);
+ mask |= HERR_SET;
}
if ('\0' != field[5][0]) {
/* Estimated Vertical Position Error (meters, 0.01 resolution) */
session->newdata.epv = safe_atof(field[5]);
+ mask |= VERR_SET;
}
if ('\0' != field[6][0]) {
diff --git a/driver_sirf.c b/driver_sirf.c
index 6374b40c..e361a9cf 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -1593,8 +1593,8 @@ static gps_mask_t sirf_msg_geodetic(struct gps_device_t *session,
if (session->newdata.latitude != 0 && session->newdata.latitude != 0)
mask |= LATLON_SET;
- if ((eph = getbes32(buf, 50) * 1e-2) > 0) {
- session->newdata.epx = session->newdata.epy = eph / sqrt(2);
+ if ((eph = getbes32(buf, 50)) > 0) {
+ session->newdata.eph = eph * 1e-2;
mask |= HERR_SET;
}
dbl_temp = getbes32(buf, 54) * 1e-2;
diff --git a/driver_ubx.c b/driver_ubx.c
index 3ec8aa5e..5e2ac966 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -513,7 +513,7 @@ static gps_mask_t
ubx_msg_nav_posllh(struct gps_device_t *session, unsigned char *buf,
size_t data_len UNUSED)
{
- gps_mask_t mask = ONLINE_SET | VERR_SET;
+ gps_mask_t mask = ONLINE_SET | HERR_SET | VERR_SET;
/* FIXME: should also get time, lat/lon/alt */
/* Horizontal accuracy estimate in mm, unknown type */
diff --git a/driver_zodiac.c b/driver_zodiac.c
index 373fb99f..70a4960c 100644
--- a/driver_zodiac.c
+++ b/driver_zodiac.c
@@ -204,7 +204,8 @@ static gps_mask_t handle1000(struct gps_device_t *session)
/* clock_drift_sd = (int)getzlong(53) * 1e-2; */
mask = TIME_SET | NTPTIME_IS | LATLON_SET | ALTITUDE_SET | CLIMB_SET |
- SPEED_SET | TRACK_SET | STATUS_SET | MODE_SET;
+ SPEED_SET | TRACK_SET | STATUS_SET | MODE_SET |
+ HERR_SET | SPEEDERR_SET | VERR_SET;
gpsd_log(&session->context->errout, LOG_DATA,
"1000: time=%.2f lat=%.2f lon=%.2f alt=%.2f track=%.2f speed=%.2f climb=%.2f mode=%d status=%d\n",
session->newdata.time, session->newdata.latitude,
diff --git a/gpsutils.c b/gpsutils.c
index ab341010..988e4fb7 100644
--- a/gpsutils.c
+++ b/gpsutils.c
@@ -330,7 +330,8 @@ void gps_merge_fix(struct gps_fix_t *to,
to->climb = from->climb;
if ((transfer & TIMERR_SET) != 0)
to->ept = from->ept;
- if ((transfer & HERR_SET) != 0) {
+ if (0 != isfinite(from->epx) &&
+ 0 != isfinite(from->epy)) {
to->epx = from->epx;
to->epy = from->epy;
}