25.0 Export a Path

25.2b Binary Data Returned

Back to Index

A binary GPS log file consists of a single header(56 bytes) and subsequent position entries(28 bytes/ea).

Binary File Header Format

GPS Export Log File Header Format Log Versions 2 and 3
Total size 56 bytes. All offsets and sizes in bytes.
Offset Type Size Description
0 – 7 ASCII Text 8 ZGPSEXPT Identifies the file as a GPS export log file
8 – 11 Unsigned Integer 4 Version. Identifies the header and entry version. This layout must be maintained by all versions. Currently supported is 3.
12 – 19 ASCII Text 8 Account code, unused bytes are to be null.
20 – 23 Unsigned long 4 Extraction timestamp – this is when the request was made.
24 – 27 Unsigned long 4 Entry count – the number of log entries to follow
28 – 43 ASCII Text 16 Route identification – can be left NULL for now.
44 – 55 Empty 12 Padding so that the header is an even multiple of the entry size.
Total: 56

 

GPS Export Log File Header Format Version 3.2
Total size 56 bytes. All offsets and sizes in bytes.
Offset Type Size Description
0 – 7 ASCII Text 8 ZGPSEXPT Identifies the file as a GPS export log file
8 – 11 Unsigned Integer 4 Version. Identifies the header and entry version. This layout must be maintained by all versions. Currently supported is 3.
12 – 19 ASCII Text 8 Account code, unused bytes are to be null.
20 – 23 Unsigned long 4 Extraction timestamp – this is when the request was made.
24 – 27 Unsigned long 4 Entry count – the number of log entries to follow
28 – 43 ASCII Text 16 Route identification – can be left NULL for now.
44 – 55 Empty 12 Padding so that the header is an even multiple of the entry size.
Total: 56

 

You may view the version 2 header format here.

Position Entry Layout

The file header will be followed by a series of position log entries. Each one will contain a timestamp, position, speed, heading, accumulated distance and information as to why the entry was recorded.

GPS Log File Entry Format Version 3
Total size 28 bytes. All offsets and sizes in bytes
Offset Type Size Description
0 – 3 Unsigned Long 4 Timestamp (Unix epoch)
4 – 7 Signed Integer 4 Latitude component (degrees / 10,000,000)
8 – 11 Signed Integer 4 Longitude component (degrees / 10,000,000)
12 – 13 Unsigned short 2 Speed (0.001 m/s)
14 Unsigned char 1 TBD
15 Unsigned char 1 TBD
16 – 17 Unsigned short 2 Heading (0.01 degrees)
18 – 21 Unsigned long 4 Accumulated distance (odometer). Meters
22 – 23 Unsigned short 2 Bit mask. See bitmap layout for details.
24 – 27 Unsigned long 4 Asset id. The database id for the asset this entry is associated with. Version 3 only.
Total: 28

 

You may view the version 2 position entry layout here.

Note: The accumulated distance/odometer in the binary log file differs from that given in a KML file. The binary log file accumulates the distance/odometer for the life of the GPS product. The KML odometer reads 0 at the start of the requested KML file.

Checksum Layout

Version 3 export files have a trailing checksum appended to them. This is a 4 byte unsigned long quantity containing a CRC32 checksum of all the preceding data, including the header. Example Implementation in ANSI C code

Is this api manual documents helpful?
0 out of 0 said Yes
YesNo