- GPS Serial Port Connection
- GPS File Connection
- GPS Display
The GPS namespace, contains the classes used to read and display GPS information. The namespace also includes several components which have been developed to simplify the work for developers to incorporate GPS into a Mobile mapping Application, while providing access to the detailed GPS properties if needed. The three GPS .NET Components that are part of the toolbox for building mobile applications are:
The SerialPort or File GPSConnection provides the linkage between the GPS device and your Mobile application. The GPSDisplay component is used to visualize the GPS data on your application's map.
When a GPS receivers transmits a NMEA sentence it is read by the NMEAGPSConnection class and rebroadcast in a NMEASentenceEventArgs class. If the GPSConnection recognizes that the sentence received corresponds to one of the enumerated GPSChangeTypes, it is set accordingly. See the list of NMEA sentences recognized by the ArcGIS Mobile system below. If the NMEA sentence changes any of the properties of the NMEAGPSConnection class then the GPSChangedEvent() is fired. If the NMEA sentence does not change any of the properties then the GPSChanged Event is not fired, even though it is reporting new information. This occurs when there is a change that the NMEAConnection does not store, however, the NMEASentenceEventArgs class will contain the new sentence which can be read and used. This minimizes the raising of GPSChangedEvent, since a GPS receiver transmits close to one sentence per second, and much of it is not relevant for mobile applications.
The GPSChanged enumeration is useful because GPS applications are typically listening for a certain type of change, such as the location. By utilizing this enumeration a programmer can filter out the GPS changes that they choose to ignore, or focus on the changes that are important to the Mobile Application.
The GPS change Type is determined by the NMEA sentence type sent from the receiver. While the NMEA standards define many possible sentence types, for GPS Applications this enumeration supports the 5 main sentence types. The NMEA sentence types are denoted by a 3 letter code which indicates the type of information and content in the Sentence. The most important NMEA sentences include the GGA which provides the current Fix data, the RMC which provides the minimum gps sentences information, and the GSA which provides the Satellite status data.
The GPSEventArgs class was used to broadcast the GPS information being received and updated though the GPSconnection classes, on the GPSchanged Event. NMEASentenceEventArgs is used to broadcast the sentence coming from the GPSconnection, on the GPSChanged event. This new class only contains the NMEASentence, and is thus smaller and faster to populate and throw.
The GPSDisplay class is focused on the basics of showing the GPS location on the map display. The AutoPan property is used to specify that the map should continuosly move with the GPS updates.
For GPS components the new rewritten library contains the same functionality, but improves the linkage between the Mobile SDK classes and the GPS receiver. New classes have been added to provide built in tools for GPS Construction using GPSAveraging or GPSStreaming. Another improvement for the GPSConnections and GPSDisplay is the implementation of PropertyChanged Event. This allows developers to catch individual property changes intead of generic GPSChanged types, which only happen when a new sentence is received. This is very important for things like signal loss, which doesn't raise the GPSChanged event, but should be caught and dealt with in the application.
For developers wanting to create there own GPS components, we have unsealed the GPS classes to allow new opportunities. Both the GPSDisplay and the satellite class are unsealed, which means that developers can use our classes as a base to write their own class on, with their desired customizations. The OnMapPaint(), PaintLocation(), and PaintTrail() methods can be overridden with custom code. For customizing the symbols associated with the GPSDisplay the various symbols are now exposed as a collection of paint operations for full drawing control.
Member | Description |
---|---|
Unknown | Unknown sentence. |
GlobalPositioning | Global Positioning System Fix Data ($GPGGA). |
RecommendedMinimum | Recommended Minimum ($GPRMC). |
SatelliteStatus | Satellite status or quality ($GPGSA). |
SatellitesInView | Satellites in view or signal strength ($GPGSV). |
Tracking | Track or ground speed ($GPVTG). |
Working with GPS data and devices Read about the GPS components exposed in the Mobile SDK and how they can used in development.
Basics of GPS data and devices Learn the basics of GPS and find links to more in-depth information.
Working with GPS in a Windows application This sample illustrates how to read and visualize GPS data in an windows application.
Working with GPS in a Pocket PC application This sample illustrates how to read and visualize GPS data in an PPC device application.