View Single Post
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#62
Hi digitalvoid,

One more case for you
Haven't checked the code but i get the impression that you are doing some kind of averaging from the last 4 coordinates.

IMHO, you should choose the one with the best accuracy instead.

Here is an example of how the best location guess has not been given back but instead one with 50km error. (the effect might be also augmented as I am traveling at the moment and the first lock is way out in accuracy but I think is a good example to show the issue).

Code:
(Sat Aug 28 23:40:39 2010) DAEMON: starting GPS device
(Sat Aug 28 23:40:39 2010) DAEMON: waiting for accurate GPS lock
(Sat Aug 28 23:40:41 2010) DAEMON: waiting for accurate GPS lock
(Sat Aug 28 23:40:42 2010) DAEMON: waiting for accurate GPS lock
(Sat Aug 28 23:40:44 2010) DAEMON: waiting for accurate GPS lock
(Sat Aug 28 23:41:15 2010) DAEMON: waiting for accurate GPS lock
(Sat Aug 28 23:41:31 2010) DAEMON: start collecting multiple GPS coordinates
(Sat Aug 28 23:41:31 2010) DAEMON: GPS coordinate acquired (#1, 51.8 sec, 46.500000, 8.200000, 200000.0 meter)
(Sat Aug 28 23:41:32 2010) DAEMON: GPS coordinate acquired (#2, 52.9 sec, 46.209886, 6.139363, 3034.8 meter)
(Sat Aug 28 23:41:35 2010) DAEMON: GPS coordinate acquired (#3, 56.5 sec, 46.209886, 6.139363, 3034.8 meter)
(Sat Aug 28 23:41:36 2010) DAEMON: GPS coordinate acquired (#4, 57.0 sec, 46.209886, 6.139363, 3034.8 meter)
(Sat Aug 28 23:41:36 2010) DAEMON: accurate GPS coordinate calculated (46.282414, 6.654522, 52276.1, 57.0)
(Sat Aug 28 23:41:37 2010) DAEMON: stopping GPS device