26.0 Current Location

26.2c Binary Data Returned

Back to Index

A binary version 3 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 Version 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

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

 

Example binary “Current Location” Request

http://customer.zonarsystems.net/interface.php?action=showposition
&operation=current&format=binary&logvers=3&version=

Example binary “Current Location” Request with target specified

http://customer.zonarsystems.net/interface.php?action=showposition
&operation=current&format=binary&reqtype=dbid&target=19&logvers=3&version=2