Identifying Digital Input States in a $PRAVE message

The $PRAVE message has the status of each input as represented by a single digit hexadecimal number in field 12. For example, the the $PRAVE message below, the last 3 represents the digital inputs from transponder 0001.

$PRAVE,0001,0001,3308.9051,-11713.1164,195348,1,10,168,31,13.3,3,-83,0,0,,*66

In this example field 12 has value 3.  The field 12 value is the hexadecimal binary representation of the bits.  Refer to the following table:

IN 2
(TXD)

IN 1
(RTS)

IN 0
(DTR)

Hexadecimal Representation

0

0

0

0

0

0

1

1

0

1

0

2

0

1

1

3

1

0

0

4

1

0

1

5

1

1

0

6

1

1

1

7

The stock RV-M7 GX has up to 3 digital inputs, using the input pins of the RS-232 serial port.  An open circuit or ground is a 0, and if they are connected to a positive voltage greater than 3V, they are a digital 1. If all 3 pins are allowed to float (nothing connected – same as ground) the value should be 0.  If positive voltage is applied to a pin the pin value will be 1.  The field 12 value will be 1 or 2 or 4, depending on which pin had the voltage applied.

RS-232 Pin

Function

4 – DTR

Input 0

7 – RTS

Input 1

3 – TXD

Input 2

5 – Ground

GND

Connect to vehicle chassis or other ground point.

Note that the weatherproofed (-WX) model has less RS-232 pins and only 2 digital inputs.  Inputs 1 and 2 are valid, but input 0 is indeterminate (state can float).

In the RavTrack PC software it is easy to not monitor this missing pin, so any change of state or change of value of this pin would not matter to the software.  Simply configure this input as unused.

1aa

RS-232 Pin

Function

4 – RTS

Input 1

3 – TXD

Input 2

5 – Ground

GND

Connect to vehicle chassis or other ground point.

On the M7 series of transponders, if an input is left floating/unconnected, the transponder will read it as a digital 0 (low), and report it this way.

Vehicle Tracking Message Formats

When a Raveon GPS Transponder received an over-the-air position message from a tracked car, boat, truck, or person, it sends a message out of its serial port.  The message it outputs contains the ID of the vehicle that it received the position report from, along with the vehicle’s latitude and longitude.

A typical message would look like this:

$PRAVE,0003,0001,3308.8880,-11713.1500,155010,2,9,179,29,11.6,0,-86,19,-40,,*5B

The above message is in Raveon’s proprietary PRAVE message format. It was from vehicle 0003 whose position is at 33 8.888 North, 117 13.1500 West.  Details of the PRAVE message are in the M7 transponder user manual, and on this Tech Blog at http://ravtrack.com/GPStracking/2009/the-prave-message-format/

Raveon’s M7 series of GPS transponders have various built-in drivers enablinging them to output vehicle positions in a variety of different formats.  Some formats are in the industry standard NMEA 0183 and other message types are in proprietary formats.  The type of message that the M7 transponder sends out it serial port may be configured by the user, using the GPS x command.

Below is a list of message formats that the M7 Transponder supports:

  • TLL ($GPTLL) NMEA format Target Lat-Lon
  • WPL ($GPWPL) NMEA format Waypoint Location
  • GSV ($GPGSV) NMEA format Satellites in View
  • GGA ($GPGGA) NMEA format Essential Fix Data
  • PRAVE ($PRAVE) Raveon format Multi-Target Lat-Lon and More

For details on the PRAVE format please see this article http://ravtrack.com/GPStracking/the-prave-message-format/57/

Learn more about how the RavTrack system works by attending our webinar.

The $PRAVE Message Format

Overview

GPS tracking over-the-air position/status messages that the GPS transceiver and the Atlas Personal Locator may receive are sent out the serial port using Raveon’s tracking message format called the $PRAVE message. The $PRAVE message is structured like NMEA messages, and is used to pass the tracked item’s ID, location, speed, direction, altitude, temperature, and status.  The $PRAVE message format is the default message format when the GPS transponder is configured for GPS mode 2.

All GPS transponders made by Raveon utilize the $PRAVE message format, and have many other format options.

