Developing apps to use GPS in Windows
16 Mar 2020
Some basic sample code is provided at the following web page.
There are many methods that a software developer could use to access GPS and other location data in Microsoft Windows 10 such as on the Mesa 3 and Mesa 2 or from the Geode. This article describes some of the various methods.
For newer software or web applications, Microsoft recommends using Windows.Devices.Geolocation or the W3C Geolocation programming functions (API). Though by doing this, you may encounter issues as described in our "OS Location Services vs. Direct Connection to a GPS Receiver" article. If interested in this method, additional information is provided at the following web page.
If doing this, make sure your app appears in and can be enabled under Start > Settings > Privacy > Location in the list to "Choose apps that can use your precise location." Some apps which used previous versions of these functions may not appear in this list, but should still be able to access "precise location" (GPS) information. Though using this method, your Windows app won’t have true accuracy data, or raw NMEA stream, just the location data provided through the Windows location manager (basically, Lat/Long, Altitude, Velocity, Heading, and HDOP/VDOP/PDOP which only provide a rough accuracy indication).
Alternatively, you can possibly gain access to COM/Serial ports in UWP (Universal Windows Platform) to obtain the raw NMEA stream (instead of using a Location Sensor driver) as described in the following web articles.
You may need to interop with a Win32 process as described at this web page.
If using the built-in U-Blox NEO M8N or M8T receiver in one of our rugged handheld computers, you can find location sensor by tapping and holding on Start, selecting Device Manager, and then looking under "Sensors" for "U-Blox GNSS Location Sensor." Or if needed, we also provide an alternative "legacy" virtual serial port interface as can similarly be seen in Device Manager under "Ports (COM & LPT)" as "U-Blox Virtual COM Port" which should be able to support any standard baud rate.
By default, the Geode GNS1, GNS2 (Hemisphere OEM P206), and GNS3 (Phantom 34 OEM), as well as the Mesa built-in (u-Blox NEO M8) GPS receivers follow the NMEA-0183 version 4.1 standard as described at this web page.
Once you have direct access to NMEA data, you can then use RMS data such as from the GST string to achieve a better indication of statistical location accuracy. If you have limited or no access to real-time data from a physical GNSS receiver such as the Geode, some previously recorded samples are as follows. The first sample shows the default NMEA-0183 version 4.1 data that comes out from the Geode with the default settings applied. The second sample shows only the GST and RRE messages enabled for statistical accuracy information. Both samples end with the custom battery level message.
The Geode GNS3 contains the Hemisphere Phantom 34 OEM receiver. The Geode GNS1 and GNS2 contain the Hemisphere OEM P206 receiver. The Hemisphere GNSS Technical Reference Manual (version 3.0, Dec 30, 2019) shows the parsing of each NMEA message, including GST and RRE which can help you with achieving sub-meter horizontal positioning accuracies.
Most legacy GPS software applications were written for receivers which followed the NMEA-0183 version 2.3 standard. If your GPS software will not fully recognize NMEA 4.1 sentences, please see the following web page.
Further details for the u-Blox NEO M8 receivers are provided in this document.
If needing to make more extensive changes to the default settings of the u-Blox GPS receivers, please refer to the following web page.
Internal GNSS receiver configuration tool for the Mesa 3 Windows and Mesa 2