Welcome to www.zsoftco.com | |
![]() |
ztrack Geotracker |
FilteringThe ztrack app has three filters, but before I go into how the filters work, I want to mention that ztrack always records all of the raw data from your GNSS receiver. The nice thing about recording the raw data is that you can post-process the data in various ways to see how the filters affect the raw data. The next thing I want to mention about filtering is that I'm still doing research on the best filters to use on GNSS data, so I may add more filtering options in the future. Okay, given that background, let's dive into the filters. The first filter is the accuracy filter, and it's the simplest filter. It's disabled by default, but you can enable it in the settings. The accuracy filter works by throwing away samples that are less accurate than the filter setting you select. The accuracy of a sample comes from the Android location API. In summary, a sample with a smaller value is more accurate. I use an accuracy filter 20 m (66 ft) most of the time. The accuracy filter ignores inaccurate samples, but it can create gaps in your track. When computing the length of the track, ztrack assumes that you traveled in a great-circle path during any gaps. For altitude, speed, and heading ztrack simply ignores inaccurate samples. The next two filters are the altitude and speed filters. These filters are both simple infinite impulse response (IIR) filters. The ztrack app applies these filters after applying the accuracy filter. The filters are fast, battery-efficient, low-pass filters, meaning that they smooth out spikes (high-frequency components) in the input signal, without being too compute intensive. The pseudo code used to obtain filtered values from the input stream of unfiltered values (see the Wikipedia article above) is: y[i] := y[i-1] + α * (x[i] - y[i-1]) This formula says that each filtered value, y[i], is the previous filtered value, y[i-1], plus a coefficient, α, times the current unfiltered sample, x[i], minus the previous filtered value. As the α value approaches 1, the filter has less effect. If α; is 1, the formula reduces to y[i] := x[i] which means that the filter is disabled. For smaller values of α, the filter is stronger, meaning that the new sample has a smaller influence on the filtered result. At the extreme, α of 0, new samples have no effect at all on the filtered result. In summary, smaller values smooth the data more than larger values. The ztrack app has two settings to control these coefficients. The altitude filter coefficient, which defaults to 0.075 (stronger), and the speed filter coefficient, which defaults to 0.75 (weaker). You can tune these to see how they affect your track. The speed filter also has the property that a raw speed sample of zero results in a filtered speed sample of zero. If you stopped, you stopped. On the chart screen, the altitude and speed charts allow you to display either IIR-filtered data (default) in orange, unfiltered data in cyan, or both. The data on these charts always has the accuracy filter applied. On the stats screen, you can display either filtered data (default) or unfiltered data. This affects the speed and altitude stats; it doesn't affect the accuracy stats. Like the chart screen, the data on the stats screen always has the accuracy filter applied. One final note on filters: ztrack ignores all filers when creating a KMZ or CSV export file. The exported data is the raw data, which allows you to use your data outside ztrack in any way you see fit. I'm researching Kalman filters as well to use either in place of or as an alternative to the IIR filter. I don't want the app to get too complicated, but I want to give folks an opportunity to view their data in different ways. |