summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-03-15 11:23:45 -0700
committerGary E. Miller <gem@rellim.com>2019-03-15 11:23:45 -0700
commit31c60376876a5a2317a4a1db9dcc03a93d234134 (patch)
tree92bd6d9f0ec4f258530238b489943bd89fcd89fa /libgpsd_core.c
parent492c1446529f2894f85413a6dc7d182abf92e83a (diff)
downloadgpsd-31c60376876a5a2317a4a1db9dcc03a93d234134.tar.gz
libgpsd_core: Simplify epc computation.
The computed epc does not match epc from some GPS.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 09351713..ee52bec5 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1072,11 +1072,10 @@ static void gpsd_error_model(struct gps_device_t *session)
}
if (0 == isfinite(fix->epc) &&
- MODE_3D <= fix->mode &&
- MODE_3D <= oldfix->mode) {
+ 0 != isfinite(fix->epv) &&
+ 0 != isfinite(oldfix->epv)) {
/* Is this really valid? */
/* if vertical uncertainties are zero this will be too */
- /* luckily this propagates NAN */
fix->epc = (oldfix->epv + fix->epv) / deltatime;
}
}