Commit db639711 authored by Trishna Saeharaseelan's avatar Trishna Saeharaseelan
Browse files

refactor: add heading field to platform status

parent d5cf284f
......@@ -20,6 +20,7 @@
"longitude": -10.122,
"depth": 50,
"altitude": 20,
"heading": 90.0,
"health_status": "Warning",
"localisation_error": null,
"usbl_fix_seconds_ago": null,
......
......@@ -11,6 +11,7 @@
"active": true,
"status_source": "onboard_platform",
"battery_remaining_capacity": 80.2,
"heading": 310.0,
"health_status": "Lost Connection",
"latitude": 178.2,
"longitude": -10.122,
......
......@@ -11,22 +11,23 @@ emergency_schema = {
"safe_command": {
"type": "string",
"enum": ["go_home", "abort_now", "stop_mission"],
"description": "Command/Action that is native to respective partner's platform/C2",
"description": "Command/Action that is native to respective"
+ " partner's platform/C2",
"example": "go_home",
},
"latitude_waypoint": {
"type": "number",
"description": "X-coordinate of safe place for respective platform",
"description": "X-coordinate safe place for respective platform",
"example": -7.432,
},
"longitude_waypoint": {
"type": "number",
"description": "Y-coordinate of safe place for respective platform",
"description": "Y-coordinate safe place for respective platform",
"example": 50.365,
},
"target_depth": {
"type": "number",
"description": "Z-coordinate of safe place for respective platform"
"description": "Z-coordinate safe place for respective platform"
+ " . If platform to NOT stay at depth, key in `0.0`",
"example": 10,
},
......@@ -79,7 +80,15 @@ platform_schema = {
"example": {"swath_width": 10.0, "scan_type": "DVL"},
},
},
"required": ["platform_ID", "serial", "model", "emergency", "min_altitude", "min_velocity", "max_velocity"],
"required": [
"platform_ID",
"serial",
"model",
"emergency",
"min_altitude",
"min_velocity",
"max_velocity",
],
}
region_schema = {
......
......@@ -117,6 +117,12 @@ platform_status_message_schema = {
"description": "TODO: Needs further consideration",
"example": 124.3,
},
"heading": {
"type": "number",
"description": "Angular distance relative to north, usually 000°"
+ " at north, clockwise through 359°, in degrees",
"example": 124.3,
},
"health_status": {
"type": "string",
"description": "Health status extracted by respective platform "
......
......@@ -109,8 +109,7 @@ for item in message_types:
"schema": {
"allOf": [
{
"$ref": "#/components/schemas"
+ "/" + item,
"$ref": "#/components/schemas/" + item,
},
],
"discriminator": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment