Скачиваний:
142
Добавлен:
15.03.2015
Размер:
10.83 Mб
Скачать

206 Part III — Data Hacking

SiRF

Another protocol that you might hear of is the SiRF protocol. This is a protocol developed by SiRF Incorporated to work with their latest hi-tech GPS devices.

The SiRF protocol is different from NMEA sentences in several fundamental ways:

The SiRF protocol is binary. This offers a lot of advantages over using ASCII as the medium for transmitting information.

SiRF is faster. The NMEA protocol specifies a speed of 4800 bits per second. This is okay, but it can create a bottleneck if you want to transmit large amounts of data. SiRF supports data speeds of 38,400 bps and greater.

SiRF can carry more data. NMEA sentences are generally limited to 80 characters. A single SiRF instruction string (called a payload) can be as long as 2 × 1015 bytes (actually 2 × 1015 – 1, or 2 billion gigabytes!).

SiRF has greater information integrity. Not only does SiRF use a checksum to check for data integrity, but it also contains other message validation code.

SiRF uses message encapsulation. The message is encapsulated by specific start and stop characters that also form part of the message validation code, meaning that sentence confusion cannot happen.

However, the SiRF protocol is more complex and harder to navigate than NMEA. Because of this, I’m not going to cover it in greater detail here, but if you want more information (free, as opposed to paying for the NMEA-0183 standard), visit www.sirf.com/reps/ Technical.html. Here you will find tools, information, and utilities to help you make the most out of SiRF.

Using NMEA Sentences

Let’s take a look at how you can make use of NMEA sentences directly from your GPS. All you need is a GPS connection between your GPS and your PC or PDA. In order to be able to use these applications, you need to make sure that your GPS is set to output NMEA data.

Examining the NMEA output is a great way to learn more about GPS and how it interfaces with software and other devices. It is also a great way to troubleshoot problems — you can test for incorrect output, which can lead you to solutions to your problems.

In addition, if you are a programmer, you may see something that you can do with the NMEA data that cannot currently be done — with a bit of programming and the ability to decode NMEA, you’ll be able to leverage your existing skills in a completely different arena.

A lot of available software will enable you to read and log NMEA sentences from your GPS receiver. The following sections describe a few of the better applications.

Chapter 9 — Examining the Data 207

GPS NMEA LOG

GPS NMEA LOG might be an unimaginative title, but the software does exactly what is says it will — enable you to see and log NMEA data from your GPS (see Figure 9-1).

FIGURE 9-1: GPS NMEA LOG in action

This application can be downloaded from http://frankl.comdesign.at/Geo/ GPSNMEA.html.

To run this application, you might need to download the Visual Basic runtime file VBRUN300.DLL. This can be found on many sites on the Internet. Copy this file into the system32 subfolder where your Windows operating system is installed.

This is a simple but effective application that requires only a small amount of hard drive space and RAM, making it ideal for older systems and laptops.

GPS NMEA LOG can also display real-time information decoded from the NMEA sentences for times when you don’t feel like decoding NMEA (see Figure 9-2).

FIGURE 9-2: Decoding NMEA sentences on-the-fly

On this site you will also find another useful application — GPS data logging software. This enables you to hook your GPS to a computer and have it log data. The software comes in both Windows (WINNGPS) and DOS (NGPS) formats and can run on a variety of systems, including old, run-down PCs for which you might not have much use.

208 Part III — Data Hacking

The application also comes with an effective log reader to read the files containing the NMEA data, as shown in Figure 9-3.

FIGURE 9-3: Reading existing logs

The log file can store the following information:

Longitude

Latitude

Date

Time

Altitude

Speed

Direction

Three accuracy indicators

Chapter 9 — Examining the Data 209

GPS Diagnostic

GPS Diagnostic by CommLinx Solutions is another great tool that enables you to work at a low level with the GPS data and NMEA. GPS Diagnostics is available as a free download from www.laipac.com/gps_gpsdiag_eng.htm.

As you can see from Figure 9-4, what is different about GPS Diagnostics is that it displays interpreted data in the top half of the screen and the raw data in the bottom half.

FIGURE 9-4: GPS Diagnostics

This excellent utility offers you a great deal in the way of customizations. You can choose to ignore certain NMEA sentences and select which timestamp to use (see Figure 9-5).

The software also enables you to choose customized data fields to display (see Figure 9-6).

Finally, GPS Diagnostics enables you to replay data that you’ve collected, and even choose the replay rate (see Figure 9-7).

210 Part III — Data Hacking

FIGURE 9-5: Ignoring some NMEA sentences makes them easier to read.

FIGURE 9-6: Choosing customized data fields