Table of Contents
Binary Files and Data Exchange
The Serval Maps application uses two binary files for sharing information between users.
The binary files use the Google Protocol Buffers API for the format of messages within the file.
They are defined in the following sections.
Additionally a JSON file containing location information can be created at the users choice.
All three files are shared across the network using the Rhizome capabilities of the Serval Project software.
Binary Location File
A binary file is used to share GPS location information.
Each file contains the GPS trace for a device. The devices phone number is used as part of the file name.
The format of the messages contained in the file is defined in this protocol buffer file. The messages contain the following fields:
Field Name | Field Description |
---|---|
phoneNumber | the primary phone number associated with the device |
subscriberId | the subscriber id associated with the device |
latitude | the latitude GPS coordinate in decimal degrees |
longitude | the longitude GPS coordinate in decimal degrees |
altitude | the altitude component of the GPS coordinate in meters # |
accuracy | the accuracy component of the GPS coordinate in meters # |
timestamp | the timestamp in milliseconds * |
timeZone | the Java timezone identifier for the current timezone as defined in system settings |
* measured in milliseconds since midnight, January 1, 1970 UTC.
# a value of -1 indicates that a value for this field was not available at the time of record creation
Binary Points of Interest File (Extended Format)
A binary file is used to share information about Points of Interest (POIs).
Each file contains a series of POI messages encoded as Google Protocol Buffer format using the format specified in this protocol buffer file.
This new version breaks binary compatibility with any previous version.
Field Name | Field Description |
---|---|
phoneNumber | the primary phone number associated with the device |
subscriberId | the subscriber id associated with the device |
latitude | the latitude GPS coordinate in decimal degrees |
longitude | the longitude GPS coordinate in decimal degrees |
altitude | the altitude component of the GPS coordinate in meters # |
accuracy | the accuracy component of the GPS coordinate in meters # |
timestamp | the timestamp in milliseconds * |
timeZone | the Java timezone identifier for the current timezone as defined in system settings |
title | the title of the point of interest |
description | the description of the point of interest |
tags | a list of tags associated with this POI |
extras | an arbitrary number of bytes |
* measured in milliseconds since midnight, January 1, 1970 UTC.
# a value of -1 indicates that a value for this field was not available at the time of POI creation
The extras field can store an arbitrary number of bytes, this could be for example an application specific message such as those used by MaGDAA
JSON Location File
The JSON location file is created if the user has turned on the appropriate setting in the application menu.
The format of the file matches the format specified by the LineString element of the GeoJson format.