Documentation of gps

Service for geolocation

GPS service reports current WGS84 coordinates from GNSS devices via the gpsd application.
Version:0.1
Author:AGL
Maintainer:Scott Rifenbark
Site:https://doc.automotivelinux.org/...

Verbs

Events

Events

Verb subscribe

subscribe to gps/gnss events

request: { "title": "Description of the event subscribed or unsubscribed", "type": "object", "properties": { "value": { "enum": [ "location" ] } }, "required": [ "value" ] }

reply success: { "schema": { "title": "no value, just null", "const": null }, "set-state": { "listening": true } }

Verb unsubscribe

unsubscribe to gps/gnss events

request: { "title": "Description of the event subscribed or unsubscribed", "type": "object", "properties": { "value": { "enum": [ "location" ] } }, "required": [ "value" ] }

reply success: { "schema": { "title": "no value, just null", "const": null }, "set-state": { "listening": false } }

Verb location

get current gps/gnss coordinates

request: { "title": "no value, just null", "const": null }

reply success: { "title": "the location", "type": "object", "properties": { "altitude": { "title": "the altitude in meters above the normal geoide", "type": "number", "minimum": -20000, "maximum": 20000 }, "latitude": { "title": "the latitude in degrees", "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "title": "the longitude in degrees", "type": "number", "minimum": -180, "maximum": 180 }, "speed": { "title": "the speed in meter per seconds m\/s", "type": "number", "minimum": 0, "maximum": 6000 }, "track": { "title": "the heading in degrees", "type": "number", "minimum": 0, "maximum": 360 }, "timestamp": { "title": "time stamp of the location as a ISO8601 date", "type": "string", "pattern": "\\d{4,}-[01][0-9]-[0-3][0-9]T[012][0-9]:[0-5][0-9]:[0-5][0-9].*" } } }

reply _: An error can be returned when the service isn't ready

Verb record

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.

request: { "type": "object", "properties": { "state": { "const": "on" } }, "required": [ "state" ] }

reply success: { "schema": { "type": "object", "properties": { "filename": { "title": "the name of the file that records the data of format gps_YYYYMMDD_hhmm.log", "type": "string", "pattern": "gps_\\d{4}\\d{2}\\d{2}_\\d{2}\\d{2}.log" } }, "required": [ "filename" ] }, "set-state": { "recording": true } }

reply _: An error can be returned when the service isn't ready

Event location

State Machine listening

State Machine recording