Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-message-format
Commits
04530bff
Verified
Commit
04530bff
authored
7 months ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
feat: allow position coordinates in either format
- either individual properties or geojson - add geojson test
parent
d1e33be0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
201 additions
and
147 deletions
+201
-147
examples/geojson/platform_status.json
examples/geojson/platform_status.json
+54
-0
formats/platform_status.py
formats/platform_status.py
+72
-72
project/soar/swagger.json
project/soar/swagger.json
+75
-75
No files found.
examples/geojson/platform_status.json
0 → 100644
View file @
04530bff
{
"header"
:{
"message_ID"
:
"b427003c-0000-11aa-a1eb-bvcdfghjgfdd"
,
"timestamp"
:
"2022-11-16T00:00:00Z"
,
"version"
:
2
,
"source"
:
"ecosub_c2"
,
"destination"
:
"soar.planet-ocean.ecosub.ecosub-2.from_platform.platform_status"
,
"delivery_type"
:
"publish"
,
"encoded"
:
false
},
"payload"
:{
"message_type"
:
"platform_status"
,
"platform_ID"
:
"ecosub-2"
,
"platform_timestamp"
:
"2022-12-21T00: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
]
},
"heading"
:
90.0
,
"health_status"
:
false
,
"localisation_north_error"
:
0
,
"localisation_east_error"
:
0
,
"usbl_fix_seconds_ago"
:
0
,
"range_to_go"
:
124.3
,
"sensor_config"
:
{
"sensor_serial"
:
"sidescan-2x"
,
"sensor_on"
:
true
,
"additional_data"
:
{
"whiskers_on"
:
true
}
},
"speed_over_ground"
:
4.3
,
"thrust_applied"
:
124.3
,
"water_current_velocity"
:
"124.3NE"
}
}
This diff is collapsed.
Click to expand it.
formats/platform_status.py
View file @
04530bff
...
...
@@ -171,82 +171,82 @@ platform_status_schema = {
"example"
:
7.4
,
},
"sensor_config"
:
sensor_schema
,
"oneOf"
:
[
{
"type"
:
"object"
,
"properties"
:
{
"position
"
:
{
"$ref"
:
"https://geojson.org/schema/Point.json"
,
}
,
"waypoint"
:
{
"$ref"
:
"https://geojson.org/schema/Point.json"
,
}
,
},
"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"
:
[
"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"
:
[
"latitude"
,
"longitude"
,
],
},
],
"required"
:
[
"message_type"
,
"platform_ID"
,
...
...
This diff is collapsed.
Click to expand it.
project/soar/swagger.json
View file @
04530bff
...
...
@@ -2010,6 +2010,81 @@
"type"
:
"object"
},
"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"
:
{
"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"
,
...
...
@@ -2087,81 +2162,6 @@
"example"
:
4
,
"type"
:
"integer"
},
"oneOf"
:
[
{
"properties"
:
{
"position"
:
{
"$ref"
:
"https://geojson.org/schema/Point.json"
},
"waypoint"
:
{
"$ref"
:
"https://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"
}
],
"platform_ID"
:
{
"description"
:
"Unique identifier for this platform"
,
"example"
:
"reav-x-1"
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment