Slow start time, Protocols, Interfacing with nmea messages – Linx Technologies RXM-GPS-R4 User Manual
Page 8
–
–
–
–
10
11
Slow Start Time
The most critical factors in start time are current ephemeris data, signal
strength and sky view. The ephemeris data describes the path of each
satellite as they orbit the earth. This is used to calculate the position of
a satellite at a particular time. This data is only usable for a short period
of time, so if it has been more than a few hours since the last fix or if the
location has significantly changed (a few hundred miles), then the receiver
may need to wait for a new ephemeris transmission before a position can
be calculated. The GPS satellites transmit the ephemeris data every 30
seconds. Transmissions with a low signal strength may not be received
correctly or be corrupted by ambient noise. The view of the sky is important
because the more satellites the receiver can see, the faster the fix and the
more accurate the position will be when the fix is obtained.
If the receiver is in a very poor location, such as inside a building, urban
canyon, or dense foliage, then the time to first fix can be slowed. In very
poor locations with poor signal strength and a limited view of the sky with
outdated ephemeris data, this could be on the order of several minutes.
In the worst cases, the receiver may need to receive almanac data, which
describes the health and course data for every satellite in the constellation.
This data is transmitted every 15 minutes. If a lock is taking a long time, try
to find a location with a better view of the sky and fewer obstructions. Once
locked, it is easier for the receiver to maintain the position fix.
Protocols
Linx GPS modules use the SiRFstar IV chipset. This chipset allows two
protocols to be used, NMEA-0183 and SiRF Binary. Switching between the
two is handled using a single serial command. The NMEA protocol uses
ASCII characters for the input and output messages and provides the most
common features of GPS development in a small command set. The SiRF
Binary protocol uses BYTE data types and allows more detailed control
over the GPS receiver and its functionality using a much larger command
set. Although both protocols have selectable baud rates, it’s recommended
that SiRF Binary use 115,200bps. For a detailed description of the SiRF
Binary protocol, see the SiRF Binary Protocol Reference Manual, available
from SiRF Technology, Inc.
Note:
Although SiRF Binary protocol may be used with the module,
Linx only offers tech support for the NMEA protocol.
Interfacing with NMEA Messages
Linx modules default to the NMEA protocol. Output messages are sent
from the receiver on the TX pin and input messages are sent to the receiver
on the RX pin. By default, output messages are sent once every second.
Details of each message are described in the following sections.
The NMEA message format is as follows: <Message-ID + Data Payload +
Checksum + End Sequence>. The serial data structure defaults to
9,600bps, 8 data bits, 1 start bit, 2 stop bits, and no parity. Each message
starts with a $ character and ends with a <CR> <LF>. All fields within
each message are separated by a comma. The checksum follows the *
character and is the last two characters, not including the <CR> <LF>.
It consists of two hex digits representing the exclusive OR (XOR) of all
characters between, but not including, the $ and * characters. When
reading NMEA output messages, if a field has no value assigned to it, the
comma will still be placed following the previous comma. For example,
{,04,,,,,2.0,} shows four empty fields between values 04 and 2.0. When
writing NMEA input messages, all fields are required, none are optional. An
empty field will invalidate the message and it will be ignored.
Reading NMEA output messages:
• Initialize a serial interface to match the serial data structure of the GPS
receiver.
• Read the NMEA data from the TX pin into a receive buffer.
• Separate it into six buffers, one for each message type. Use the
characters ($) and <CR> <LF> as end points for each message.
• For each message, calculate the checksum as mentioned above to
compare with the received checksum.
• Parse the data from each message using commas as field separators.
• Update the application with the parsed field values.
• Clear the receive buffer and be ready for the next set of messages.
Writing NMEA input messages:
• Initialize a serial interface to match the serial data structure of the GPS
receiver.
• Assemble the message to be sent with the calculated checksum.
• Transmit the message to the receiver on the RX pin.