From 31c60376876a5a2317a4a1db9dcc03a93d234134 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 15 Mar 2019 11:23:45 -0700 Subject: libgpsd_core: Simplify epc computation. The computed epc does not match epc from some GPS. --- libgpsd_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libgpsd_core.c') 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; } } -- cgit v1.2.1