Commit eec6dc80 authored by Dan Jones's avatar Dan Jones
Browse files

Merge branch '47-mas-dt-update-platform-status-message' into '67-mas-dt'

Resolve "MAS-DT update platform status message"

See merge request !45
3 merge requests!59Release v2.0.0,!45Resolve "MAS-DT update platform status message",!36Resolve "Create temporary mas-dt branch for initial schema refactor"
Pipeline #232319 passed with stages
in 1 minute and 7 seconds
...@@ -9,9 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ...@@ -9,9 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed ### Changed
- Updated header version to accept semver, branch or commit - Use geojson Point for platform_status
- Add waypoint to platform_status
- Store remote schemas as committed local files - Store remote schemas as committed local files
This prevents the live runtime loading untested changes This prevents the live runtime loading untested changes
- Updated header version to accept semver, branch or commit
- Store remote schemas as committed local files
- Refactored planning_configuration message definition - Refactored planning_configuration message definition
- Remove region_of_interest and exclusion_zones - Remove region_of_interest and exclusion_zones
- Add primitives array of classified geojson Features - Add primitives array of classified geojson Features
......
{
"header":{
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2024-09-06T00:00:00Z",
"version": 2,
"source": "ecosub_c2",
"destination": "mas-dt.noc.slocum.unit_xxx.from_platform.platform_status",
"delivery_type": "publish",
"encoded": false
},
"payload":{
"message_type": "platform_status",
"platform_ID": "unit_xxx",
"platform_timestamp": "2024-09-06T00:00:00Z",
"status_source": "onboard_platform",
"autonomy_engine_plan_ID": 1,
"battery_remaining_capacity": 80.2,
"platform_state": "ABORT",
"mission_plan_ID": 1,
"mission_track_ID": 4,
"position": {
"type": "Point",
"coordinates": [
-10.122,
178.2,
50.0,
20
]
},
"waypoint": {
"type": "Point",
"coordinates": [
-10.5,
178.5
]
}
}
}
...@@ -72,31 +72,6 @@ platform_status_schema = { ...@@ -72,31 +72,6 @@ platform_status_schema = {
+ " Engine's mission plan number sent) executed by platform", + " Engine's mission plan number sent) executed by platform",
"example": 1, "example": 1,
}, },
"latitude": {
"type": "number",
"format": "float",
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
},
"longitude": {
"type": "number",
"format": "float",
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
},
"depth": {
"type": "number",
"format": "float",
"description": "Target depth in metres",
"example": 50.0,
"default": 0.0,
},
"altitude": {
"type": "number",
"format": "float",
"description": "Target altitude in metres",
"example": 20.0,
},
"mission_track_ID": { "mission_track_ID": {
"type": "integer", "type": "integer",
"description": "Track number - stage in mission (e.g. " "description": "Track number - stage in mission (e.g. "
...@@ -197,12 +172,85 @@ platform_status_schema = { ...@@ -197,12 +172,85 @@ platform_status_schema = {
}, },
"sensor_config": sensor_schema, "sensor_config": sensor_schema,
}, },
"oneOf": [
{
"type": "object",
"properties": {
"position": {
"$ref": "https://geojson.org/schema/Point.json",
},
"waypoint": {
"$ref": "https://geojson.org/schema/Point.json",
},
},
"required": [
"position",
],
},
{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "float",
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
},
"longitude": {
"type": "number",
"format": "float",
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
},
"depth": {
"type": "number",
"format": "float",
"description": "Target depth in metres",
"example": 50.0,
"default": 0.0,
},
"altitude": {
"type": "number",
"format": "float",
"description": "Target altitude in metres",
"example": 20.0,
},
"waypoint_latitude": {
"type": "number",
"format": "float",
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
},
"waypoint_longitude": {
"type": "number",
"format": "float",
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
},
"waypoint_depth": {
"type": "number",
"format": "float",
"description": "Target depth in metres",
"example": 50.0,
"default": 0.0,
},
"waypoint_altitude": {
"type": "number",
"format": "float",
"description": "Target altitude in metres",
"example": 20.0,
},
},
"required": [
"latitude",
"longitude",
],
},
],
"required": [ "required": [
"message_type", "message_type",
"platform_ID", "platform_ID",
"status_source", "status_source",
"platform_timestamp", "platform_timestamp",
"latitude",
"longitude",
], ],
} }
...@@ -2010,6 +2010,22 @@ ...@@ -2010,6 +2010,22 @@
"type": "object" "type": "object"
}, },
"platform_status": { "platform_status": {
"oneOf": [
{
"properties": {
"position": {
"$ref": "#/components/schemas/geojson.org.schema.Point.json"
},
"waypoint": {
"$ref": "#/components/schemas/geojson.org.schema.Point.json"
}
},
"required": [
"position"
],
"type": "object"
},
{
"properties": { "properties": {
"altitude": { "altitude": {
"description": "Target altitude in metres", "description": "Target altitude in metres",
...@@ -2017,6 +2033,59 @@ ...@@ -2017,6 +2033,59 @@
"format": "float", "format": "float",
"type": "number" "type": "number"
}, },
"depth": {
"default": 0.0,
"description": "Target depth in metres",
"example": 50.0,
"format": "float",
"type": "number"
},
"latitude": {
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
"format": "float",
"type": "number"
},
"longitude": {
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
"format": "float",
"type": "number"
},
"waypoint_altitude": {
"description": "Target altitude in metres",
"example": 20.0,
"format": "float",
"type": "number"
},
"waypoint_depth": {
"default": 0.0,
"description": "Target depth in metres",
"example": 50.0,
"format": "float",
"type": "number"
},
"waypoint_latitude": {
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
"format": "float",
"type": "number"
},
"waypoint_longitude": {
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
"format": "float",
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"type": "object"
}
],
"properties": {
"autonomy_engine_plan_ID": { "autonomy_engine_plan_ID": {
"description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", "description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform",
"example": 1, "example": 1,
...@@ -2034,13 +2103,6 @@ ...@@ -2034,13 +2103,6 @@
"format": "float", "format": "float",
"type": "number" "type": "number"
}, },
"depth": {
"default": 0.0,
"description": "Target depth in metres",
"example": 50.0,
"format": "float",
"type": "number"
},
"endurance": { "endurance": {
"description": "Estimate of hours of operation remaining based on present output or performance", "description": "Estimate of hours of operation remaining based on present output or performance",
"example": 7.4, "example": 7.4,
...@@ -2070,12 +2132,6 @@ ...@@ -2070,12 +2132,6 @@
"example": false, "example": false,
"type": "boolean" "type": "boolean"
}, },
"latitude": {
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
"format": "float",
"type": "number"
},
"localisation_east_error": { "localisation_east_error": {
"description": "Difference in EAST between deadreckoningand USBL update.", "description": "Difference in EAST between deadreckoningand USBL update.",
"example": 0.000129, "example": 0.000129,
...@@ -2088,12 +2144,6 @@ ...@@ -2088,12 +2144,6 @@
"format": "float", "format": "float",
"type": "number" "type": "number"
}, },
"longitude": {
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
"format": "float",
"type": "number"
},
"message_type": { "message_type": {
"description": "Type of message", "description": "Type of message",
"enum": [ "enum": [
...@@ -2208,9 +2258,7 @@ ...@@ -2208,9 +2258,7 @@
"message_type", "message_type",
"platform_ID", "platform_ID",
"status_source", "status_source",
"platform_timestamp", "platform_timestamp"
"latitude",
"longitude"
], ],
"type": "object" "type": "object"
}, },
......
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