diff --git a/formats/platform_status.py b/formats/platform_status.py index d573d42362a75fdff961c05d612cb437b7ed3732..07908ee7bbf7aa633a9c1b0a4eb03051c49d8601 100644 --- a/formats/platform_status.py +++ b/formats/platform_status.py @@ -32,149 +32,149 @@ platform_status_message_schema = { "description": "Type of message", "example": "platform_status", }, - # "platform_ID": { - # "type": "integer", - # "description": "Identifier for platform", - # "example": 1, - # }, - # "status_source": { - # "type": "string", - # "enum": ["usbl", "onboard_platform"], - # "description": "Indicate if this status message is from the" - # + " platform or USBL", - # "example": "usbl", - # }, - # "transmission_mode": { - # "type": "string", - # "enum": ["acoustics", "iridium", "wifi", "starlink"], - # "description": "Mode in which status message was transmitted" - # + " when on the surface (e.g. iridium/wifi) or underwater" - # + " (e.g. acoustics)", - # "example": "wifi", - # }, - # "platform_timestamp": { - # "type": "string", - # "format": "date-time", - # "description": "Timestamp for onboard platform status message", - # "example": "2022-12-21T00:00:00Z", - # }, - # "platform_state": { - # "type": "string", # TODO: Define enum with potential STATES of each platform - # "description": "Current state executed by platform. E.g. " - # + "STOP, IDLE, ABORT.", - # "example": "ABORT", - # }, - # "autonomy_engine_plan_ID": { - # "type": "integer", - # "description": "Last mission plan ID (according to Autonomy" - # + " Engine's mission plan number sent) executed by platform", - # "example": 1, - # }, - # "latitude": { - # "type": "number", - # "format": "float", - # "description": "Latitude in decimal degrees.", - # "example": 178.2, - # }, - # "longitude": { - # "type": "number", - # "format": "float", - # "description": "Longitude in decimal degrees.", - # "example": -10.122, - # }, - # "depth": { - # "type": "number", - # "format": "float", - # "description": "Target depth in metres", - # "example": 50, - # "default": 0, - # }, - # "altitude": { - # "type": "number", - # "format": "float", - # "description": "Target altitude in metres", - # "example": 20, - # }, - # "mission_track_ID": { - # "type": "integer", - # "description": "Track number - stage in mission (e.g. " - # + "4 --> Waypoint 3 to Waypoint 4)", - # "example": 4, - # }, - # "mission_action_ID": { - # "type": "integer", - # "description": "", # TODO: Add description - # "example": 1, - # }, - # "range_to_go": { - # "type": "number", - # "format": "float", - # "description": "Estimated distance to reach next waypoint", - # "example": 124.3, - # }, - # "speed_over_ground": { - # "type": "number", - # "format": "float", - # "description": "", # TODO: Add description - # "example": 124.3, - # }, - # "water_current_velocity": { - # "type": "number", - # "format": "float", - # "description": "", # TODO: Add description - # "example": 124.3, - # }, - # "thrust_applied": { - # "type": "number", - # "format": "float", - # "description": "", # TODO: Add description - # "example": 124.3, - # }, - # "heading": { - # "type": "number", - # "format": "float", - # "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 " - # + "if any diagnosis is available to check sensors", - # "example": "Warning", - # }, - # "localisation_error": { - # "type": "number", - # "format": "float", - # "description": "Localisation error at last USBL update.", - # "example": 0.000129, - # }, - # "usbl_fix_seconds_ago": { - # "type": "number", - # "format": "float", - # "description": "USBL Fix received x second ago.", - # "example": 10.0, - # }, - # "battery_remaining_capacity": { - # "type": "number", - # "format": "float", - # "description": "Battery remaining % provided by respective C2", - # "example": 80.2, - # }, - # "current_pitch": { - # "type": "number", - # "format": "float", - # "description": "Current pitch of platform", - # "example": -4.0, - # }, + "platform_ID": { + "type": "integer", + "description": "Identifier for platform", + "example": 1, + }, + "status_source": { + "type": "string", + "enum": ["usbl", "onboard_platform"], + "description": "Indicate if this status message is from the" + + " platform or USBL", + "example": "usbl", + }, + "transmission_mode": { + "type": "string", + "enum": ["acoustics", "iridium", "wifi", "starlink"], + "description": "Mode in which status message was transmitted" + + " when on the surface (e.g. iridium/wifi) or underwater" + + " (e.g. acoustics)", + "example": "wifi", + }, + "platform_timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp for onboard platform status message", + "example": "2022-12-21T00:00:00Z", + }, + "platform_state": { + "type": "string", # TODO: Define enum with potential STATES of each platform + "description": "Current state executed by platform. E.g. " + + "STOP, IDLE, ABORT.", + "example": "ABORT", + }, + "autonomy_engine_plan_ID": { + "type": "integer", + "description": "Last mission plan ID (according to Autonomy" + + " Engine's mission plan number sent) executed by platform", + "example": 1, + }, + "latitude": { + "type": "number", + "format": "float", + "description": "Latitude in decimal degrees.", + "example": 178.2, + }, + "longitude": { + "type": "number", + "format": "float", + "description": "Longitude in decimal degrees.", + "example": -10.122, + }, + "depth": { + "type": "number", + "format": "float", + "description": "Target depth in metres", + "example": 50, + "default": 0, + }, + "altitude": { + "type": "number", + "format": "float", + "description": "Target altitude in metres", + "example": 20, + }, + "mission_track_ID": { + "type": "integer", + "description": "Track number - stage in mission (e.g. " + + "4 --> Waypoint 3 to Waypoint 4)", + "example": 4, + }, + "mission_action_ID": { + "type": "integer", + "description": "", # TODO: Add description + "example": 1, + }, + "range_to_go": { + "type": "number", + "format": "float", + "description": "Estimated distance to reach next waypoint", + "example": 124.3, + }, + "speed_over_ground": { + "type": "number", + "format": "float", + "description": "", # TODO: Add description + "example": 124.3, + }, + "water_current_velocity": { + "type": "number", + "format": "float", + "description": "", # TODO: Add description + "example": 124.3, + }, + "thrust_applied": { + "type": "number", + "format": "float", + "description": "", # TODO: Add description + "example": 124.3, + }, + "heading": { + "type": "number", + "format": "float", + "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 " + + "if any diagnosis is available to check sensors", + "example": "Warning", + }, + "localisation_error": { + "type": "number", + "format": "float", + "description": "Localisation error at last USBL update.", + "example": 0.000129, + }, + "usbl_fix_seconds_ago": { + "type": "number", + "format": "float", + "description": "USBL Fix received x second ago.", + "example": 10.0, + }, + "battery_remaining_capacity": { + "type": "number", + "format": "float", + "description": "Battery remaining % provided by respective C2", + "example": 80.2, + }, + "current_pitch": { + "type": "number", + "format": "float", + "description": "Current pitch of platform", + "example": -4.0, + }, "sensor_config": sensor_schema, }, "required": [ "message_type", - # "platform_ID", - # "status_source", - # "platform_timestamp", - # "latitude", - # "longitude", + "platform_ID", + "status_source", + "platform_timestamp", + "latitude", + "longitude", ], } diff --git a/project/soar/soar_protocol.json b/project/soar/soar_protocol.json index 313c0fb79555d5a67a507a0a49362a3d97e68ebc..d43099d034539835221672cc837f0c6d60e41bf8 100644 --- a/project/soar/soar_protocol.json +++ b/project/soar/soar_protocol.json @@ -506,11 +506,102 @@ }, "platform_status": { "properties": { + "altitude": { + "description": "Target altitude in metres", + "example": 20, + "format": "float", + "type": "number" + }, + "autonomy_engine_plan_ID": { + "description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", + "example": 1, + "type": "integer" + }, + "battery_remaining_capacity": { + "description": "Battery remaining % provided by respective C2", + "example": 80.2, + "format": "float", + "type": "number" + }, + "current_pitch": { + "description": "Current pitch of platform", + "example": -4.0, + "format": "float", + "type": "number" + }, + "depth": { + "default": 0, + "description": "Target depth in metres", + "example": 50, + "format": "float", + "type": "number" + }, + "heading": { + "description": "Angular distance relative to north, usually 000\u00b0 at north, clockwise through 359\u00b0, in degrees", + "example": 124.3, + "format": "float", + "type": "number" + }, + "health_status": { + "description": "Health status extracted by respective platform if any diagnosis is available to check sensors", + "example": "Warning", + "type": "string" + }, + "latitude": { + "description": "Latitude in decimal degrees.", + "example": 178.2, + "format": "float", + "type": "number" + }, + "localisation_error": { + "description": "Localisation error at last USBL update.", + "example": 0.000129, + "format": "float", + "type": "number" + }, + "longitude": { + "description": "Longitude in decimal degrees.", + "example": -10.122, + "format": "float", + "type": "number" + }, "message_type": { "description": "Type of message", "example": "platform_status", "type": "string" }, + "mission_action_ID": { + "description": "", + "example": 1, + "type": "integer" + }, + "mission_track_ID": { + "description": "Track number - stage in mission (e.g. 4 --> Waypoint 3 to Waypoint 4)", + "example": 4, + "type": "integer" + }, + "platform_ID": { + "description": "Identifier for platform", + "example": 1, + "type": "integer" + }, + "platform_state": { + "description": "Current state executed by platform. E.g. STOP, IDLE, ABORT.", + "example": "ABORT", + "type": "string" + }, + "platform_timestamp": { + "description": "Timestamp for onboard platform status message", + "example": "2022-12-21T00:00:00Z", + "format": "date-time", + "type": "string" + }, + "range_to_go": { + "description": "Estimated distance to reach next waypoint", + "example": 124.3, + "format": "float", + "type": "number" + }, "sensor_config": { "description": "Scanning sensor on platform available to be controlled by the Autonomy Engine", "properties": { @@ -535,13 +626,62 @@ } }, "type": "object" + }, + "speed_over_ground": { + "description": "", + "example": 124.3, + "format": "float", + "type": "number" + }, + "status_source": { + "description": "Indicate if this status message is from the platform or USBL", + "enum": [ + "usbl", + "onboard_platform" + ], + "example": "usbl", + "type": "string" + }, + "thrust_applied": { + "description": "", + "example": 124.3, + "format": "float", + "type": "number" + }, + "transmission_mode": { + "description": "Mode in which status message was transmitted when on the surface (e.g. iridium/wifi) or underwater (e.g. acoustics)", + "enum": [ + "acoustics", + "iridium", + "wifi", + "starlink" + ], + "example": "wifi", + "type": "string" + }, + "usbl_fix_seconds_ago": { + "description": "USBL Fix received x second ago.", + "example": 10.0, + "format": "float", + "type": "number" + }, + "water_current_velocity": { + "description": "", + "example": 124.3, + "format": "float", + "type": "number" } }, "required": [ - "message_type" + "message_type", + "platform_ID", + "status_source", + "platform_timestamp", + "latitude", + "longitude" ], "type": "object" } } - } + } } \ No newline at end of file