Comparing iPhone GPS Against NEO-6M (GY-GPS6M) GPS Module with Arduino
Global positioning systems (GPS) were conceptualized after scientists realized they could track satellites using the doppler effect. In the 1960s and 1970s, the United States began work on a system of satellites that would geolocate submarines that carried nuclear weapons (NASA). By the mid 1990s, the government released a full-scale GPS system that consisted of 24 satellites to the public. The NEO-6M GPS module uses available satellites to track its location in real-time. In this tutorial, I cover the steps that I used to compare the NEO-6M module to the iPhone location service that acquires GPS data.
Parts and Wiring
The important thing to remember is that I only cover wiring and coding the transmitter. The user will need to program a smartphone or another type of receiver to record the data. I used an iPhone app that I wrote (not covered here), so the user will need to do something similar. The wiring for the HM-10 and NEO-6M is show below:
Wiring for GPS and Bluetooth
Now, in order to read the data from the NEO-6M we will need to decode the National Marine Electronics Association (NMEA) data into information that is easy to read [read more about NMEA data here]. The data received from the GPS satellites can be decoded using a simple Arduino Library called TinyGPS [link here]. The TinyGPS library parses out the latitude, longitude, number of satellites used, time of day, etc. It's a simple library that takes away a lot of the hassle of sifting through the raw GPS data (which you can also access directly via the serial communication. However, below I am assuming the user has downloaded the TinyGPS library and is using SoftwareSerial to communicate with both the GPS and Bluetooth modules.
I conducted several walks throughout New York City to test the accuracy of both the iPhone's GPS location service and the NEO-6M's onboard satellite GPS capabilities. Below I show four different walks of varying difficulty to test the error between the two GPS methods.
Results indicate that the NEO-6M GPS module outperforms the iPhone's GPS location service in nearly every case
There are several conclusive results that I feel compelled to note:
- I used both the highest accuracy and navigation modes for the iPhone's location services. Neither outperformed the NEO-6M
- The routes were almost identical to the NEO-6M. As such, I didn't feel the need to map each route on top of the two GPS records.
- Neither GPS device was perfect with mapping the route, but the NEO-6M was very close.
- At times, both devices were showing the route atop a building - something completely unphysical.
- The error on the iPhone was much greater than that of the NEO-6M.
- The iPhone updated its location less than the NEO-6M, despite my selecting the highest location accuracy and asking for location updates every time a NEO-6M point was recorded.
This experiment ended with a unanimous victory by the NEO-6M. Now, it is true that the iPhone is not a dedicated GPS device, so it is possible that the poor quality is due to a smaller antenna, whereas the NEO-6M has a very large antenna. Nonetheless, the NEO-6M was able to provide higher resolution updates, better approximations of location, and more consistent readings. The iPhone tended to produce erratic location estimates when the route was difficult (see the zig-zag pattern above), and it did not update its location frequency enough to pick up on sharp trends in movement.
Through my observations made here, I can conclude that the iPhone is a perfectly suitable device for navigation and imprecise location events, which is why it is so ubiquitous in apps like car shares, foot navigation in cities, and geolocation with static locations. However, for situations where higher accuracy is needed for irregular navigation, fast speeds, or complex routes - I recommend a GPS-dedicated device like the NEO-6M.
See More in GIS and Arduino: