Collecting GPS Data Using GPS Module With Windows IoT

Story

In this tutorial we will demonstrate how GPS data can be collected from a serial GPS module. We are using an An doer u-Blox NEO-6M GPS module, which has excellent GPS capabilities. One of the NEMA sentences that it collects includes the GPGGA sentence which provides essential fix data. We’ll show you how to develop an application that will collect the serial data in the form of a sentence, which is then parsed using our custom parser to extract the essential GPS data.
Come along and let’s do some Regex!!
First of all, connect the GPS breakout board to the Raspberry Pi 3B, as shown in the schematics. Then, launch a Visual Studio instance and create a Blank Application (Universal Windows).
Your brand new UWP application will launch for edit in Visual Studio. You’ll notice an empty design palette to begin with that is Main Page. xaml. If you look in the code behind file you’ll see the Main Page class which hasĀ  a default constructor. Basically, this is where the program enters for execution when launched. Now let’s add some design elements into the MainPage and make it look nice.
Below is the design we put together for use in this tutorial:
You’ll want to enable Windows IoT Capabilities by right-clicking the References from the Solution Explorer and choosing ‘Add Reference’. Then, select Universal Windows >> Extensions >> Windows IoT Extensions for UWP, and finally click ‘OK’.
Don’t forget to provide Serial Capabilities to the UWP app by opening the Package. app manifest file and adding these lines:
<Capabilities>
<Device Capability Name=”serial communication”>
<Device Id=”any”>
<Function Type=”name: serial Port” />
</Device>
</Device Capability>
</Capabilities>
Now your program is ready to have some very nice programming logic to receive GPS data.
We have included the code for our fully working example with design interface, too. The code itself is well commented, and we have high hopes that you’ll be able to embed it into your project without any difficulty. The fully working program will look something like this:
Read More: Collecting GPS Data Using GPS Module With Windows IoT

Leave a Comment

Your email address will not be published. Required fields are marked *