aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-01-09 19:37:00 -0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-01-11 14:31:56 +0000
commit6822fa6d062ae89c23dcd2c8e6af9f54bd5f0819 (patch)
tree88d49a4fa216ce52491a38c89f416de607c7c571 /README.md
parentaa0ad4e0eefc77c48603a0f33482ce9caf37b31e (diff)
Add initial documentation for agl-service-gps service Bug-AGL: SPEC-1245 Change-Id: I0794842da975798637f01c6e2e4b366da686b2eb Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md55
1 files changed, 42 insertions, 13 deletions
diff --git a/README.md b/README.md
index 7373158..e7ee9e8 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,48 @@
-mkdir build
-cd build
-cmake -DCMAKE_INSTALL_PREFIX=.... ..
-make
-make install
+# GPS Service
-# Start the binder
+## Overview
-```
-afb-daemon --token=x --ldpaths=. --port=5555 --rootdir=. --verbose --verbose --verbose --verbose --verbose
-```
+GPS service reports current WGS84 coordinates from GNSS devices via the gpsd application.
-# Environment variables
+## Verbs
-* AFBGPS_HOST : hostname to connect to
-* AFBGPS_SERVICE : service to connect to (tcp port)
-* AFBGPS_ISNMEA : 0/1 - does the frames are NMEA or not
+| Name | Description | JSON Parameters |
+| ------------------ |:----------------------------------------|:----------------------------------------------------|
+| subscribe | subscribe to gps/gnss events | *Request:* {"value": "location"} |
+| unsubscribe | unsubscribe to gps/gnss events | *Request:* {"value": "location"} |
+| location | get current gps/gnss coordinates | See **location Event JSON Response** section |
+| record | start/stop recording gps data | See **Recording/Replaying Feature** section |
+## Events
+
+| Name | Description |
+| ------------------ |:----------------------------------------|
+| location | event that reports gps/gnss coordinates |
+
+### location Event JSON Response
+
+| Parameter Name | Description |
+|----------------|:-------------------------------------------------------------|
+| altitude | altitude in meters |
+| latitude | latitude in degrees |
+| longitude | longitude in degrees |
+| speed | velocity in meters per second |
+| track | heading in degrees |
+| timestamp | timestamp in ISO8601 format *(example: 2018-01-25T13:15:22)* |
+
+## Recording/Replaying Feature
+
+Entering *record* mode you must send **{"state": "on"}** with the **record** verb which will have a JSON response of
+**{"filename": "gps_YYYYMMDD_hhmm.log"}** pointing to log under *app-data/agl-service-gps*
+
+Now to enter *replaying* mode you must symlink or copy a GPS dump to *app-data/agl-service-gps/recording.log* and restart
+the service. From then on out the previously recorded GPS data will loop infinitely which is useful for testing or
+demonstration purposes.
+
+## Environment variables
+
+| Name | Description |
+|-----------------|:---------------------------------|
+| AFBGPS\_HOST | hostname to connect to |
+| AFBGPS\_SERVICE | service to connect to (tcp port) |