-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added 'alt' and 'dist' to ground fix schema
- Loading branch information
1 parent
ece32ca
commit 1b074ce
Showing
5 changed files
with
159 additions
and
75 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
schemas/cloudToDevice/ground_fix/ground-fix-example-with-alt.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"appId": "GROUND_FIX", | ||
"messageType": "DATA", | ||
"data": { | ||
"lat": -45, | ||
"lon": 100, | ||
"uncertainty": 33, | ||
"fulfilledWith": "WIFI", | ||
"alt": [{ | ||
"dist": 200, | ||
"loc": { | ||
"lat": -45.2334, | ||
"lon": 99.7666, | ||
"uncertainty": 700, | ||
"fulfilledWith": "MCELL" | ||
} | ||
}] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,129 @@ | ||
{ | ||
"title":"Ground Fix Response", | ||
"description":"Responds with coordinates", | ||
"type":"object", | ||
"properties":{ | ||
"appId":{ | ||
"type":"string", | ||
"const":"GROUND_FIX" | ||
}, | ||
"messageType":{ | ||
"type":"string", | ||
"const":"DATA" | ||
}, | ||
"data":{ | ||
"type":"object", | ||
"properties":{ | ||
"lat":{ | ||
"$ref": "#/definitions/Lat" | ||
}, | ||
"lon":{ | ||
"$ref": "#/definitions/Lon" | ||
}, | ||
"uncertainty":{ | ||
"$ref": "#/definitions/Uncertainty" | ||
}, | ||
"fulfilledWith":{ | ||
"$ref": "#/definitions/FulfilledWith" | ||
}, | ||
"anchors": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"macAddress": { "type": "string", "pattern": "^((([0-9A-F]{2}:){5})|([0-9A-F]{10}))([0-9A-F]{2})$" }, | ||
"name": { "type": "string" } | ||
}, | ||
"required": ["macAddress"], | ||
"additionalProperties": false | ||
} | ||
"title": "Ground Fix Response", | ||
"description": "Responds with coordinates", | ||
"type": "object", | ||
"properties": { | ||
"appId": { | ||
"type": "string", | ||
"const": "GROUND_FIX" | ||
}, | ||
"messageType": { | ||
"type": "string", | ||
"const": "DATA" | ||
}, | ||
"data": { | ||
"type": "object", | ||
"properties": { | ||
"lat": { | ||
"$ref": "#/definitions/Lat" | ||
}, | ||
"lon": { | ||
"$ref": "#/definitions/Lon" | ||
}, | ||
"uncertainty": { | ||
"$ref": "#/definitions/Uncertainty" | ||
}, | ||
"fulfilledWith": { | ||
"$ref": "#/definitions/FulfilledWith" | ||
}, | ||
"alt": { | ||
"type": "object", | ||
"properties": { | ||
"dist": { | ||
"type": "number", | ||
"description": "Distance in meters between the alternate location and the main location." | ||
}, | ||
"loc": { | ||
"type": "object", | ||
"properties": { | ||
"lat": { | ||
"$ref": "#/definitions/Lat" | ||
}, | ||
"lon": { | ||
"$ref": "#/definitions/Lon" | ||
}, | ||
"uncertainty": { | ||
"$ref": "#/definitions/Uncertainty" | ||
}, | ||
"fulfilledWith": { | ||
"$ref": "#/definitions/FulfilledWith" | ||
} | ||
}, | ||
"required": [ | ||
"lat", | ||
"lon", | ||
"uncertainty", | ||
"fulfilledWith" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": [ | ||
"dist", "loc" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"anchors": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"macAddress": { | ||
"type": "string", | ||
"pattern": "^((([0-9A-F]{2}:){5})|([0-9A-F]{10}))([0-9A-F]{2})$" | ||
}, | ||
"name": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"macAddress" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"lat", | ||
"lon", | ||
"uncertainty", | ||
"fulfilledWith" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"err": { | ||
"type": "integer" | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"appId", | ||
"messageType" | ||
], | ||
"definitions": { | ||
"Lat": { | ||
"type": "number", | ||
"description": "GPS latitude", | ||
"minimum": -90, | ||
"maximum": 90 | ||
}, | ||
"Lon": { | ||
"type": "number", | ||
"description": "GPS longitude", | ||
"minimum": -180, | ||
"maximum": 180 | ||
}, | ||
"Uncertainty": { | ||
"type": "integer", | ||
"description": "HPE (horizontal positioning error) in meters" | ||
}, | ||
"FulfilledWith": { | ||
"enum": [ | ||
"MCELL", | ||
"SCELL", | ||
"WIFI", | ||
"ANCHOR" | ||
], | ||
"description": "How the request was fulfilled. WIFI is prioritized by the cloud. Falls back to SCELL/MCELL." | ||
} | ||
}, | ||
"required": [ "lat", "lon", "uncertainty", "fulfilledWith" ], | ||
"additionalProperties": false | ||
}, | ||
"err": { | ||
"type": "integer" | ||
} | ||
}, | ||
"additionalProperties":false, | ||
"required":[ | ||
"appId", | ||
"messageType" | ||
], | ||
"definitions": { | ||
"Lat":{ | ||
"type":"number", | ||
"description":"GPS latitude", | ||
"minimum": -90, | ||
"maximum": 90 | ||
}, | ||
"Lon":{ | ||
"type":"number", | ||
"description":"GPS longitude", | ||
"minimum": -180, | ||
"maximum": 180 | ||
}, | ||
"Uncertainty":{ | ||
"type":"integer", | ||
"description":"HPE (horizontal positioning error) in meters" | ||
}, | ||
"FulfilledWith": { | ||
"enum": ["MCELL", "SCELL", "WIFI", "ANCHOR"], | ||
"description": "How the request was fulfilled. WIFI is prioritized by the cloud. Falls back to SCELL/MCELL." | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters