gps-wizard

SBP - SiRF Binary (Packed)

This format is generated by the Locosys GT-11, GT-31, GW-52 and GW-60.

Locosys Header

SBP files typically start with a file header which includes username, serial number, log rate, and firmware version.

From the Locosys documentation for V1.61(B0815a), but be aware that MID_FILE_ID(0xfd) is shorthand.

- New SBP header file is defined as follows :
 	BYTE 0 ~1 : real SBP header length 
 	BYTE 2~63:  MID_FILE_ID(0xfd) with following payload :
                       User Name, Serial Number, Log Rate, Firmware Version
			>field separator:","
			>User Name : MAX CHAR(13)
			>Serial Number : MAX CHAR(8)
			>Log Rate : MAX CHAR 3, 0..255 in seconds
			>Firmware Version  :  MAX CHAR (14) , V1.62(B0820T)

This is an example of a genuine SBP header:

00000000: 2600 a0a2 001e fd4b 3838 382c 3833 3230  &......K888,8320
00000010: 3034 3439 342c 312c 5631 2e34 2842 3038  04494,1,V1.4(B08
00000020: 3033 5429 0712 b0b3 ffff ffff ffff ffff  03T)............
00000030: ffff ffff ffff ffff ffff ffff ffff ffff  ................

Annotations using my Python code as reference:

length item value comment
2 bytes true length little endian payload length + 8 bytes = start token (2 bytes) + payload length (2 bytes) + payload + checksum (2 bytes) + end token (2 bytes)
2 bytes start token 0xa0a2  
2 bytes payload length little endian payload length can be an even or odd number of bytes
n bytes payload 0xfd … First byte of the payload is the “message ID” (0xfd)
2 bytes checksum big endian Simply add all of the unsigned bytes in the payload, including the 0xfd
2 bytes end token 0xb0b3  
… padding 0xff Padding to make header 64 bytes

Notes:

Geodetic Navigation Data - Message ID 41

The packed SiRF binary format consists of 32 byte messages which originate from the Geodetic Navigation Data.

SiRF Name Raw Name Type Name Type Units Resolution
HDOP hdop u1 hdop float32 - 2 x 10-1
Number of SVs in Fix sv_count u1 sat uint8 - -
UTC Milliseconds utc_millisecs <u2 ts float64 s 1 x 10-3
UTC Packed Datetime 1 utc_packed_datetime <u4 ts float64 s 1 x 10-3
Satellite ID List sv_ids <u4 svids uint32 - -
Latitude latitude <i4 lat float64 deg 1 x 10-7
Longitude longitude <i4 lon float64 deg 1 x 10-7
Altitude from MSL altitude_msl <i4 ele float64 m 1 x 10-2
Speed Over Ground (SOG) sog <u2 sog float32 m/s 1 x 10-2
Course Over Ground (COG, True) cog <u2 cog float32 deg 1 x 10-2
Climb Rate climb_rate <i2 roc float32 m/s 1 x 10-2
Speed Dilution of Precision sdop u1 ehve float32 m/s 1 x 10-2
Vertical Speed Dilution of Precision vsdop u1 evve float32 m/s 1 x 10-2

Notes:

  1. Two digit years in the packed datetime are since 2000.

SDOP and VSDOP

During the testing of the GPS Wizard modules, it was observed that GPSResults does not handle SDOP and VSDOP being unavailable in SBP files. This results in +/- figures of 0.000 being reported by GPSResults for SBP tracks missing SDOP and VSDOP which is incorrect / misleading.

GPS Wizard will ignore the last 2 bytes of the SBP files when SDOP and VSDOP are unpopulated; e.g. GT-11 tracks.