DotSpatial.Positioning

DotSpatial.Positioning was originally GeoFramework and GPS.Net - formerly commercial .NET components maintained by GeoFrameworks, LLC from 2004 to 2009. In 2009 the original developer Jon Person decided to release the full source code of GPS.NET to the public domain for the benefit of the open source development community. Thanks Jon!

GPS.NET version (3.0) is the latest release which had a short commercial debut before being released here on CodePlex. The purpose of this framework is to deliver intuitive real-time GPS functionality with maximum laziness efficiency for all possible computers, mobile devices and NMEA-compliant GPS devices.

GeoFramework version (2.0) is a project containing classes designed to simplify the task of writing Location-Based Services as well as mapping applications. The most frequently used classes in this project are Angle, Latitude, Longitude, and Position. These classes represent coordinates on Earth's surface and provide functions for calculating distance and bearing to other points on Earth. Other classes such as Speed and Distance encapsulate measurements as well as conversions to other unit types. The entire library is globalized, supporting multiple numeric formats and cultures, and includes design-time type converters to add support for Windows Forms designers. Most classes also support conversion of values to and from string values. For example, the Position class can output values in a specific format and parse formatted values back into an object. This project has no dependency on specific UI platforms, allowing it to be used in both GDI+ and WPF applications.

In 2009 BigStickCarpet and tidyup (GPS.NET and GeoFramework developers) lost contact with Jon Pearson (where are you Jon?) so they decided in the interests of keeping the projects alive the projects should be refactored and merged with DotSpatial. All the classes and libraries migrated from GeoFramework 2.0 and GPS.Net 3.0 to the DotSpatial project have been brought in under the DotSpatial.Positioning namespace. We've taken great care to ensure backward compatibility during this transition, so other than the new namespace, there should be little or no changes needed for your applications that were previously using GeoFramework and GPS.Net. The namespaces may get a little more refactoring yet as the projcts are melded together for consistency with DotSpatial.

The existing GeoFramework 2.0 and GPS.Net 3.0 projects will remain on CodePlex for legacy purposes, but all future development will take place within the DotSpatial project. For this reason, we strongly encourage you to migrate your GPS.NET and GeoFrameworks applications to DotSpatial.

As DotSpatial doesn’t currently support the compact framework (and there is quite a bit of uncertainty about its future) we have included refactored working versions of GPS.NET and GeoFramework in the repository folder DotSpatial\DotSpatial.Positioning\DotSpatial.Positioning.Compact. This folder will be retained for the purpose of providing compact framework developers a place to keep this platforms version alive.

GPS Features

  • Automatic detection of serial GPS devices (or devices found via a virtual serial port).
  • Automatic detection of Bluetooth devices (when using the Microsoft Bluetooth stack.)
  • Support for newer devices using the QualComm GPS chipset (namely, HTC devices such as the TyTn II, P3300 and AT&T Tilt)
  • Automatic baud rate detection.
  • Automatic recovery of lost connections.
  • A single code base which supports .NET Framework 2.0/3.x and .NET Compact Framework 2.0/3.x.
  • Advanced GPS precision via Kalman filtering.
  • Support for desktops and mobile devices.
  • Support for the GPS Intermediate Driver on Windows Mobile 5.0+
  • Support for real-time GPS data without relying on Microsoft's GPS API.
  • Support for control and monitoring of precision.
  • A set of animated gauge controls for desktops and mobile devices (Altimeter, Compass, Speedometer, SatelliteViewer, SatelliteSignalBar). This screen shot is captured from a desktop application. The DoubleBufferedControl and PolarControl base classes are used to deliver smooth, flicker-free animations.

    ToolboxBig.png

Other Features

  • Supports any culture in any numeric format.
  • Supports formatting of objects to string values and vice-versa.
  • Supports geodetic equations such as calculating distance, bearing, travel time, and minimum travel speed.
  • Supports distance and speed measurements and conversions in Imperical and Metric systems.
  • Supports PROJ4-compliant datum and ellipsoids, referenced by EPSG number.
  • Supports XML serialization (and deserialization) to Geographic Markup Language (GML).
  • Thorough use in a commercial, production environment.
  • Full IntelliSense documentation including remarks and examples.

DotSpatial.Positioning includes source code for a project which is used to detect and resolve common GPS connectivity issues, it also provides a great way to get the hang of using the libraries. Built using DotSpatial.Positioning, the utility will scan the local machine for GPS devices then make suggestions on what could be improved. Suggestions are in clear English and can be clicked to attempt a fix. This utility can:

  1. Configure the GPS Intermediate Driver to correct COM: port and baud rate settings.
  2. Detect when Microsoft Bluetooth is installed but turned off.
  3. Suggest ideal COM: port and baud rate settings to use.
  4. Recommend one device as "most reliable" when multiple devices are detected.
  5. Generate log files which can (with some tweaking of code) be sent to you for further study.

 ... the source code for this utility is provided in both C# and VB.NET for .NET Framework 2.0/3.5/4.0 and .NET Compact Framework 2.0/3.5. It can be found in the DotSpatial.Positioning solution.

Some connectivity issues to be aware of are:

  1. Check Windows Mobile 5.0+ devices for the correct GPS Intermediate Driver settings.
  2. Check that the Bluetooth radio is turned on.
  3. Check the configuration of virtual serial ports if required by your GPS device.

 

Below are a few screen shots from the utility running on the Visual Studio Windows Mobile emulator.

Welcome1.pngScan.pngFinish1.pngLog1.png

 

Last edited Feb 2, 2011 at 9:50 AM by tidyup, version 4

Comments

linhungsam Nov 21, 2013 at 8:58 PM 
Does DemoGPS support ublox gps device? I tried it but it cant detect any of it while using ublox center and GPS utility both can detect that device

mudnug Apr 27, 2012 at 5:03 PM 
If you download the source, you will find a DemoGPS example project.

DruidGetitfixed Apr 27, 2012 at 12:38 PM 
Please, please, please could someone post a link to a single working implementation of an example of something using DotSpatial.Positioning in its current form.

mudnug Apr 10, 2012 at 9:10 PM 
The CF version can be compiled from the code. Does this help?

wizmagister Apr 10, 2012 at 7:08 PM 
Hello, is it me or the Compact Framework version is no longer available in the ZIP file ? All I have is DLL in .NET 4 that don't work in CF 3.5. I want to use this with Windows Mobile 6.5.

Should I go back to GeoFramework ?

Thanks !

radioman May 7, 2011 at 5:44 PM 
..any news on this?

tidyup Feb 22, 2011 at 5:47 AM 
DotSpatial.Positioning under the main trunk of the repository builds but will not detect any devices - it's still not working since security attributes were changed after the original code was contributed to DotSpatial from GPS.NET and GeoFrameworks projects in a working state for .NET versions up to and including .NET 4.0.

The only "working" version is in the DotSpatial\DotSpatial.Positioning\DotSpatial.Positioning.Compact folder - despite it's name it isn't just for the compact framework. The solution can be found in DotSpatial\DotSpatial.Positioning\DotSpatial.Positioning.Compact\GPS\DotSpatial.Positioning (Visual Studio 2010).sln though I notice that the project paths are mangled so you may need to find the projects yourself. GPS Diagnostics (CSharp).csproj is a demo application that shows pretty comprehensively how to use the libraries.