Skip to main content
RACELOGIC Support Centre

08 - Speed Sensor RS232 / NMEA Output

flag-de.png

The RS232 output is present to provide a connection to a computer for configuring the settings of the VBSS through Racelogic Config software. It also can output NMEA format messages or Racelogic Braketest format.

RS232 Racelogic Data Format

Protocol:

115200 Baud, no parity, 8 data bits, 1 stop bit
 

Message format:

$VB2100stttaaaaaaaaoooooooovvhhAAggGGcc
 

Parameter Number of bytes Description
$VB2100 7 Header
S 1

Sats

Number of satellites used

ttt (MSB first)

Time

Ticks since midnight UTC, incrementing every 100 ms

aaaaaaaa 8 (MSB first)

Latitude

Double precision float 64 bit (radians)

oooooooo 8 (MSB first)

Longitude

Double precision float 64 bit (radians)

vv 2 (MSB first)

Velocity

0.01 knots per bit

hh 2 (MSB first)

Heading

0.01° per bit

AA 2 (MSB first)

Vertical Velocity

0.01 m/s per bit

gg 2 (MSB first)

Lateral Acceleration

0.01 g per bit

GG 2 (MSB first)

Longitudinal Acceleration

0.01 g per bit

cc 2 (MSB first) See CRC Calculation example below

 

 

CRC Calculation example:

s[n] is a string containing the message

Polynomial:= 4129

CRC:=0;

for Loop:=1 to Length(s) do

begin

Temp:=s[Loop];

CRC:= CRC xor (integer(Temp) *256);

CRC:= CRC mod 65536;

for i:=7 downto 0 do

begin

if ( (CRC and 32768)=32768) then

begin

CRC:= CRC *2 ;

CRC:= CRC xor Polynomial;

end

else

begin

CRC:= CRC *2 ;

end;

CRC:=CRC mod 65536;

end;

end;

result:=CRC;

Brake Test Serial Data Stream  

Protocol:

115200 Baud, no parity, 8 data bits, 1 stop bit
 

Message format:

$VBBTSTstttvvvvhhVVVVddddddddeeeescc
 

The header $VBBTST is in ASCII, the rest of the message is in hexadecimal.
 

Parameter Number of bytes Description
$VBBTST 7 Header
S 1

Sats

Number of satellites used

ttt 3 (MSB first)

Time

Number of 10 ms ticks since midnight UTC, 24 bit unsigned integer

vvvv 4 (MSB first)

Velocity

(m/s), 32 bit IEEE float

hh 2 (MSB first)

Heading

Heading in degrees (0.01°), 16 bit unsigned integer

VVVV 4 (MSB first)

Event Velocity

Speed at last event (m/s), 32 bit IEEE float

dddddddd 8 (MSB first)

Brake Distance

Distance since brake event (m), 64 bit IEEE double precision floating point number

eeee 4 (MSB first)

Event Time

Time of event from midnight (seconds)

s 1 (MSB first)

Status Flag

0x01 for brake trigger, 0x02 for brake trigger active

cc 2 (MSB first) See CRC Calculation example below

Notes:

  • 32 bit floats are in Little endian format (low byte first or Intel format)
  • Brake distance number is in Big endian format (high byte first or motorola format)

     

 

CRC Calculation example:

s[n] is a string containing the message

Polynomial:= 4129 (0x1021)

CRC:=0;

For Loop:=1 to Length(s) do

begin

Temp:=s[Loop];

CRC:= CRC xor (integer(Temp) * 256);

CRC:= CRC mod 65536;

for i:=7 downto 0 do

begin

if ( (CRC and 32768)=32768) then

begin

CRC:= CRC *2 ;

CRC:= CRC xor Polynomial;

end

else

begin

CRC:= CRC *2 ;

end;

CRC:=CRC mod 65536;

end;

end;

result:=CRC; 

NMEA Output

The VBSS can output 8 types of NMEA messages, the most commonly used are GPGGA and GPVTG, the contents of which are shown below.
 

$GPGGA,hhmmss.ss,Latitude,N,Longitude,E,FS,NoSV,HDOP,msl,m,Altref,m,DiffAge,DiffStation*cs<CR><LF>
 

Name ASCII String Units Description
Format Example
$GPGGA string $GPGGA   Message ID GGA protocol header
hhmmss.ss hhmmss.ss 092725.00161229.487   UTC Time Current time
Latitude dddmm.mmmm 4717.113993723.2475   Latitude Degrees + minutes
N character N   N/S Indicator N=north or S=south
Longitude dddmm.mmmm 00833.9159012158.3416   Longitude Degrees + Minutes
E character WE   E/W indicator E= east or W= west
FS 1 digit 1   Position Fix Indicator See Table 41
NoSV numeric 078   Satellites Used Range 0 to 12
HDOP numeric 1.001   HDOP Horizontal Dillution of Precision
Ms1 numeric 499.69.0 m MSL Altitude  
M character M   Units m
Altref blank 48.0 m Geoid Separation  
M blank M   Units m
DiffAge numeric   second Age of Differential Corrections Blank (Null) fields when DGPS is not used
DiffStation numeric 0   Diff. Reference Station ID  
Cs hexadecimal *5B*18   Checksum  
<CR> <LF>         End of message

$GPVTG,cogt,T,cogm,M,sog,N,kph,K*cs<CR><LF>
 

Name ASCII String Units Description
Format Example
$GPVTG string $GPTVTG   Message ID VTG protocol header
cogt numeric 77.52 Degrees   Course over ground (true)
T character T   fixed field True
cogm Blank     Course over ground (magnetic) Not output (empty)
M character M   fixed field Magnetic
sog numeric 0.004 Knots   Speed over ground
N character N      
kph numeric 0.008 km/h Speed  
K character K   K Kilometers per hour - fixed field
cs hexadecimal * 0B   Checksum  
<CR> <LF>         End of message
  • Was this article helpful?