DemoGPS can't detect ublox GPS device (built-in gps/onboard gps)

Nov 15, 2013 at 7:52 PM
Hi,

I ran DemoGPS on Windows 7 Pro Tablet PC that has a built-in ublox GPS device, but the app can't detect the device. I try ublox's own software and GPS Utility and they can detect GPS device as well as receive Nmea data from gps.

Does DotSpatial support ublox devices?

Thanks,

Sam
Nov 20, 2013 at 7:10 PM
any help?
Nov 21, 2013 at 7:21 PM
Hi,

I am having same problem as linhungsam on Windows 7 Tablet PC that has a built-in ublox GPS device. The application using DotSpatial libraries cannot find the u-blox GPS device. I tried the application with other 2 GPS one from GlobalSat and other Gobi Radio GPS. Application is able to detect both GPS but not u-blox GPS.
I also tried the ublox's own software and GPS Utility and they can detect GPS device . Does DotSpatial support ublox devices?

Any help on this will be really appreciated.

Thank you
Nov 22, 2013 at 5:31 PM
Just guessing, but maybe the ublox device is using the location services model instead of raw serial data from the gps device.

I am looking to do some geo-locating in a .Net application which will run on Win 8.1 Pro and am finding out a little bit about the location services. I am hoping to make use of the Positioning stuff to help me out.
May 15, 2014 at 6:47 AM
Edited May 15, 2014 at 6:54 AM
Yes, ublox is indeed doing that! Apparently few GPS devices do, but our ublox NEO-6 module does. While not a convenient solution, we have our application working again now.

As for our code, we pulled out the common GPS code called by other parts of our code (longitude, latitude, high-level GPS status, etc) into its own class. Everything and all properties but the actual communication bit. Then we had the "left over" parts inherit the common code and be a specialized class for COM Port communication with DotSpatial. It set various properties and called the Position Changed event in the parent class.

And finally, the entirely new code was of course the one that used Windows 7 Sensor and Location Platform. Using this one required upgrading our application to .NET Framework 4.0 but that was just about changing a selection in a combo box. Then we wrote the specialized class for that API, also setting the same parent class properties.

Finally, we introduced a .config file setting "UseLocationServices". If True, use the new method, if False, use DotSpatial. Done. Same code elsewhere in the application, so that we don't end up with two different code bases to maintain.

Here's a small sample code for Location Platform. An application that simply prints the latest coordinates (if any) to a console window once every second. Key is the System.Device.Location namespace. As you can see, it's really convenient and results in short code, much more simple than DotSpatial which I thought was simple before! This let us add Location Platform support in addition to DotSpatial as well as test it within a single work day!

NOTE: An important part here is to 1) Be careful if you want to suppress the user permissions prompt for location in the line watcher.TryStart (i.e. true instead of false). If Windows just want to get a "Yes" from the user and you suppress the prompt, Windows won't give the Location Platform any rights! 2) Don't forget to enable the sensors in the Control Panel. Only sensors you enable will supply location data to the application. More information: http://windows.microsoft.com/en-us/windows7/enable-or-disable-a-sensor
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Device.Location;

namespace GPSTest
{
    class Program
    {
        static void Main(string[] args)
        {
            GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);
            watcher.MovementThreshold = 1; // 1 meter
            watcher.TryStart(false, TimeSpan.FromSeconds(10));

            System.Console.WriteLine("Position via System.Device.Location API in .NET");

            do
            {
                GeoCoordinate coord = watcher.Position.Location;
                Console.Write(string.Format("{0}: ", DateTime.Now.ToLongTimeString());
                if (coord.IsUnknown)
                    Console.WriteLine("Unknown position");
                else
                    Console.WriteLine(string.Format("Long: {0}, Lat: {1}, Altitude: {2}, Precision: {3} m, Vertical: {3} m",
                        coord.Longitude, coord.Latitude, coord.Altitude, coord.HorizontalAccuracy, coord.VerticalAccuracy));

                System.Threading.Thread.Sleep(1000);
            } while (true);
        }
    }
}
May 19, 2014 at 9:46 PM
Edited May 19, 2014 at 9:48 PM
Would you be willing to tell me which "Windows 7 Pro Tablet PC that has a built-in ublox GPS device" you're using? I've been searching for a Windows table with built in GPS with very disappointing results.

Thanks - Gene
May 23, 2014 at 7:04 AM
magene wrote:
Would you be willing to tell me which "Windows 7 Pro Tablet PC that has a built-in ublox GPS device" you're using? I've been searching for a Windows table with built in GPS with very disappointing results.

Thanks - Gene
I'm not the thread starter, but we're using a rugged handheld computer (not really a tablet, it's a bit bulkier although it does have a touch screen, GPS, weather sealing, drop protection, WiFi, USB ports, Ethernet, and can also use 3G modems for mobile data). This product is an Algiz 10 developed by Handheld.
May 23, 2014 at 4:26 PM
Thanks for the update.
Jun 9, 2014 at 11:36 AM
I have been using a Windows Tablet with built in GPS - Asus Vivo 8. It has windows 8.1 OS.
Jun 9, 2014 at 11:45 AM
Edited Jun 9, 2014 at 12:33 PM
I have used the same system.device.location to detect the latitude/longitude from a windows 7 machine. But not able the get the data. Do we need to install any sensor, if yes then which sensor to install to get the lat/long data from the mentioned namespace ? Please note that i need to read the latitude longitude through WiFi.