JSON schema definitions for MQTT messages
The server response is available also in a JSON format. The format is indicated by the subscribed topic name. You can copy the JSON file from the codeblock below.
Note
The enumerations (
position.positionTechnology,noPosition.reason,information.status,error.status) match the definitions in the response protobuf message.
ServerResponse
{
"$id": "https://here.com/hdgnss/positioning/ServerResponse.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "here.hdgnss.positioning.ServerResponse",
"type": "object",
"properties": {
"responses": {
"type": "array",
"items": {
"$ref": "#/$defs/response"
},
"minItems": 1
}
},
"required": [
"responses"
],
"$defs": {
"response": {
"type": "object",
"discriminator": {
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/position"
},
{
"$ref": "#/$defs/noPosition"
},
{
"$ref": "#/$defs/information"
},
{
"$ref": "#/$defs/error"
}
]
},
"position": {
"type": "object",
"properties": {
"type": {
"const": "position"
},
"timestamp": {
"type": "number",
"description": "Milliseconds (Unix time)"
},
"lat": {
"type": "number",
"description": "Latitude degrees (ITRF2014)"
},
"lng": {
"type": "number",
"description": "Longitude degrees (ITRF2014)"
},
"alt": {
"type": "number",
"description": "Altitude meters (ITRF2014)"
},
"horizontalUnc": {
"type": "number",
"description": "Horizontal uncertainty meters, 68% confidence"
},
"verticalUnc": {
"type": "number",
"description": "Altitude uncertainty meters, 68% confidence"
},
"bearing": {
"type": "number",
"description": "Degrees"
},
"bearingUnc": {
"type": "number",
"description": "Bearing uncertainty degrees, 68% confidence"
},
"speed": {
"type": "number",
"description": "Speed m/s"
},
"speedUnc": {
"type": "number",
"description": "Speed uncertainty m/s, 68% confidence"
},
"numSvs": {
"type": "integer",
"description": "Number of satellites used"
},
"positionTechnology": {
"type": "integer",
"description": "here.hdgnss.positioning.ServerResponse.Response.Position.PositionTechnology"
}
},
"required": [
"type",
"timestamp",
"lat",
"lng",
"alt",
"horizontalUnc",
"verticalUnc",
"positionTechnology"
]
},
"noPosition": {
"type": "object",
"properties": {
"type": {
"const": "noPosition"
},
"reason": {
"type": "integer",
"description": "here.hdgnss.positioning.ServerResponse.Response.NoPosition.Reason"
}
},
"required": [
"type",
"reason"
]
},
"information": {
"type": "object",
"properties": {
"type": {
"const": "information"
},
"status": {
"type": "integer",
"description": "here.hdgnss.positioning.ServerResponse.Response.Information.InformationStatus"
}
},
"required": [
"type",
"status"
]
},
"error": {
"type": "object",
"properties": {
"type": {
"const": "error"
},
"status": {
"type": "integer",
"description": "here.hdgnss.positioning.ServerResponse.Response.Error.ErrorStatus"
},
"errorMessage": {
"type": "string"
}
},
"required": [
"type",
"status"
]
}
}
}
Updated 20 days ago
Did this page help you?