geopaparazzi / smash

Source code of the SMASH Android/iOS digital field mapping app.
https://www.geopaparazzi.org/smash/index.html
GNU General Public License v3.0
76 stars 26 forks source link

possible GPS filter #53

Open tghoward opened 4 years ago

tghoward commented 4 years ago

Per our discussion here:

https://groups.google.com/d/msg/geopaparazzi-users/qj8bkUAohV0/GO3-SgonAgAJ

A possible enhancement (not a high priority), would be an option for position averaging. The behavior to the user would be:

  1. somewhere in settings the user is able to the default number of positions averaged when collecting a stationary GPS point. Possibly an option to use/not use averaging as the default.
  2. When the user collects a Note, the user is given the option to collect a 'quick note' or an 'averaged note' (or, simply the default setting is used based on number 1, above).
  3. If the user chooses position averaging, then the user is told to keep the gadget steady at a single location. A notification bar begins a count.
  4. At any time, the user can stop averaging by pressing the notification bar. If so, all the points collected up to that time are averaged and this information is stored as the location for that Note.
  5. If the user does not manually stop the averaging, it continues until the default number of points are collected, then stops and stores the averaged information for that Note. The user is notified 'averaging complete'

Here are a few links to the theory and concept that averaging increases precision (but some folks argue: it does not necessarily increase accuracy).

https://gis.stackexchange.com/questions/25798/how-much-sense-does-it-make-to-average-lat-lon-samples-in-order-to-increase-2d

http://gps-test-site.uga.edu/Files/MCFNS_9_1_14-21.pdf

https://github.com/davidvavra/GPS-Averaging

moovida commented 4 years ago

@tghoward I have a question for you. I have been testing the Kalman filter we apply to logging ( I am looking a lot at behaviour when a tunnel is passed).

Since it is a filter based on the variance, I saw it also make static positions less noisy. I was wondering if you ever thought of this way? Would it be possible it gives a similar result as the averaging?

tghoward commented 4 years ago

@moovida, yes, if it reduces variance, it seems like the Kalman filter would be helpful. No, I have not thought about it but I would wonder about whether you could: 1. set the 'depth' of the filter (how many readings should it be based on?) 2. update 'accuracy' measures based on the filter? 3. accommodate "GPS drift"?

If the unit is stationary and there is less noise, but there still is noise, which single-grab reading should one take? The one that says you are 3m north? The one that says you are 2m east? If the answer is 'somewhere between those readings' then we want position averaging. ;)

Again, given the performance of GNSS systems these days, this issue is becoming less and less of an issue! But, also, it is how all survey grade systems record locations. Often with tie-in to stationary base stations.

moovida commented 4 years ago

@tghoward what I have learned from the Kalman filter, which is the most powerful thing I have seen in my life with such a simple concept, is that it consideres:

Just as an example of something done by feet, the following image is me entering a mall. The GPS continued to have some sort of signal every now and then and in between a looot of noise. Note that the transparent is the original and the solid is the filtered. I can tell you that it more or less follows the path I took in the grocery store (part is by car into the underground parking lot, part is the by feet in the store). For me this is black magic and the Kalman filter incredible :-)

image

a zoom in:

image

As I said, the only point considered is the previous and I am not sure if it is feasible to add more depth to it. If you have a math expert over there, I would be happy to add it, if it is possible.

tghoward commented 4 years ago

@moovida Thank you for such a detailed post. It certainly seems amazing that it can do this - very impressive! It seems like it was designed for a moving signal, but would be useful in a stationary signal by ensuring any outliers don't get taken as the reading used at the stationary location. In itself, that seems useful!