Structured like a standard NMEA GPS message, the $PRAVE message contains a rich set of location and status information. The $PRAVE message is sent out the serial port of the radio, each time the radio receives a position message over-the-air.

There are a total of 19 or 20 fields. The Odometer field is optional. If there are 19 total fields, the odometer value is not in the message. If there are 20 total fields, then the Odometer reading is present.  If you are parsing this message in software, continue parsing until you find the field with the *. If this is field 18, then there is no odometer reading. If it is field 19, then there is an odometer reading. 

Please note, the $PRAVE message is not transmitted over-the-air.  Raveon transmits GPS tracking information over-the-air in a highly compressed form of the data held in the $PRAVE message.  When an transponder ore base radio receives this over-the-air position/status report, the received information is decompressed and the data is sent  out the serial port, in one of a number different formats. One of these formats is this $PRAVE message. Other options are the NMEA $GPWPL message and the $GPTLL message. These are covered in the user manual for the M7 GX radio transponder. Raveon’s M6, M8, M21, M22 radio modems all can utilize $PRAVE messages for outputting tracking information.

$PRAVE Message Format

The $PRAVE message is sent out the RV-M7 GX when it is configured for GPS 2 mode of operation.This mode is typically used with the RavTrack PC program, or other computer programs that can process position and status information.GPS mode 2 instructs that the output be sent at 38.4K bytes/second out the serial port.

Along with ID and position information, the $PRAVE contains a host of other status information.The length of this message may exceed he standard NMEA limit of 79 characters.Any product or software that uses this message must take this into account.

Following is a list of the fields sent in this message

Field

Usage

Comments

1

$PRAVE

Raveon’s $PRAVE message Header text

2

From ID

The ID of the transponder that transmitted its position over the air. It is a hexadecimal (base 16) value.*

3

To ID

The ID that this position report was sent to. It is a hexadecimal (base 16) value.*

4

Latitude

dddmm.mmmm format. It is signed. + is north, – is south.No sign means north. Note: typically there are 4 decimal places, but as few as 0 decimal places are possible. Null field if no GPS lock.

5

Longitude

dddmm.mmmm format. It is signed. + is east, – is west.No sign means east. Note: typically there are 4 decimal places, but as few as 0 decimal places are possible. Null field if no GPS lock.

6

UTC time

The UTC time at the time the transmission was made.Hhmmss format. Null field if no GPS lock.

7

GPS Status

0=not valid position.> 0 is valid GPS.  1=GPS locked and valid position, 2=GPS locked with WAAS corrections applied

8

Num Satellites

The number of satellites in view

9

Altitude

The altitude in meters.Null field if no GPS lock.

10

Temperature

The internal temperature of the RV-M7 in degrees C. Typically this is 5-20 degrees above ambient.

11

Voltage

Input voltage to the device that sent this position.

12

IO status

A decimal number representing the binary inputs.

13

RSSI

The signal-strength of this message as measured by the receiver, in dBm. Note, if the message went through a repeater, it is the signal lever of the repeated message.

14

Speed

The speed of the device in km/hour, 0-255

15

Heading

The heading of the device 0-359 degrees.

16

Alerts

Alert codes for alerts currently indicated in the device.NULL means no alerts. Not all transponders support sending or receiving all of these alert codes.
“P” means a proximity alert.
“A”means alert.
“C” means critical alert,

“D” signifies the alert was acknowledged, set by ACK 1 command.
“N” means no motion alert,
“M” means man-down.
“T” Tamper alert or battery removed.
“I” Impact alert
“V” Vibration alert
“S” Service required

17

Spare

A spare field.May be used for UTC date in the future. Typically NULL.

18 (opt)

Odometer

The odometer reading if available. It is in kilometers and may or may not have decimal places. Most values will have are one decimal place. NULL/empty/missing if reading is not available or transponder did not send it.

18 or 19

*

The “*” NMEA end-of-message identifier.

19 of 20

Checksum

The NMEA 0183 checksum.

 *For use certain AVL solutions including RavTrack PC this field requires a decimal value.

Example Sentence:

