Skip to content

Commit 1424c63

Browse files
Add rich telemetry data to provider by extending Geographic Data definitions
1 parent ff8028f commit 1424c63

2 files changed

Lines changed: 29 additions & 9 deletions

File tree

general-information.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This document contains specifications that are shared between the various MDS AP
99
* [Definitions](#definitions)
1010
* [Devices](#devices)
1111
* [Geographic Data][geo]
12+
* [Geographic Telemetry Data](#geographic-telemetry-data)
1213
* [Stop-based Geographic Data](#stop-based-geographic-data)
1314
* [Intersection Operation](#intersection-operation)
1415
* [Geography-Driven Events](#geography-driven-events)
@@ -73,14 +74,32 @@ Additionally, `device_id` must remain constant for the device's lifetime of serv
7374

7475
References to geographic datatypes (Point, MultiPolygon, etc.) imply coordinates encoded in the [WGS 84 (EPSG:4326)][wgs84] standard GPS or GNSS projection expressed as [Decimal Degrees][decimal-degrees]. When points are used, you may assume a 20 meter buffer around the point when needed.
7576

76-
Whenever an individual location coordinate measurement is presented, it must be
77-
represented as a GeoJSON [`Feature`][geojson-feature] object with a corresponding [`timestamp`][ts] property and [`Point`][geojson-point] geometry:
77+
### Geographic Telemetry Data
78+
79+
Whenever a vehicle location coordinate measurement is presented, it must be
80+
represented as a GeoJSON [`Feature`][geojson-feature] object with a corresponding
81+
`properties` object with the following properties:
82+
83+
84+
| Field | Type | Required/Optional | Field Description |
85+
| -------------- | -------------- | --------------------- | ------------------------------------------------------------ |
86+
| `timestamp` | [timestamp][ts] | Required | Date/time that event occurred. Based on GPS or GNSS clock |
87+
| `altitude` | Double | Required if Available | Altitude above mean sea level in meters |
88+
| `heading` | Double | Required if Available | Degrees - clockwise starting at 0 degrees at true North |
89+
| `speed` | Float | Required if Available | Speed in meters / sec |
90+
| `accuracy` | Float | Required if Available | Accuracy in meters |
91+
| `hdop` | Float | Required if Available | Horizontal GPS or GNSS accuracy value (see [hdop][hdop]) |
92+
| `satellites` | Integer | Required if Available | Number of GPS or GNSS satellites
93+
94+
Example of a vehicle location GeoJSON [`Feature`][geojson-feature] object:
7895

7996
```json
8097
{
8198
"type": "Feature",
8299
"properties": {
83-
"timestamp": 1529968782421
100+
"timestamp": 1529968782421,
101+
"accuracy": 10,
102+
"speed": 1.21
84103
},
85104
"geometry": {
86105
"type": "Point",
@@ -444,6 +463,7 @@ If an unsupported or invalid version is requested, the API must respond with a s
444463

445464
[agency]: /agency/README.md
446465
[decimal-degrees]: https://en.wikipedia.org/wiki/Decimal_degrees
466+
[hdop]: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)
447467
[gbfs-station-info]: https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson
448468
[gbfs-station-status]: https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_statusjson
449469
[general-stops]: /general-information.md#stops

provider/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ For the near-ish real time use cases, please use the [events][events] endpoint.
199199

200200
### Routes
201201

202-
To represent a route, MDS `provider` APIs must create a GeoJSON [`FeatureCollection`][geojson-feature-collection], which includes every [observed point][geo] in the route, even those which occur outside the [municipality boundary][muni-boundary].
202+
To represent a route, MDS `provider` APIs must create a GeoJSON [`FeatureCollection`][geojson-feature-collection], which includes every [observed point][point-geo] in the route, even those which occur outside the [municipality boundary][muni-boundary].
203203

204204
Routes must include at least 2 points: the start point and end point. Routes must include all possible GPS or GNSS samples collected by a Provider. Providers may round the latitude and longitude to the level of precision representing the maximum accuracy of the specific measurement. For example, [a-GPS][agps] is accurate to 5 decimal places, [differential GPS][dgps] is generally accurate to 6 decimal places. Providers may round those readings to the appropriate number for their systems.
205205

@@ -271,7 +271,7 @@ Unless stated otherwise by the municipality, this endpoint must return only thos
271271
| `event_types` | Enum[] | Required | [Vehicle event(s)][vehicle-events] for state change, allowable values determined by `vehicle_state` |
272272
| `event_time` | [timestamp][ts] | Required | Date/time that event occurred at. See [Event Times][event-times] |
273273
| `publication_time` | [timestamp][ts] | Optional | Date/time that event became available through the status changes endpoint |
274-
| `event_location` | GeoJSON [Point Feature][geo] | Required | See also [Stop-based Geographic Data][stop-based-geo]. |
274+
| `event_location` | GeoJSON [Point Feature][point-geo] | Required | See also [Stop-based Geographic Data][stop-based-geo]. |
275275
| `event_geographies` | UUID[] | Optional | **[Beta feature](/general-information.md#beta-features):** *Yes (as of 1.1.0)*. Array of Geography UUIDs consisting of every Geography that contains the location of the status change. See [Geography Driven Events][geography-driven-events]. Required if `event_location` is not present. |
276276
| `battery_pct` | Float | Required if Applicable | Percent battery charge of device, expressed between 0 and 1 |
277277
| `trip_id` | UUID | Required if Applicable | Trip UUID (foreign key to Trips API), required if `event_types` contains `trip_start`, `trip_end`, `trip_cancel`, `trip_enter_jurisdiction`, or `trip_leave_jurisdiction` |
@@ -535,8 +535,8 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
535535
| `last_event_time` | [timestamp][ts] | Required | Date/time when last state change occurred. See [Event Times][event-times] |
536536
| `last_vehicle_state` | Enum | Required | [Vehicle state][vehicle-states] of most recent state change. |
537537
| `last_event_types` | Enum[] | Required | [Vehicle event(s)][vehicle-events] of most recent state change, allowable values determined by `last_vehicle_state`. |
538-
| `last_event_location` | GeoJSON [Point Feature][geo]| Required | Location of vehicle's last event. See also [Stop-based Geographic Data][stop-based-geo]. |
539-
| `current_location` | GeoJSON [Point Feature][geo] | Required if Applicable | Current location of vehicle if different from last event, and the vehicle is not currently on a trip. See also [Stop-based Geographic Data][stop-based-geo]. |
538+
| `last_event_location` | GeoJSON [Point Feature][point-geo]| Required | Location of vehicle's last event. See also [Stop-based Geographic Data][stop-based-geo]. |
539+
| `current_location` | GeoJSON [Point Feature][point-geo] | Required if Applicable | Current location of vehicle if different from last event, and the vehicle is not currently on a trip. See also [Stop-based Geographic Data][stop-based-geo]. |
540540
| `battery_pct` | Float | Required if Applicable | Percent battery charge of device, expressed between 0 and 1 |
541541

542542
[Top][toc]
@@ -552,7 +552,6 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
552552
[event-times]: #event-times
553553
[gbfs]: https://github.com/NABSA/gbfs
554554
[general-information]: /general-information.md
555-
[geo]: /general-information.md#geographic-data
556555
[geography-driven-events]: /general-information.md#geography-driven-events
557556
[geojson-feature-collection]: https://tools.ietf.org/html/rfc7946#section-3.3
558557
[iana]: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
@@ -561,6 +560,7 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
561560
[json-api-pagination]: http://jsonapi.org/format/#fetching-pagination
562561
[json-schema]: https://json-schema.org
563562
[muni-boundary]: #municipality-boundary
563+
[point-geo]: /general-information.md#geographic-telemetry-data
564564
[propulsion-types]: /general-information.md#propulsion-types
565565
[responses]: /general-information.md#responses
566566
[status]: #status-changes
@@ -577,4 +577,4 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
577577
[vehicle-states]: /general-information.md#vehicle-states
578578
[vehicle-events]: /general-information.md#vehicle-state-events
579579
[vehicles-schema]: vehicles.json
580-
[versioning]: /general-information.md#versioning
580+
[versioning]: /general-information.md#versioning

0 commit comments

Comments
 (0)