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

Chapter 9 — Examining the Data 205

BWC (Bearing and Distance to Waypoint Using a Great Circle Route)

This represents time, distance, bearing to, and location of a specified waypoint from the present position calculated along the great circle path. The great circle path means along the surface of the earth as opposed to a straight-line path.

$GPBWC,hhmmss,llll.ll,e,yyyyy.yy,f,xxx,T,yyy,M,zzz,N,###*hh

hhmmss

UTC time

1111.11

Destination waypoint latitude

e

N or S (for latitude)

yyyyy.yyDestination waypoint longitude

f

E or W (for longitude)

 

 

xxx

Bearing to waypoint (degrees True)

 

 

T

Degrees True

 

 

yyy

Bearing to waypoint (degrees Magnetic)

 

 

M

Degrees Magnetic

 

 

zzz

Distance to waypoint (measured in nautical miles)

 

 

N

Nautical miles

###Waypoint ID

*hh

Checksum

NMEA Checksum

You may have noticed the checksum that appears at the end of the NMEA sentences. If you are wondering what this is and how it is calculated, it’s not that tricky, and it generally only applies to mathematicians and programmers.

The checksum is always a two-character hexadecimal number. It is determined by looking at all the characters that fall between the $ symbol and the * symbol, converting them to byte values and then performing an exclusive OR or XOR on the bytes and then converting the final byte checksum to hexadecimal.

You can find numerous examples of code on the web that will show you how to check this value in a variety of languages. Using your favorite search engine, enter the words “NMEA checksum” and you will find hundreds of code samples in several languages.

This might seem rather academic, but if you plan to write applications that interface with GPS receivers and work on the NMEA sentences, then checking the checksum is vital.