8c5e3d3cead8ad339bcdcc31722b86da07de7c0e
[apps/agl-service-navigation.git] / README.md
1 # Navigation Service
2
3 ## Overview
4
5 Navigation service keeps track of application data that allows other clients to share location, waypoints,
6 and state between each other.
7
8 ## Verbs
9
10 | Name                | Description                                 | JSON Response                      |
11 |---------------------|---------------------------------------------|------------------------------------|
12 | subscribe           | subscribe to an navigation service          | *Request:* {"value": "status"}     |
13 | unsubscribe         | unsubscribe to an navigation service        | *Request:* {"value": "status"}     |
14 | broadcast_status    | broadcast status event to other clients     | *Request:* {"state": "stop"}       |
15 | broadcast_position  | broadcast position event to other clients   | See *position Verb* section        |
16 | broadcast_waypoints | broadcast waypoints events to other clients | See *waypoints Verb* section       |
17
18
19 ### broadcast_position Verb
20
21 Populate same data referenced in *position Event* section for the event
22
23 ### broadcast_waypoints Verb
24
25 Populate same data referenced in *waypoints Event* section for the event
26
27 ## Events
28
29 | Name           | Description                         |
30 |----------------|-------------------------------------|
31 | status         | status of the navigation engine     |
32 | position       | current route or car position event |
33 | waypoints      | waypoints for routing engine        |
34
35 ### position Event
36
37 <pre>
38 {
39   "points": [
40     {
41       "latitude": 36.12906,
42       "longitude": -115.17908
43     }
44   ]
45 }
46 </pre>
47
48 ### waypoints Event
49
50 <pre>
51 {
52   "points": [
53     {
54       "latitude": 36.12906,
55       "longitude": -115.17908
56     }
57   ]
58 }
59 </pre>