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

refactor: formats and examples

parent 46142c35
......@@ -15,7 +15,7 @@ Each message below will be wrapped in a `message_wrapper`:
```
python3 generate_swagger.py
```
2. Go to `http://127.0.0.1:5000/soardocs/`
2. Go to `http://127.0.0.1:5000`
# Quick Links
1. [Schema Fields Definitions](https://git.noc.ac.uk/communications-backbone-system/backbone-message-format/-/tree/7-message-formats-initial/formats)
......
{
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hydrosurv_adapter",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"message_type": "platform_status",
"active": true,
"autonomy_plan_ID": 1,
"battery_remaining_capacity": 80.2,
"gps_data": [
{
"altitude": 20,
"depth": 50,
"gps_source": "internal",
"latitude": 178.2,
"latitude_type": "string",
"longitude": -10.122,
"longitude_type": "string"
}
],
"health_status": "Warning",
"localisation_error": null,
"mission_action_ID": 1,
"mission_track_ID": 4,
"platform_ID": 1,
"platform_state": "ABORT",
"platform_timestamp": "2022-12-21T00:00:00Z",
"range_to_go": 124.3,
"sensor_config": {
"additional_data": {},
"sensor_serial": null,
"sensor_status": null
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hydrosurv_adapter",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"message_type": "platform_status",
"autonomy_engine_mission_plan_ID": 1,
"active": true,
"status_source": "onboard_platform",
"altitude": 20,
"battery_remaining_capacity": 80.2,
"depth": 50,
"health_status": "Warning",
"latitude": 178.2,
"localisation_error": 0.000129,
"longitude": -10.122,
"mission_action_ID": 1,
"mission_track_ID": 4,
"platform_ID": 1,
"platform_state": "ABORT",
"platform_timestamp": "2022-12-21T00:00:00Z",
"range_to_go": 124.3,
"sensor_config": {
"additional_data": {
"payload": [
1.2,
434
]
},
"speed_over_ground": 124.3,
"thrust_applied": 124.3,
"usbl_fix_seconds_ago": null,
"water_current_velocity": 124.3
}
"sensor_serial": "mbes-002a",
"sensor_status": true
},
"speed_over_ground": 124.3,
"thrust_applied": 124.3,
"usbl_fix_seconds_ago": 10,
"water_current_velocity": 124.3
}
\ No newline at end of file
{
"message_ID": "b427003c-7bc8-11ed-a1eb-0242ac120002",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "ecosub_c2",
"encoded": false,
"type": "mission_plan",
"payload": {
"plan_ID": 3,
"platform_serial": "ecosub-4",
"plan": [
{
"action": "move",
"flight_style": "dive",
"latitude_waypoint": -4.187143188645706,
"longitude_waypoint": 50.37072283932642,
"altitude": 20,
"depth": null,
"activate_payload": true,
"send_environmental_data": false
}
]
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "ecosub_c2",
"delivery_type": "publish",
"encoded": false,
"message_type": "mission_plan",
"platform_serial": "reav-60",
"autonomy_engine_mission_plan_ID": 1,
"plan": [
{
"action": "move",
"flight_style": "go to waypoint",
"latitude_waypoint": -3.237143188645706,
"longitude_waypoint": 52.37072283932642,
"altitude": null,
"depth": 0.0,
"activate_payload": false,
"send_environmental_data": false
},
{
"action": "dive",
"flight_style": "dive to depth",
"latitude_waypoint": -3.237143188645706,
"longitude_waypoint": 52.37072283932642,
"altitude": 10,
"depth": null,
"activate_payload": false,
"send_environmental_data": false
},
{
"action": "scanline",
"flight_style": "go to waypoint",
"latitude_waypoint": -0.237143188645706,
"longitude_waypoint": 60.00000000000000,
"altitude": 10,
"depth": null,
"activate_payload": true,
"send_environmental_data": false
},
{
"action": "climb",
"flight_style": "go to surface",
"latitude_waypoint": -0.237143188645706,
"longitude_waypoint": 52.37072283932642,
"altitude": null,
"depth": 0,
"activate_payload": false,
"send_environmental_data": true
}
]
}
\ No newline at end of file
{
"message_ID": "b427003c-7bc8-11ed-a1eb-0242ac120002",
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "ecosub_c2",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"type": "platform_status",
"payload": {
"platform_serial":"ecosub-3",
"points_of_interest": [],
"region_surveyed": [],
"quality_of_points": 0.98,
"additional_data": {
"sensor_x": false
"message_type": "observation",
"platform_ID": 3,
"points_of_interest": [
{
"latitude": 178.2,
"longitude": -10.122,
"quality_of_point": 0.98
},
{
"latitude": 50.1382,
"longitude": -11.122,
"quality_of_point": 0.50
}
}
],
"region_surveyed": ""
}
\ No newline at end of file
{
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hermes",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"message_type": "platform_status",
"platform_ID": 1,
"platform_timestamp": "2022-12-21T00:00:00Z",
"status_source": "usbl",
"latitude": 178.2,
"longitude": -10.122,
"depth": 50,
"altitude": 20
}
{
"message_ID": "b427003c-7bc8-11ed-a1eb-0242ac120002",
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 1,
"source": "hermes_ecosub",
"version": 2,
"source": "ecosub_c2",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"type": "platform_status",
"payload": {
"platform_ID": 2,
"active": true,
"platform_state": "IDLE",
"autonomy_plan_ID": 1,
"mission_track_ID": 4,
"mission_action_ID": 1,
"range_to_go": 12.3,
"speed_over_ground": 10.3,
"water_current_velocity": 10.3,
"thrust_applied": 0.3,
"health_status": "Warning",
"gps_data": [
{
"gps_source": "internal",
"latitude_type": "",
"longitude_type": "",
"latitude": -7.432,
"longitude": 50.365,
"depth": 5.0,
"altitude": 20.0
}
],
"localisation_error": null,
"usbl_fix_seconds_ago": null,
"battery_remaining_capacity": 80,
"sensor_config": {
"sensor_ID": 22,
"serial": "sidescan-2x",
"sensor_status": true,
"additional_data": {
"whiskers_on": true
}
}
}
}
\ No newline at end of file
"message_type": "platform_status",
"platform_ID": 1,
"platform_timestamp": "2022-12-21T00:00:00Z",
"status_source": "onboard_platform",
"autonomy_engine_plan_ID": 1,
"battery_remaining_capacity": 80.2,
"active": true,
"platform_state": "ABORT",
"mission_action_ID": 1,
"mission_track_ID": 4,
"latitude": 178.2,
"longitude": -10.122,
"depth": 50,
"altitude": 20,
"health_status": "Warning",
"localisation_error": null,
"usbl_fix_seconds_ago": null,
"range_to_go": 124.3,
"sensor_config": {
"sensor_ID": 22,
"serial": "sidescan-2x",
"sensor_on": true,
"additional_data": {
"whiskers_on": true
}
},
"current_pitch": -4,
"speed_over_ground": 4.3,
"thrust_applied": 124.3,
"water_current_velocity": 124.3
}
{
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "ah1",
"version": 1,
"source": "hydrosurv_adapter",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"message_type": "platform_status",
"acknowledged_message_ID": "02125022255-7bc8-11ed-a1eb-0242ac999999",
"status": "executed by platform"
"message_type": "acknowledgement",
"acknowledged_message_ID": "11111111-7bc8-11ed-a1eb-0242ac999999",
"status": "Approved and sent to platform"
}
\ No newline at end of file
{
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "hydrosurv_adapter",
"delivery_type": "publish",
"encoded": false,
"message_type": "mission_plan",
"plan_ID": 1,
"plan": [
{
"action": "move",
"flight_style": "orbit",
"activate_payload": true,
"altitude": 15,
"depth": 15,
"latitude_waypoint": -4.187143188645706,
"longitude_waypoint": 50.37072283932642,
"send_environmental_data": false
}
],
"platform_serial": "reav-60"
}
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "hydrosurv_adapter",
"delivery_type": "publish",
"encoded": false,
"message_type": "mission_plan",
"platform_serial": "reav-60",
"autonomy_engine_plan_ID": 1,
"plan": [
{
"latitude_waypoint": -4.187143188645706,
"longitude_waypoint": 50.37072283932642
},
{
"latitude_waypoint": -3.187143188645706,
"longitude_waypoint": 51.37072283932642
},
{
"latitude_waypoint": -3.237143188645706,
"longitude_waypoint": 52.37072283932642
}
]
}
\ No newline at end of file
{
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hydrosurv_adapter",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"message_type": "platform_status",
"active": true,
"autonomy_plan_ID": 1,
"battery_remaining_capacity": 80.2,
"gps_data": [
{
"altitude": 20,
"depth": 50,
"gps_source": "internal",
"latitude": 178.2,
"latitude_type": "string",
"longitude": -10.122,
"longitude_type": "string"
}
],
"health_status": "Warning",
"localisation_error": null,
"mission_action_ID": 1,
"mission_track_ID": 4,
"platform_ID": 1,
"platform_state": "ABORT",
"platform_timestamp": "2022-12-21T00:00:00Z",
"range_to_go": 124.3,
"sensor_config": {
"additional_data": {},
"sensor_serial": null,
"sensor_status": null
},
"speed_over_ground": 124.3,
"thrust_applied": 124.3,
"usbl_fix_seconds_ago": null,
"water_current_velocity": 124.3
}
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hydrosurv_adapter",
"destination": "autonomy_engine",
"delivery_type": "publish",
"encoded": false,
"message_type": "platform_status",
"autonomy_engine_plan_ID": 1,
"active": true,
"status_source": "onboard_platform",
"battery_remaining_capacity": 80.2,
"health_status": "Lost Connection",
"latitude": 178.2,
"longitude": -10.122,
"mission_action_ID": 1,
"mission_track_ID": 4,
"platform_ID": 1,
"platform_state": "ABORT",
"platform_timestamp": "2022-12-21T00:00:00Z",
"speed_over_ground": 4.5,
"range_to_go": null,
"thrust_applied": null
}
\ No newline at end of file
......@@ -14,9 +14,9 @@ acknowledgement_schema = {
},
"status": {
"type": "string",
"description": "Highest level of acknowledgement. I.e. `c2_received`:"
+ " Received by C2, `c2_sent`: Sent from C2->Platform, `executed`:"
+ " Executed by platform",
"description": "Highest level of acknowledgement. I.e."
+ " `c2_received`: Received by C2, `c2_sent`: Sent from"
+ " C2->Platform, `executed`: Executed by platform",
"example": "executed by platform",
},
},
......@@ -39,9 +39,9 @@ acknowledgement_schema = {
# ),
# "status": fields.String(
# required=True,
# description="Highest level of acknowledgement. I.e. `c2_received`:"
# + " Received by C2, `c2_sent`: Sent from C2->Platform, `executed`:"
# + " Executed by platform",
# description="Highest level of acknowledgement. "
# + " I.e. `c2_received`: Received by C2, `c2_sent`:"
# + " Sent from C2->Platform, `executed`: Executed by platform",
# ),
# },
# )
"""
schemas: Message Wrapper is used to wrap all message types that contain
details of where the message is coming from, which end client is its destination
and the type of message.
details of where the message is coming from, which end client is its
destination and the type of message.
"""
message_wrapper_schema = {
......@@ -12,7 +12,7 @@ message_wrapper_schema = {
"properties": {
"message_ID": {
"type": "string",
"description": "An identifier for the type of " + "message received.",
"description": "An identifier for the type of message received.",
"example": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
},
"timestamp": {
......@@ -27,7 +27,7 @@ message_wrapper_schema = {
},
"version": {
"type": "string",
"description": "Version of comms bacbone messaging format protocol",
"description": "Version of comms bacbone message format protocol",
"example": 2.0,
},
"source": {
......@@ -37,7 +37,8 @@ message_wrapper_schema = {
},
"destination": {
"type": "string",
"description": "Publisher topic; What is the destination of this message",
"description": "Publisher topic; What is the destination"
+ " of this message",
"example": "ah1",
},
"encoded": {
......
"""
schemas: Mission plan (un-complied) geenrated by the Autonomy Engine
schemas: Mission plan (un-compiled) geenrated by the Autonomy Engine
sent to the respective platform's C2 to compile into a platform-specific
mission plan.
"""
......@@ -49,13 +49,12 @@ action_schema = {
},
"send_environmental_data": {
"type": "boolean",
"description": "To trigger the platform to send list of observations"
+ " if any found",
"description": "To trigger the platform to send list of"
+ " observations if any found",
"example": False,
},
},
"required": [
"action",
"latitude_waypoint",
"longitude_waypoint",
],
......@@ -65,7 +64,7 @@ mission_plan_schema = {
"allOf": [{"$ref": "#/components/schemas/Message"}],
"type": "object",
"properties": {
"plan_ID": {"type": "integer"},
"autonomy_engine_plan_ID": {"type": "integer"},
"platform_serial": {"type": "string"},
"plan": {
"type": "array",
......@@ -118,8 +117,8 @@ mission_plan_schema = {
# ),
# "send_environmental_data": fields.Boolean(
# required=False,
# description="To trigger the platform to send list of observations"
# + " if any found",
# description="To trigger the platform to send list of"
# + " observations if any found",
# example=False,
# ),
# },
......@@ -146,8 +145,9 @@ mission_plan_schema = {
# "plan": fields.List(
# fields.Nested(action_schema),
# required=True,
# description="Sequence of actions/instructions generated by the "
# + " Autonomy Engine that should be compiled by the respective C2.",
# description="Sequence of actions/instructions generated by the"
# + " Autonomy Engine that should be compiled by the",
# + " respective C2.",
# ),
# },
# )
"""
schema: Observation Message sent by platforms when points of interest are found.
schema: Observation Message sent by platforms when points of
interest are found.
"""
# from . import full_message_schema, api
# from flask_restx import fields
hits_schema = {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"description": "Identified x-coordinate of point of interest",
"example": 178.2,
},
"longitude": {
"type": "number",
"description": "Identified y-coordinate of point of interest",
"example": -10.122,
},
"quality_of_point": {
"type": "number",
"description": "Quality/strength of points from features of"
+ " interest identified by platform. TODO: DEFINE FORMAT.",
"example": 0.98,
},
},
"required": [],
}
observation_schema = {
"allOf": [{"$ref": "#/components/schemas/Message"}],
"type": "object",
"properties": {
"platform_serial": {
"description": "Serial of platform to sendign observations",
"platform_ID": {
"type": "integer",
"description": "ID of platform to sending observations",
"example": "ecosub-3",
},
# "observation_type" ==> payloads tied to different types maybe?
# properties of each observation?
"points_of_interest": {
"type": "array",
"items": hits_schema,
"description": "Points from features of interest identified by"
+ " platform if any found. DEFINE FORMAT.",
"example": "",
},
"region_surveyed": {
"description": "Region surveyed by given platform. DEFINE FORMAT."
+ " GEOJSON?",
+ " GEOJSON",
"example": "",
},
"quality_of_points": {
"description": "Quality/strength of points from features of interest"
+ " identified by platform. DEFINE FORMAT.",
"example": 0.98,
},
"additional_data": {
"description": "Placeholder field for any additional data",
"example": {"sensor_payload": False},
......@@ -66,8 +87,8 @@ observation_schema = {
# ),
# "quality_of_points": fields.Float(
# required=False,
# description="Quality/strength of points from features of interest"
# + " identified by platform. DEFINE FORMAT.",
# description="Quality/strength of points from features of"
# + " interest identified by platform. DEFINE FORMAT.",
# example=0.98,
# ),
# "additional_data": fields.Raw(
......
......@@ -5,29 +5,41 @@
# from . import api, full_message_schema, platform_schema
# from flask_restx import fields
constraints_schema = {
emergency_schema = {
"type": "object",
"properties": {
"min_altitude": {
"safe_command": {
"type": "string",
"enum": ["go_home", "abort_now", "stop_mission"],
"description": "Command/Action that is native to respective partner's platform/C2",
"example": "go_home",
},
"latitude_waypoint": {
"type": "number",
"description": "Minimum altitude set for squad.",
"example": 15.2,
"description": "X-coordinate of safe place for respective platform",
"example": -7.432,
},
"min_velocity": {
"longitude_waypoint": {
"type": "number",
"description": "Minimum velocity set for squad.",
"example": 0.1,
"description": "Y-coordinate of safe place for respective platform",
"example": 50.365,
},
"max_velocity": {
"target_depth": {
"type": "number",
"description": "Maximum altitude set for squad.",
"example": 0.9,
"description": "Z-coordinate of safe place for respective platform"
+ " . If platform to NOT stay at depth, key in `0.0`",
"example": 10,
},
"additional_data": {
"type": "null",
"description": "Any addition fields/data to be added here",
"example": {},
},
},
"required": ["min_altitude", "min_velocity", "max_velocity"],
"required": ["latitude_waypoint", "longitude_waypoint", "target_depth"],
}
platform_schema = {
"type": "object",
"properties": {
......@@ -45,9 +57,29 @@ platform_schema = {
"type": "string",
"example": "reav",
},
"constraints": constraints_schema,
"emergency": emergency_schema,
"min_altitude": {
"type": "number",
"description": "Minimum altitude set for squad.",
"example": 15.2,
},
"min_velocity": {
"type": "number",
"description": "Minimum velocity set for squad.",
"example": 0.1,
},
"max_velocity": {
"type": "number",
"description": "Maximum altitude set for squad.",
"example": 0.9,
},
"additional_data": {
"type": "null",
"description": "Any addition fields/data to be added here",
"example": {"swath_width": 10.0, "scan_type": "DVL"},
},
},
"required": ["platform_ID", "serial", "model", "constraints"],
"required": ["platform_ID", "serial", "model", "emergency", "min_altitude", "min_velocity", "max_velocity"],
}
region_schema = {
......@@ -100,11 +132,6 @@ squad_metadata_schema = {
"example": False,
},
"region_of_interest": region_schema,
"exclusion_zones": {
"type": "array",
"items": region_schema,
"description": "Exclusion zones per squad.",
},
},
"required": [
"squad_ID",
......@@ -120,18 +147,27 @@ planning_configuration_schema = {
"allOf": [{"$ref": "#/components/schemas/Message"}],
"type": "object",
"properties": {
"config_ID": {
"planning_config_ID": {
"type": "integer",
"description": "Unique identifier tagged to version of this"
+ " configuration plan",
"example": 3,
},
"exclusion_zones": {
"type": "array",
"items": region_schema,
"description": "Exclusion zones for all platforms",
},
"squads": {
"type": "array",
"items": squad_metadata_schema,
},
},
"required": ["config_ID", "squads"],
"required": [
"config_ID",
"squads",
"exclusion_zones",
],
}
# region_schema = api.model(
......@@ -139,8 +175,8 @@ planning_configuration_schema = {
# {
# "region": fields.Raw(
# required=True,
# description="Using GEOJSON, exact region of interest in rectangle"
# + " format polygon",
# description="Using GEOJSON, exact region of "
# + "interest in rectangle format polygon",
# example={
# "type": "FeatureCollection",
# "features": [
......
"""
schema: platform-specific decoded status message
"""
# from . import full_message_schema, api
# from flask_restx import fields
gps_schema = {
"type": "object",
"properties": {
"gps_source": {
"type": "string",
"description": "Source of gps position. E.g. USBL (external),"
+ "platform itself (internal)",
"example": "internal",
},
"latitude_type": {
"type": "string",
"description": "TODO: Add description",
},
"longitude_type": {
"type": "string",
"description": "TODO: Add description",
},
"latitude": {
"type": "number",
"description": "Latitude in decimal degrees.",
"example": 178.2,
},
"longitude": {
"type": "number",
"description": "Longitude in decimal degrees.",
"example": -10.122,
},
"depth": {
"type": "number",
"description": "Target depth in metres",
"example": 50,
"default": 0,
},
"altitude": {
"type": "number",
"description": "Target altitude in metres",
"example": 20,
},
},
"required": [
"gps_source",
"latitude",
"longitude",
],
}
sensor_schema = {
"type": "object",
"description": "Scanning sensor on platform available to be controlled by the Autonomy Engine",
"description": "Scanning sensor on platform available"
+ " to be controlled by the Autonomy Engine",
"properties": {
"sensor_serial": {
"type": "string",
"description": "serial number of sensor",
"example": "mbes-002a",
},
"sensor_status": {
"sensor_on": {
"type": "boolean",
"description": "Sensor switched on (True) or off (False)",
"example": True,
......@@ -83,6 +34,13 @@ platform_status_message_schema = {
"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",
},
"platform_timestamp": {
"type": "date-time",
"decription": "Timestamp for onboard platform status message",
......@@ -101,12 +59,33 @@ platform_status_message_schema = {
+ "STOP, IDLE, ABORT.",
"example": "ABORT",
},
"autonomy_plan_ID": {
"autonomy_engine_plan_ID": {
"type": "integer",
"description": "Last mission plan ID (according to Autonomy Engine's"
+ " mission plan number) executed by platform",
"description": "Last mission plan ID (according to Autonomy"
+ " Engine's mission plan number sent) executed by platform",
"example": 1,
},
"latitude": {
"type": "number",
"description": "Latitude in decimal degrees.",
"example": 178.2,
},
"longitude": {
"type": "number",
"description": "Longitude in decimal degrees.",
"example": -10.122,
},
"depth": {
"type": "number",
"description": "Target depth in metres",
"example": 50,
"default": 0,
},
"altitude": {
"type": "number",
"description": "Target altitude in metres",
"example": 20,
},
"mission_track_ID": {
"type": "integer",
"description": "Track number - stage in mission (e.g. "
......@@ -144,11 +123,6 @@ platform_status_message_schema = {
+ "if any diagnosis is available to check sensors",
"example": "Warning",
},
"gps_data": {
"type": "array",
"description": "position of platform",
"items": gps_schema,
},
"localisation_error": {
"type": "number",
"description": "Localisation error at last USBL update.",
......@@ -161,16 +135,22 @@ platform_status_message_schema = {
},
"battery_remaining_capacity": {
"type": "number",
"description": "Battery remaining capacity % provided by respective",
"description": "Battery remaining % provided by respective C2",
"example": 80.2,
},
"current_pitch": {
"type": "number",
"description": "Current pitch of platform",
"example": -4.0,
},
"sensor_config": sensor_schema,
},
"required": [
"platform_ID",
"status_source",
"platform_timestamp",
"gps_data",
"battery_remaining_capacity",
"latitude",
"longitude",
],
}
......@@ -272,7 +252,8 @@ platform_status_message_schema = {
# ),
# "autonomy_plan_ID": fields.Integer(
# required=False,
# description="Last mission plan ID (according to Autonomy Engine's"
# description="Last mission plan ID (
# + "according to Autonomy Engine's"
# + " mission plan number) executed by platform",
# example=1,
# ),
......
......@@ -15,7 +15,7 @@ swagger_config = {
"headers": [],
"openapi": "3.0.2",
"swagger_ui": True,
"specs_route": "/soardocs/",
"specs_route": "/",
"info": {
"title": "Backbone Message Formats",
"version": "0.1",
......@@ -90,7 +90,7 @@ swagger_config = {
"consumes": ["application/json"],
}
message_types = [
"Message",
# "Message",
"Acknowledgement",
"MissionPlan",
"Observation",
......
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