|
4 | 4 | "title": "The MDS Agency Schema, POST vehicle status body", |
5 | 5 | "type": "object", |
6 | 6 | "definitions": { |
7 | | - "telemetry": { |
8 | | - "$id": "#/definitions/telemetry", |
| 7 | + "timestamp": { |
| 8 | + "$id": "#/definitions/timestamp", |
| 9 | + "type": "number", |
| 10 | + "description": "Integer milliseconds since Unix epoch", |
| 11 | + "multipleOf": 1.0, |
| 12 | + "minimum": 1514764800000 |
| 13 | + }, |
| 14 | + "uuid": { |
| 15 | + "$id": "#/definitions/uuid", |
| 16 | + "type": "string", |
| 17 | + "description": "A UUID used to uniquely identifty an object", |
| 18 | + "default": "", |
| 19 | + "examples": [ |
| 20 | + "3c9604d6-b5ee-11e8-96f8-529269fb1459" |
| 21 | + ], |
| 22 | + "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$" |
| 23 | + }, |
| 24 | + "vehicle_telemetry": { |
| 25 | + "$id": "#/definitions/vehicle_telemetry", |
9 | 26 | "type": "object", |
10 | | - "description": "A vehicle telemetry datum", |
| 27 | + "description": "A telemetry datum for a specific vehicle at a specific time", |
11 | 28 | "required": [ |
12 | 29 | "device_id", |
13 | 30 | "timestamp", |
|
47 | 64 | }, |
48 | 65 | "heading": { |
49 | 66 | "type": "number", |
50 | | - "description": "Degrees clockwise from true north" |
| 67 | + "description": "Degrees - clockwise starting at 0 degrees at true North" |
51 | 68 | }, |
52 | 69 | "speed": { |
53 | 70 | "type": "number", |
54 | | - "description": "Speed in meters/sec" |
| 71 | + "description": "Estimated speed in meters / sec as reported by the GPS chipset" |
55 | 72 | }, |
56 | 73 | "accuracy": { |
57 | 74 | "type": "number", |
58 | | - "description": "Accuracy in meters" |
| 75 | + "description": "Horizontal accuracy, in meters" |
59 | 76 | }, |
60 | 77 | "hdop": { |
61 | 78 | "type": "number", |
|
69 | 86 | }, |
70 | 87 | "charge": { |
71 | 88 | "type": "number", |
72 | | - "description": "Fraction of charge of the vehicle (required if applicable", |
| 89 | + "description": "Fraction of charge of the vehicle (required if applicable)", |
73 | 90 | "minimum": 0, |
74 | 91 | "maximum": 1 |
75 | 92 | } |
76 | 93 | } |
77 | 94 | }, |
78 | | - "timestamp": { |
79 | | - "$id": "#/definitions/timestamp", |
80 | | - "type": "number", |
81 | | - "description": "Integer milliseconds since Unix epoch", |
82 | | - "multipleOf": 1.0, |
83 | | - "minimum": 1514764800000 |
84 | | - }, |
85 | | - "uuid": { |
86 | | - "$id": "#/definitions/uuid", |
87 | | - "type": "string", |
88 | | - "description": "A UUID used to uniquely identifty an object", |
89 | | - "default": "", |
90 | | - "examples": [ |
91 | | - "3c9604d6-b5ee-11e8-96f8-529269fb1459" |
92 | | - ], |
93 | | - "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$" |
94 | | - }, |
95 | 95 | "vehicle_state": { |
96 | 96 | "$id": "#/definitions/vehicle_state", |
97 | 97 | "type": "string", |
|
167 | 167 | "$ref": "#/definitions/timestamp" |
168 | 168 | }, |
169 | 169 | "telemetry": { |
170 | | - "$ref": "#/definitions/telemetry" |
| 170 | + "$ref": "#/definitions/vehicle_telemetry" |
171 | 171 | }, |
172 | 172 | "trip_id": { |
173 | 173 | "$ref": "#/definitions/uuid" |
|
0 commit comments