diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-22 01:38:51 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-22 01:38:51 +0000 |
commit | 51fc3a79ff59cb96375c0a84106b1225192b342c (patch) | |
tree | d79844927d9a946e8a2193a067d978d856c9ed0c | |
parent | e0d0dbb182ea7b141d78c0cffde81faf994302c7 (diff) | |
download | gpsd-51fc3a79ff59cb96375c0a84106b1225192b342c.tar.gz |
hdop = sqrt(xdop**2 + ydop**2);
therefore, if all we have is hdop, we should set xdop = ydop = hdop/sqrt(2).
-rw-r--r-- | libgps.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -175,8 +175,8 @@ int gps_unpack(char *buf, struct gps_data_t *gpsdata) #define DEFAULT(val) (val[0] == '?') ? NAN : atof(val) /*@ +floatdouble @*/ gpsdata->epe = DEFAULT(epe); - gpsdata->fix.epx = DEFAULT(eph); - gpsdata->fix.epy = DEFAULT(eph); + gpsdata->fix.epx = DEFAULT(eph)/sqrt(2); + gpsdata->fix.epy = DEFAULT(eph)/sqrt(2); gpsdata->fix.epv = DEFAULT(epv); /*@ -floatdouble @*/ #undef DEFAULT |