There is always a lot of uncertainty when dealing with a new GPS system, that goes well beyond the immediate needs of powering up, interfacing to, and communicating with the hardware, such as:

* How much ‘Positional Noise” is there in the readings?

* How accurate is the Altitude reading?

* Can I correlate the HDOP (Horizontal dilution of precision) value to positional inaccuracy?

* Can I correlate the Number of Satellites seen to positional inaccuracy?

Well the Internet has many ‘opinions’ but dew real answers or data… A good overview of the GPS signal accuracy as transmitted can be found in reference [1], but this does not easily relate to what actual user experience, on the receiving end will be. I will present my basic measurements here to see if we can answer the above questions.

I recently started a small GPS Tracking project and the GPS selected was the MediaTek MTK3339 [2], because this all I one GPS is a fully integrated GPS with a built in Antenna, has good ‘Data Sheet’ Performance and Adafruit (as always) provides some really useful breakout boards which made early prototyping and testing easy [3].

After cobbling together some prototype software to read, store and display positions and calculate distances, data was acquired for several long periods to answer the above questions.

#### Procedure:

I sat the GPS prototype in a location inside my LAB, which is a wood frame building that is pretty transparent to GPS Signals – The GPS never sees less than 5 Satellites at any time and recorded around 9 hours of data over several days. I plotted this data on a Map using the GPS Visualizer [4] to see where the positional ‘Tracks’ were as shown in Figure 1.**Figure 1 – Using the Web Based Plotting Page "GPS Visualizer" I plotted 9 Hours of positional data with the GPS absolutely stationary. As you can see there is some positional ‘noise’ or ‘meandering’ in the readings. At the very bottom of this figure is a distance scale.**

While the true and accurate position on the Earth down to a foot is difficult to ascertain unless you are a surveyor, I averaged all the data in Figure 1 and came up with an average position. On subsequent data runs I compared this data to the previous average positions and the results are almost exactly the same, that is the data overlays itself to within 0.5 Feet. This suggests that if there are any systematic measurement offsets or errors, these errors are static day to day. The data certainly looks to be within a foot to the detail that I can see on Google Maps (assuming that Google Maps is accurate to a foot).

For my intended application a 50 foot accuracy is more than enough. The real worry is since my tracking application is also recording total distance traveled, I need to know what the GPS positional noise is so that I can have a limit on how much movement is required before I log it. This prevents me from recording or integrating the noise into a false distance.

With the foregoing in mind lets look at 9 hours of data recorded with the GPS receiver stationary in my Lab. The ‘Delta Distance’ is the instantaneous distance calculated for any reading to the average value of all 9 hours of data acquired. If we assume that the long term mean is correct, which it looks to be, then this would be a measure of the instantaneous noise. The GPS receiver is operated at a 1 Sample per second rate and the data recorded is on every fifteenth sample.

**Figure 2a – Using the average of all the data as a reference point, the delta distance of each reading is plotted. The peak distance from the average can be quite large as can be seen. The Red Line is a one hour moving average which smooths the peak error by almost 3:1.**

**Figure 2b – Same setup as Figure 1a, but with the data captured on a different day.**

More statistics of figure 1a and 1b. The Peak error was: 54.1 Feet for figure 1a and 68.1 feet for figure 1b, RMS error of all points was: 16.3 and 16.5 Feet respectively. This 16 Feet RMS error compares well with what reference [1] states as a typical expected user accuracy.

Now the question becomes: Can I use some other measure to know about any one measurement to get an idea about the probable error in that particular measurement? All GPS units that I have seen also supply a HDOP calculation [5] and you can also get the number of Satellites that the GPS is currently basing the calculations on.

**Figure 3 – A Scatter Plot to see if there is any correlation between delta distance and the number of Satellites used in the calculations as recorded by the GPS. As can be see, there is no correlation here at all.**

**Figure 4 - A Scatter Plot to see if there is any correlation between delta distance and the HDOP as recorded by the GPS. As can be see, there is no correlation here at all either.**

#### Conclusion:

Errors happen in every measuring instrument or system. With this GPS you can be reasonably certain that your maximum positional error will be less than 70 feet as was verified by me over several 9 hour stints of data recording. This testing for long periods of time and on several different days gave plenty of time for the satellites to be in all sorts of positions both good and bad for measurements.As for using more data supplied by the GPS to get an ‘instant’ sense about how much any one particular reading is in error, at least for this particular receiver, neither the number of Satellites or the HDOP correlates to any instantaneous positional error that I can see. Bottom line is: You can’t be sure of the errors until you acquire enough data (At least an hours worth) in any stationary spot to tell what the errors likely are [6].

By way of actual data this hopefully gives some people better data with which to make better informed decisions on what kind of ‘Typical’ data they can expect from a low cost GPS receiver in actual use.

#### Bonus Data:

No analysis would be complete without showing the histogram of the data. After a plot of the data by itself, the histogram provides a view into the nature of the data distribution that is not always clear from looking at the data itself. With that in mind Figure 5 plots the histogram of Figure 2A's data.**Figure 5 - A histogram of Figure 2A's data shows a familiar kind of statistical distribution that resembles a Poisson distribution. At the very least we can see that the smoothed data (Red Line) is some sort of distribution and not a random distribution.**

As can bee seen above there is a nice 'classic' distribution that resembles the Weibull distribution. Other statistical data for the data in Figure 2A is (All units in Feet),

#### Extra Bonus Data:

It is well known that the Altitude data is even more inaccurate with GPS data, this has to do with the geometry of the satellites and the calculations involved [1]. From Topographic maps I believe my Labs true elevation to be approximately 141 Feet (After accounting for the added height of the workbench, where the GPS Antenna was, from the ground elevation in my Lab). The GPS data for 9 hours worth of data is shown in Figure 6.**Figure 6 – Altitude data for 9 hours worth of GPS Data. The test location was at approximately 141 Feet (from Topographic Maps). The average of this data was 136.4 Feet, suggesting a 5 foot offset in long term data, however this could be within the uncertainty of the topographic data that I used. The peak to peak deviation of the data over 9 hours was: 84.63 Feet. Just interesting to see some real, actual data.**

#### References:

[1] https://www.gps.gov/systems/gps/performance/accuracy/#how-accurate[2] MediaTek Labs model: MTK3339

[3] Adafruit Ultimate GPS breakout board. PRODUCT ID: 746 .

[4] GPS Visualizer web page for plotting GPS Data.

[5] HDOP discussion: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)

[6] There are offline programs that can look at the satellite geometry that you are seeing at and that will give you a better idea of the maximum error you might see at that very moment, but this is beyond what the simple consumer GPS Modules typically provide. These programs are used by GPS surveyors to time or at least try to time their measurements to concede with the maximum positional accuracy.

**Article By: Steve Hageman / www.AnalogHome.com**

*We design custom: Analog, RF and Embedded systems for a wide variety of industrial and commercial clients. Please feel free to contact us if we can help on your next project.*

Note: This Blog does not use cookies (other than the edible ones).

Note: This Blog does not use cookies (other than the edible ones).

## No comments:

## Post a Comment