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
......@@ -7,41 +7,44 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Changed
### Changed
- Use geojson Point for platform_status
- Add waypoint to platform_status
- Store remote schemas as committed local files
This prevents the live runtime loading untested changes
- Updated header version to accept semver, branch or commit
- Store remote schemas as committed local files
This prevents the live runtime loading untested changes
- 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
- Inject remote geojson schema definitions
- Use geojson Polygon instead of region_schema
- Upgraded openapi-spec-validator to latest release (0.7.1)
- Upgraded openapi-schema-validator to latest release (0.6.2)
## [v1.0.0] - 2024-08-28
## [v1.0.0] - 2024-08-28
### Changed
- Use discover to find all unit tests
- Run tests against current format definitions
- Test that formats match saved schema
- Use discover to find all unit tests
- Run tests against current format definitions
- Test that formats match saved schema
- Run python and javascript tests in CI
- Refactor schema script to remove invalid definitions object automatically
- Refactor generate_schema_config script to output file on -f flag
- Refactor generate_schema_config script to output file on -f flag
### Fixed
- Add `--remove-orphans` to javascript CI test docker compose arguments
## [v0.2.0] - 2024-02-06
## [v0.2.0] - 2024-02-06
### Added
### Added
- New alert message definition
- New alert message definition
- Emergency flag in mission plan schemas
- Added additional battery and fuel fields to platform status for SPINE project
- Added additional battery and fuel fields to platform status for SPINE project
### Changed
......@@ -53,13 +56,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
JSON schema definitions for the SoAR project
- outer wrapper MESSAGE definition
- header object
- header object
- payload object
- acknowledgement
- mission_plan (raw and encoded)
- observation (raw and encoded)
- platform_status (raw and encoded)
- planning_configuration
- platform_status (raw and encoded)
- planning_configuration
Example messages matching the schema for each partner
......
{
"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 = {
+ " Engine's mission plan number sent) executed by platform",
"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": {
"type": "integer",
"description": "Track number - stage in mission (e.g. "
......@@ -197,12 +172,85 @@ platform_status_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": [
"message_type",
"platform_ID",
"status_source",
"platform_timestamp",
"latitude",
"longitude",
],
}
......@@ -2010,13 +2010,82 @@
"type": "object"
},
"platform_status": {
"properties": {
"altitude": {
"description": "Target altitude in metres",
"example": 20.0,
"format": "float",
"type": "number"
"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": {
"altitude": {
"description": "Target altitude in metres",
"example": 20.0,
"format": "float",
"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": {
"description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform",
"example": 1,
......@@ -2034,13 +2103,6 @@
"format": "float",
"type": "number"
},
"depth": {
"default": 0.0,
"description": "Target depth in metres",
"example": 50.0,
"format": "float",
"type": "number"
},
"endurance": {
"description": "Estimate of hours of operation remaining based on present output or performance",
"example": 7.4,
......@@ -2070,12 +2132,6 @@
"example": false,
"type": "boolean"
},
"latitude": {
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
"format": "float",
"type": "number"
},
"localisation_east_error": {
"description": "Difference in EAST between deadreckoningand USBL update.",
"example": 0.000129,
......@@ -2088,12 +2144,6 @@
"format": "float",
"type": "number"
},
"longitude": {
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
"format": "float",
"type": "number"
},
"message_type": {
"description": "Type of message",
"enum": [
......@@ -2208,9 +2258,7 @@
"message_type",
"platform_ID",
"status_source",
"platform_timestamp",
"latitude",
"longitude"
"platform_timestamp"
],
"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