From 7337641ddb823c25d781e38a66996c3db29c5ca4 Mon Sep 17 00:00:00 2001 From: catp0wer <10280258+catp0wer@users.noreply.github.com> Date: Sat, 9 Nov 2019 13:01:47 +0200 Subject: [PATCH 1/2] Create vehicleTelemetry.json --- schema/vehicleTelemetry.json | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 schema/vehicleTelemetry.json diff --git a/schema/vehicleTelemetry.json b/schema/vehicleTelemetry.json new file mode 100644 index 0000000..4c91b7a --- /dev/null +++ b/schema/vehicleTelemetry.json @@ -0,0 +1,66 @@ +{ + "$schema":"http://json-schema.org/draft-07/schema#", + "$id":"http://roataway.md/schema/vehicleTelemetry.json", + "type":"object", + "title":"Vehicle telemetry schema", + "required":[ + "longitude", + "latitude", + "timestamp", + "speed", + "direction" + ], + "properties":{ + "longitude":{ + "$id":"#/properties/longitude", + "type":"number", + "minimum":-180.0, + "maximum":180.0, + "title":"Longitude", + "examples":[ + 28.887143 + ] + }, + "latitude":{ + "$id":"#/properties/latitude", + "type":"number", + "minimum":-90.0, + "maximum":90.0, + "title":"Latitude", + "examples":[ + 47.026044 + ] + }, + "timestamp":{ + "$id":"#/properties/timestamp", + "type":"string", + "format":"date-time", + "title":"Timestamp", + "description":"Format ISO 8601, YYYY-MM-DDTHH:MM:SSZ", + "examples":[ + "2019-08-18T16:42:29Z" + ], + "pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$" + }, + "speed":{ + "$id":"#/properties/speed", + "type":"integer", + "minimum":0, + "maximum":200, + "title":"Speed km/h", + "examples":[ + 0 + ] + }, + "direction":{ + "$id":"#/properties/direction", + "type":"number", + "minimum":0, + "maximum":360, + "title":"Vehicle movement direction degree", + "examples":[ + 180.8 + ] + } + } +} From 07973a93ec7dab3413d581bdcd922176150676e3 Mon Sep 17 00:00:00 2001 From: catp0wer <10280258+catp0wer@users.noreply.github.com> Date: Sat, 9 Nov 2019 13:05:58 +0200 Subject: [PATCH 2/2] Create routeTelemetry.json --- schema/routeTelemetry.json | 98 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 schema/routeTelemetry.json diff --git a/schema/routeTelemetry.json b/schema/routeTelemetry.json new file mode 100644 index 0000000..747ff1e --- /dev/null +++ b/schema/routeTelemetry.json @@ -0,0 +1,98 @@ +{ + "$schema":"http://json-schema.org/draft-07/schema#", + "$id":"http://roataway.md/schema/routeTelemetry.json", + "type":"object", + "title":"Route-centric vehicle telemetry schema", + "required":[ + "longitude", + "latitude", + "timestamp", + "speed", + "direction" + ], + "properties":{ + "longitude":{ + "$id":"#/properties/longitude", + "type":"number", + "minimum":-180.0, + "maximum":180.0, + "title":"Longitude", + "examples":[ + 28.887143 + ] + }, + "latitude":{ + "$id":"#/properties/latitude", + "type":"number", + "minimum":-90.0, + "maximum":90.0, + "title":"Latitude", + "examples":[ + 47.026044 + ] + }, + "timestamp":{ + "$id":"#/properties/timestamp", + "type":"string", + "format":"date-time", + "title":"Timestamp", + "description":"Format ISO 8601, YYYY-MM-DDTHH:MM:SSZ", + "examples":[ + "2019-08-18T16:42:29Z" + ], + "pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$" + }, + "speed":{ + "$id":"#/properties/speed", + "type":"integer", + "minimum":0, + "maximum":200, + "title":"Speed km/h", + "examples":[ + 0 + ] + }, + "direction":{ + "$id":"#/properties/direction", + "type":"number", + "minimum":0, + "maximum":360, + "title":"Vehicle movement direction degree", + "examples":[ + 180.8 + ] + }, + "board":{ + "$id":"#/properties/board", + "type":"string", + "minLength":4, + "maxLength":10, + "title":"Board identifier", + "description":"typically a number but can be a string", + "examples":[ + "2181" + ] + }, + "rtu_id":{ + "$id":"#/properties/rtu_id", + "type":"string", + "minLength":3, + "maxLength":10, + "title":"Unique tracker identifier", + "examples":[ + "0000154" + ] + }, + "route":{ + "$id":"#/properties/route", + "type":"string", + "minLength":1, + "maxLength":5, + "title":"Route", + "examples":[ + "8", + "6G" + ] + } + } +}