No Odometer Value Sent:

$PRAVE,0001,0001,3308.9051,-11713.1164,195348,1,10,168,31,13.3,3,-83,0,0,,*66

This example shows a unit at 33° 8.9051 north latitude and 117° 13.1164 east longitude.It is not moving (0 speed).Its signal strength was -83dBm.Its altitude is 168 meters.

For your curiosity or testing purposes, below is a capture of vehicle 0003 driving around the Raveon office in Vista, California.

$PRAVE,0003,0001,3308.9077,-11713.1259,154656,1,8,200,24,11.6,0,-69,0,0,,*76
$PRAVE,0003,0001,3308.9082,-11713.1262,154716,2,8,199,24,11.6,0,-64,0,0,,*7C
$PRAVE,0003,0001,3308.9084,-11713.1267,154736,2,8,198,24,11.6,0,-64,0,0,,*7C
$PRAVE,0003,0001,3308.9092,-11713.1288,154756,2,9,198,24,11.6,0,-61,4,298,,*52
$PRAVE,0003,0001,3308.9225,-11713.1239,154816,2,8,195,25,11.6,0,-62,8,18,,*65
$PRAVE,0003,0001,3308.9418,-11713.1146,154836,2,9,190,26,11.6,0,-85,3,14,,*6D
$PRAVE,0003,0001,3308.9532,-11713.1314,154842,2,9,186,26,11.6,0,-96,38,294,,*65
$PRAVE,0003,0001,3308.9654,-11713.1665,154846,2,9,182,26,11.6,0,-102,61,292,,*53
$PRAVE,0003,0001,3308.8880,-11713.1500,155010,2,9,179,29,11.6,0,-86,19,40,,*5B
$PRAVE,0003,0001,3308.9120,-11713.1327,155030,2,9,183,30,11.6,0,-72,1,206,,*57
$PRAVE,0003,0001,3308.9116,-11713.1304,155050,2,9,191,31,11.6,0,-71,0,0,,*7C

The latest Tech Notes for the $PRAVE Data Format can be found here.

$PRAVE Message With Odometer Value Sent:

$PRAVE,0845,0001,3815.0856,-8537.1406,090023,2,10,173,25,14.2,0,-88,92,4,,,1595.2*71

This example shows a unit at 38° 15.0856 north latitude and -85° 37.1406 east longitude.It is moving at 92km/h. The electronic odometer reading for in the transponder of the vehicle is 1595.2km.

$PRAVE,0739,0001,3808.4727,-8538.2088,090013,2,10,200,25,13.2,0,-107,0,0,,,1143.1*7C
$PRAVE,0281,0001,3808.4750,-8538.2567,090022,1,9,199,25,13.1,0,-110,0,0,,,1934.9*41
$PRAVE,0845,0001,3815.0856,-8537.1406,090023,2,10,173,25,14.2,0,-88,92,4,,,1595.2*71$PRAVE,0314,0001,3811.5857,-8547.6362,090024,2,10,145,25,13.2,0,-88,0,0,,,1381.5*45$PRAVE,0739,0001,3808.4726,-8538.2088,090058,2,10,200,25,13.2,0,-106,0,0,,,1143.1*73$PRAVE,0281,0001,3808.4750,-8538.2568,090107,1,9,199,25,13.1,0,-111,0,0,,,1934.9*49$PRAVE,0845,0001,3815.6565,-8537.3903,090108,2,10,178,25,14.3,0,-91,90,354,,,1596.3*7C
$PRAVE,0314,0001,3811.5856,-8547.6362,090109,2,9,145,25,13.2,0,-88,0,0,,,1381.5*72$PRAVE,0739,0001,3808.4727,-8538.2088,090143,2,10,200,25,13.2,0,-107,0,0,,,1143.1*78$PRAVE,0281,0001,3808.4753,-8538.2569,090152,1,10,199,25,13.1,0,-116,0,0,,,1934.9*74$PRAVE,0845,0001,3816.2283,-8537.6356,090153,2,10,180,25,14.3,0,-103,89,326,,,1597.4*43

The latest Tech Notes for the $PRAVE Data Format can be found here.