VBOX Sport Serial (RS232) Protocol
Default message format
$VBSPT$,nnnniiii,stttaaaaoooovvhheeezzxxyybbmmmmffffddcc
The $VBSPT$ and commas are in ASCII, the rest is in binary
The four bytes of the nnnn field indicate the presence of standard channels in the data stream.
The four bytes of the iiii field indicate the presence of extended channels in the data stream.
Standard channels examples
- If only ‘sats’ and ‘speed’ are present the corresponding bit masks 0x00000001 and 0x00000010 would equate to the nnnn field equaling 0x00000011.
- If ‘sats’, ‘time’, ‘latitude’, ‘longitude’, ‘speed’, ‘heading’, ‘height’, ‘vertical velocity’, ‘lat.acc.’ and ‘long.acc.’ are present then the nnnn field would equal 0x000003FF.
Extended channels examples
- If only ‘battery time to empty’ is present the iiii field would equal 0x00000001.
- If ‘battery time to empty’, ‘media capacity’, ‘media free space’ and ‘HDOP’ are all present, the iiii field would equal 0x00000071.
Note: Some bit flags are not used, while others are not available in production units.
Default channels
Bluetooth
At the time of writing the default channels are:
- Standard channels 0x000003FF
Satellites, time, latitude, longitude, speed, heading, height, vertical speed, longitudinal acceleration and lateral acceleration.
- Extended channels 0x00000071
Battery time to empty, media capacity, media free space, HDOP.
USB
At the time of writing the default channels are:
- Standard channels 0x000000FF
Satellites, time, latitude, longitude, speed, heading, height, vertical speed.
- Extended channels 0x00000000
None.
Fields List
Note that for clarity, the fields are colour coded:
- The meta-data fields are Green.
- The standard channel fields are Blue.
- The extended channel fields are Purple.
- Any unsupported channels are uncoloured.
Code in default message format | Bytes | Description | Bit mask |
---|---|---|---|
$VBSPT$ | 7 | Header $VBSPT$ |
|
, | 1 | Comma | |
nnnn | 4 | Standard Channel Flags 0x000003FF |
|
iiii | 4 | Extended Channel Flags 0x00000071 |
|
, | 1 | Comma | |
s | 1 |
Satellites Bits 0-6 are number of satellites used Bit 7 is set if the VBOX SPORT is using DGPS |
0x00000001 |
ttt | 3 | Time Number of 10 ms ticks since midnight UTC |
0x00000002 |
aaaa | 4 |
Latitude (minutes * 100,000) Positive = North, Negative = South |
0x00000004 |
oooo | 4 |
Longitude (minutes * 100,000) Positive = West, Negative = East |
0x00000008 |
vv | 2 | Speed Velocity in knots * 100 |
0x00000010 |
hh | 2 | Heading Degrees from true north * 100 |
0x00000020 |
eee | 3 |
Height Altitude in metres WGS84 * 100 True signed 24 bit number |
0x00000040 |
zz | 2 | Vertical Speed Vertical speed in m/s |
0x00000080 |
xx | 2 | Long acc (GPS) Longitudinal acceleration in g * 100 |
0x00000100 |
yy | 2 | Lat acc (GPS) Lateral acceleration in g * 100 |
0x00000200 |
4 | Brake distance | 0x00000400 | |
4 | Distance In m * 128000 |
0x00000800 | |
4 | Internal analogue 1 | 0x00001000 | |
4 | Internal analogue 2 | 0x00002000 | |
4 | Internal analogue 3 | 0x00004000 | |
4 | Internal analogue 4 | 0x00008000 | |
1 | Glonass sats | 0x00010000 | |
1 | GPS sats | 0x00020000 | |
2 | Yaw 0 value | 0x00040000 | |
2 | Yaw 0 LatAcc | 0x00080000 | |
2 | Yaw 0 Status | 0x00100000 | |
2 | Yaw 1 value | 0x00200000 | |
2 | Yaw 1 LatAcc | 0x00400000 | |
2 | Yaw 1 Status | 0x00800000 | |
4 | Velocity quality | 0x01000000 | |
4 | Temperature In degrees C * 100 |
0x02000000 | |
2 | Buffer size | 0x04000000 | |
3 | Media Free Space (0xEF7FF – ((percent_free / 100) * 0xEF7FF)) |
0x08000000 | |
4 | Event time 1 | 0x10000000 | |
2 | Event time 2 | 0x20000000 | |
2 | Internal voltage | 0x40000000 | |
2 | Battery voltage In mV |
0x80000000 | |
bb | 2 | Battery time to empty In minutes. TTE field from gas gauge. A value of 0xFFFF is shown if the battery is not discharging. |
0x00000001 |
2 | Battery time to full In minutes. TTF field from gas gauge. A value of 0xFFFF is shown if the battery is not charging |
0x00000002 | |
2 | Battery charge when full In mAh. FCC field from gas gauge |
0x00000004 | |
2 | Battery current charge As a percentage of charge when full. RM field from gas gauge |
0x00000008 | |
mmmm | 4 | Media capacity In kb |
0x00000010 |
ffff | 4 | Media free space In kb |
0x00000020 |
dd | 2 | HDOP Value * 100 |
0x00000040 |
cc | 2 | Checksum CRC of message, See Note 1* |
*Note 1
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;
Troubleshooting
"I am only receiving a message containing '$VBSPT' from the VBOX Sport"
Please interpret the data as binary to resolve this issue. “$VBSPT” is a header and is in ASCII whilst the rest of the data is binary. Please see the section entitled: ‘Default message format’ at the top of this document for further information.