diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-30 22:03:11 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-30 22:03:11 +0000 |
commit | 97b9548cff261e13a5b592d31add94631ff4dbc9 (patch) | |
tree | f46a1c984d841d3d2d8d83836d01db57d3e8ccf9 /driver_garmin_txt.c | |
parent | b9f18fea09961f5e7476130a67e4e89379e12571 (diff) | |
download | gpsd-97b9548cff261e13a5b592d31add94631ff4dbc9.tar.gz |
Fix computation of epx and epy from eph.
Factor of 1/sqrt(2) has to be applied (on the assumption that epx and
epy are equal).
Diffstat (limited to 'driver_garmin_txt.c')
-rw-r--r-- | driver_garmin_txt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/driver_garmin_txt.c b/driver_garmin_txt.c index 13f10881..397d605d 100644 --- a/driver_garmin_txt.c +++ b/driver_garmin_txt.c @@ -378,7 +378,8 @@ gps_mask_t garmintxt_parse(struct gps_device_t *session) do { double eph; if (0 != gar_decode((char *) session->packet.outbuffer+31, 3, "", 1.0, &eph)) break; - session->gpsdata.fix.epx = session->gpsdata.fix.epy = eph * (GPSD_CONFIDENCE/CEP50_SIGMA); + /* eph is a circular error, sqrt(epx**2 + epy**2) */ + session->gpsdata.fix.epx = session->gpsdata.fix.epy = eph * (1/sqrt(2)) * (GPSD_CONFIDENCE/CEP50_SIGMA); mask |= HERR_SET; } while (0); |