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

Merge branch '31-update-planning-config' into 'dev'

refactor: planning configuration file

Closes #31

See merge request !22
......@@ -16,8 +16,8 @@
"plan": [
{
"action": "safety_abort",
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706
}
]
}
......
......@@ -16,14 +16,14 @@
"plan": [
{
"action": "move",
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706,
"depth": 5.0
},
{
"action": "safety_abort",
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706
}
]
}
......
......@@ -15,40 +15,40 @@
"plan": [
{
"action": "move",
"start_point_latitude": -3.007143188645706,
"start_point_longitude": 50.37072283932642,
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"start_point_latitude": 50.37072283932642,
"start_point_longitude": -3.007143188645706,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706,
"depth": 0.0,
"activate_payload": false,
"timeout": 200
},
{
"action": "dive",
"start_point_latitude": -3.237143188645706,
"start_point_longitude": 52.37072283932642,
"target_waypoint_latitude": -3.337143188645706,
"target_waypoint_longitude": 56.37072283932642,
"start_point_latitude": 52.37072283932642,
"start_point_longitude": -3.237143188645706,
"target_waypoint_latitude": 56.37072283932642,
"target_waypoint_longitude": -3.337143188645706,
"altitude": 10,
"activate_payload": false,
"timeout": 200
},
{
"action": "scanline",
"start_point_latitude": -3.337143188645706,
"start_point_longitude": 56.37072283932642,
"target_waypoint_latitude": -0.237143188645706,
"target_waypoint_longitude": 60.00000000000000,
"start_point_latitude": 56.37072283932642,
"start_point_longitude": -3.337143188645706,
"target_waypoint_latitude": 60.00000000000000,
"target_waypoint_longitude": -0.237143188645706,
"altitude": 10,
"activate_payload": true,
"timeout": 200
},
{
"action": "climb",
"start_point_latitude": -0.237143188645706,
"start_point_longitude": 60.00000000000000,
"target_waypoint_latitude": -0.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"start_point_latitude": 60.00000000000000,
"start_point_longitude": -0.237143188645706,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -0.237143188645706,
"depth": 0.0,
"activate_payload": false,
"timeout": 200
......
......@@ -15,40 +15,40 @@
"plan": [
{
"action": "move",
"start_point_latitude": -3.007143188645706,
"start_point_longitude": 50.37072283932642,
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"start_point_latitude": 50.37072283932642,
"start_point_longitude": -3.007143188645706,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706,
"depth": 0.0,
"activate_payload": false,
"timeout": 300
},
{
"action": "dive",
"start_point_latitude": -3.237143188645706,
"start_point_longitude": 52.37072283932642,
"target_waypoint_latitude": -3.337143188645706,
"target_waypoint_longitude": 56.37072283932642,
"start_point_latitude": 52.37072283932642,
"start_point_longitude": -3.237143188645706,
"target_waypoint_latitude": 56.37072283932642,
"target_waypoint_longitude": -3.337143188645706,
"altitude": 10,
"activate_payload": false,
"timeout": 300
},
{
"action": "scanline",
"start_point_latitude": -3.337143188645706,
"start_point_longitude": 56.37072283932642,
"target_waypoint_latitude": -0.237143188645706,
"target_waypoint_longitude": 60.00000000000000,
"start_point_latitude": 56.37072283932642,
"start_point_longitude": -3.337143188645706,
"target_waypoint_latitude": 60.00000000000000,
"target_waypoint_longitude": -0.237143188645706,
"altitude": 10,
"activate_payload": true,
"timeout": 300
},
{
"action": "climb",
"start_point_latitude": -0.237143188645706,
"start_point_longitude": 60.00000000000000,
"target_waypoint_latitude": -0.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"start_point_latitude": 60.00000000000000,
"start_point_longitude": -0.237143188645706,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -0.237143188645706,
"depth": 0.0,
"activate_payload": false,
"timeout": 300
......
......@@ -14,16 +14,16 @@
"autonomy_engine_plan_ID": 1,
"plan": [
{
"target_waypoint_latitude": -4.187143188645706,
"target_waypoint_longitude": 50.37072283932642
"target_waypoint_latitude": 50.37072283932642,
"target_waypoint_longitude": -4.187143188645706
},
{
"target_waypoint_latitude": -3.187143188645706,
"target_waypoint_longitude": 51.37072283932642
"target_waypoint_latitude": 51.37072283932642,
"target_waypoint_longitude": -3.187143188645706
},
{
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706
}
]
}
......
......@@ -16,111 +16,192 @@
"geometry_coordinates": [
[
[
-4.187143188645706,
50.37072283932642
-4.1777839187560915,
50.34173405662855
],
[
-4.202697005964865,
50.368816892405874
-4.1777839187560915,
50.33820949229701
],
[
-4.203156724702808,
50.365640144076906
-4.143667777943875,
50.33820949229701
],
[
-4.19449868846155,
50.362267670845654
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
]
}
],
"region_of_interest": [
{
"geometry_coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
]
}
],
"squads": [
{
"squad_ID": 1,
"no_of_platforms": 1,
"squad_mission_type": "tracking",
"squad_state": "active",
"platforms": [
{
"operator": "hydrosurv",
"model": "reav",
"platform_ID": "reav-60-1",
"emergency": {
"additional_data": {},
"target_waypoint_latitude": -7.432,
"target_waypoint_longitude": 50.365,
"target_waypoint_latitude": 50.33611100020795,
"target_waypoint_longitude": -4.189772466767039,
"safe_command": "go_home",
"target_depth": 10.0
},
"min_altitude": 0.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"target_altitude": 0.0,
"additional_data": {}
}
],
"region_of_interest": {
"geometry_coordinates": [
[
[
-4.187143188645706,
50.37072283932642
],
[
-4.202697005964865,
50.368816892405874
],
[
-4.203156724702808,
50.365640144076906
],
[
-4.19449868846155,
50.362267670845654
]
]
]
}
]
},
{
"squad_ID": 2,
"no_of_platforms": 3,
"no_of_platforms": 4,
"squad_mission_type": "survey",
"squad_state": "active",
"platforms": [
{
"operator": "planet-ocean",
"platform_ID": "ecosub-1",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"additional_data": {},
"target_waypoint_latitude": -7.432,
"target_waypoint_longitude": 50.365,
"target_waypoint_latitude": 50.32933594228737,
"target_waypoint_longitude": -4.192219151149999,
"safe_command": "go_home",
"target_depth": 10.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"scan_type": "DVL",
"swath_width": 10
"new_sensor_a": "test_sensor",
"range": 10.0
}
},
{
"operator": "planet-ocean",
"platform_ID": "ecosub-2",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"additional_data": {},
"target_waypoint_latitude": -0.432,
"target_waypoint_longitude": 20.365,
"target_waypoint_latitude": 50.32775207068519,
"target_waypoint_longitude": -4.192219151149999,
"safe_command": "go_home",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"scan_type": "DVL",
"swath_width": 10
"new_sensor_a": "test_sensor",
"range": 10.0
}
},
{
"operator": "planet-ocean",
"platform_ID": "ecosub-3",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"target_waypoint_latitude": 50.326744124905844,
"target_waypoint_longitude": -4.184550412882118,
"safe_command": "go_home",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"new_sensor_a": "test_sensor",
"range": 10.0
}
},
{
"operator": "planet-ocean",
"platform_ID": "ecosub-4",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"target_waypoint_latitude": 50.32616814629094,
"target_waypoint_longitude": -4.188610333142037,
"safe_command": "go_home",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"new_sensor_a": "test_sensor",
"range": 10.0
}
}
]
......@@ -129,23 +210,32 @@
"squad_ID": 3,
"no_of_platforms": 1,
"squad_mission_type": "inspection",
"squad_state": "active",
"platforms": [
{
"operator": "noc",
"platform_ID": "ah-1",
"model": "autosub",
"beacon_ID":2407,
"emergency": {
"additional_data": {},
"target_waypoint_latitude": 20.432,
"target_waypoint_longitude": 50.365,
"target_waypoint_latitude": 50.3342284629413,
"target_waypoint_longitude": -4.19759350502369,
"safe_command": "abort_now",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"scan_type": "MBES"
"new_sensor_a": "test_sensor",
"range": 10.0
}
}
]
......
......@@ -15,40 +15,40 @@
"plan": [
{
"action": "move",
"start_point_latitude": -3.007143188645706,
"start_point_longitude": 50.37072283932642,
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"start_point_latitude": 50.37072283932642,
"start_point_longitude": -3.007143188645706,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706,
"depth": 0.0,
"activate_payload": false,
"timeout": 300
},
{
"action": "dive",
"start_point_latitude": -3.237143188645706,
"start_point_longitude": 52.37072283932642,
"target_waypoint_latitude": -3.337143188645706,
"target_waypoint_longitude": 56.37072283932642,
"start_point_latitude": 52.37072283932642,
"start_point_longitude": -3.237143188645706,
"target_waypoint_latitude": 56.37072283932642,
"target_waypoint_longitude": -3.337143188645706,
"altitude": 10,
"activate_payload": false,
"timeout": 300
},
{
"action": "scanline",
"start_point_latitude": -3.337143188645706,
"start_point_longitude": 56.37072283932642,
"target_waypoint_latitude": -0.237143188645706,
"target_waypoint_longitude": 60.00000000000000,
"start_point_latitude": 56.37072283932642,
"start_point_longitude": -3.337143188645706,
"target_waypoint_latitude": 60.00000000000000,
"target_waypoint_longitude": -0.237143188645706,
"altitude": 10,
"activate_payload": true,
"timeout": 300
},
{
"action": "climb",
"start_point_latitude": -0.237143188645706,
"start_point_longitude": 60.00000000000000,
"target_waypoint_latitude": -0.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"start_point_latitude": 60.00000000000000,
"start_point_longitude": -0.237143188645706,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -0.237143188645706,
"depth": 0.0,
"activate_payload": false,
"timeout": 300
......
......@@ -16,8 +16,8 @@
"plan": [
{
"action": "safety_abort",
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706
}
]
}
......
......@@ -16,14 +16,14 @@
"plan": [
{
"action": "move",
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642,
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706,
"depth": 5.0
},
{
"action": "safety_abort",
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706
}
]
}
......
......@@ -16,108 +16,192 @@
"geometry_coordinates": [
[
[
-4.187143188645706,
50.37072283932642
-4.1777839187560915,
50.34173405662855
],
[
-4.202697005964865,
50.368816892405874
-4.1777839187560915,
50.33820949229701
],
[
-4.203156724702808,
50.365640144076906
-4.143667777943875,
50.33820949229701
],
[
-4.19449868846155,
50.362267670845654
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
]
}
],
"region_of_interest": [
{
"geometry_coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
]
}
],
"squads": [
{
"squad_ID": 1,
"no_of_platforms": 1,
"squad_mission_type": "tracking",
"squad_state": "active",
"platforms": [
{
"operator": "hydrosurv",
"model": "reav",
"platform_ID": "reav-60-1",
"emergency": {
"target_waypoint_latitude": -7.432,
"target_waypoint_longitude": 50.365,
"target_waypoint_latitude": 50.33611100020795,
"target_waypoint_longitude": -4.189772466767039,
"safe_command": "go_home",
"target_depth": 10.0
},
"min_altitude": 0.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1
"min_velocity": 0.1,
"target_altitude": 0.0,
"additional_data": {}
}
],
"region_of_interest": {
"geometry_coordinates": [
[
[
-4.187143188645706,
50.37072283932642
],
[
-4.202697005964865,
50.368816892405874
],
[
-4.203156724702808,
50.365640144076906
],
[
-4.19449868846155,
50.362267670845654
]
]
]
}
]
},
{
"squad_ID": 2,
"no_of_platforms": 3,
"no_of_platforms": 4,
"squad_mission_type": "survey",
"squad_state": "active",
"platforms": [
{
"platform_ID": "ecosub-2",
"operator": "planet-ocean",
"platform_ID": "ecosub-1",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"target_waypoint_latitude": -7.432,
"target_waypoint_longitude": 50.365,
"target_waypoint_latitude": 50.32933594228737,
"target_waypoint_longitude": -4.192219151149999,
"safe_command": "go_home",
"target_depth": 10.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"new_sensor_a": "test_sensor",
"range": 10.0
}
},
{
"operator": "planet-ocean",
"platform_ID": "ecosub-2",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"target_waypoint_latitude": 50.32775207068519,
"target_waypoint_longitude": -4.192219151149999,
"safe_command": "go_home",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"new_sensor_a": "test_sensor",
"range": 10.0
}
},
{
"operator": "planet-ocean",
"platform_ID": "ecosub-3",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"target_waypoint_latitude": 50.326744124905844,
"target_waypoint_longitude": -4.184550412882118,
"safe_command": "go_home",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"scan_type": "DVL",
"swath_width": 10
"new_sensor_a": "test_sensor",
"range": 10.0
}
},
{
"platform_ID": "ecosub-5",
"operator": "planet-ocean",
"platform_ID": "ecosub-4",
"model": "ecosub",
"beacon_ID": 10021,
"emergency": {
"additional_data": {},
"target_waypoint_latitude": -0.432,
"target_waypoint_longitude": 20.365,
"target_waypoint_latitude": 50.32616814629094,
"target_waypoint_longitude": -4.188610333142037,
"safe_command": "go_home",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"scan_type": "DVL",
"swath_width": 10
"new_sensor_a": "test_sensor",
"range": 10.0
}
}
]
......@@ -126,23 +210,32 @@
"squad_ID": 3,
"no_of_platforms": 1,
"squad_mission_type": "inspection",
"squad_state": "active",
"platforms": [
{
"platform_ID": "139-ah-1",
"operator": "noc",
"platform_ID": "ah-1",
"model": "autosub",
"beacon_ID":2407,
"emergency": {
"additional_data": {},
"target_waypoint_latitude": 20.432,
"target_waypoint_longitude": 50.365,
"target_waypoint_latitude": 50.3342284629413,
"target_waypoint_longitude": -4.19759350502369,
"safe_command": "abort_now",
"target_depth": 0.0
},
"min_altitude": 5.0,
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"target_altitude": 15.0,
"turning_radius": 1.5,
"scan_sensor": {
"sensor_type": "SIDESCAN",
"swath_width": 38.0,
"frequency": 700.0,
"angle": 110.0
},
"additional_data": {
"scan_type": "MBES"
"new_sensor_a": "test_sensor",
"range": 10.0
}
}
]
......
......@@ -14,16 +14,16 @@
"autonomy_engine_plan_ID": 1,
"plan": [
{
"target_waypoint_latitude": -4.187143188645706,
"target_waypoint_longitude": 50.37072283932642
"target_waypoint_latitude": 50.37072283932642,
"target_waypoint_longitude": -4.187143188645706
},
{
"target_waypoint_latitude": -3.187143188645706,
"target_waypoint_longitude": 51.37072283932642
"target_waypoint_latitude": 51.37072283932642,
"target_waypoint_longitude": -3.187143188645706
},
{
"target_waypoint_latitude": -3.237143188645706,
"target_waypoint_longitude": 52.37072283932642
"target_waypoint_latitude": 52.37072283932642,
"target_waypoint_longitude": -3.237143188645706
}
]
}
......
......@@ -16,26 +16,26 @@ action_schema = {
"start_point_latitude": {
"type": "number",
"format": "float",
"description": "Start point, x-coordinate",
"example": -4.187143188645706,
"description": "Start point, y-coordinate",
"example": 50.37072283932642,
},
"start_point_longitude": {
"type": "number",
"format": "float",
"description": "Start point, y-coordinate",
"example": 50.37072283932642,
"description": "Start point, x-coordinate",
"example": -4.187143188645706,
},
"target_waypoint_latitude": {
"type": "number",
"format": "float",
"description": "Target waypoint, x-coordinate",
"example": -4.187143188645706,
"description": "Target waypoint, y-coordinate",
"example": 50.37072283932642,
},
"target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "Target waypoint, y-coordinate",
"example": 50.37072283932642,
"description": "Target waypoint, x-coordinate",
"example": -4.187143188645706,
},
"altitude": {
"type": "number",
......
from formats.encoded import encoded_schema
from copy import deepcopy
mission_plan_encoded_schema = encoded_schema
mission_plan_encoded_schema = deepcopy(encoded_schema)
mission_plan_encoded_schema["properties"]["message_type"]["enum"] = [
"mission_plan_encoded"
......
......@@ -9,13 +9,13 @@ hits_schema = {
"latitude": {
"type": "number",
"format": "float",
"description": "Identified x-coordinate of point of interest",
"description": "Identified y-coordinate of point of interest",
"example": 178.2,
},
"longitude": {
"type": "number",
"format": "float",
"description": "Identified y-coordinate of point of interest",
"description": "Identified x-coordinate of point of interest",
"example": -10.122,
},
"quality_of_point": {
......
from formats.encoded import encoded_schema
from copy import deepcopy
observation_encoded_schema = encoded_schema
observation_encoded_schema = deepcopy(encoded_schema)
observation_encoded_schema["properties"]["message_type"]["enum"] = [
"observation_encoded"
......
......@@ -16,14 +16,14 @@ emergency_schema = {
"target_waypoint_latitude": {
"type": "number",
"format": "float",
"description": "X-coordinate safe place for respective platform",
"example": -7.432,
"description": "Y-coordinate safe place for respective platform",
"example": 50.365,
},
"target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "Y-coordinate safe place for respective platform",
"example": 50.365,
"description": "X-coordinate safe place for respective platform",
"example": -7.432,
},
"target_depth": {
"type": "number",
......@@ -32,11 +32,6 @@ emergency_schema = {
+ " . If platform to NOT stay at depth, key in `0.0`",
"example": 10.0,
},
"additional_data": {
"type": "object",
"description": "Any addition fields/data to be added here",
"example": {},
},
},
"required": [
"target_waypoint_latitude",
......@@ -46,9 +41,46 @@ emergency_schema = {
}
scan_sensor_schema = {
"type": "object",
"properties": {
"sensor_type": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "MBES",
"enum": ["SIDESCAN", "MBES"],
},
"swath_width": {
"type": "number",
"format": "float",
"description": "Function of `target_altitude` for the platform's "
+ "swath width (in metres)",
"example": 38.0,
},
"frequency": {
"type": "number",
"format": "float",
"description": "Frequency of scanning sensor (in kHz)",
"example": 700.0,
},
"angle": {
"type": "number",
"format": "float",
"description": "Angle of range of swath width (in degrees)",
"example": 140.0,
},
},
}
platform_schema = {
"type": "object",
"properties": {
"operator": {
"type": "string",
"description": "Operator of platform",
"example": "noc",
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
......@@ -58,32 +90,52 @@ platform_schema = {
"type": "string",
"example": "reav",
},
"beacon_ID": {
"type": "number",
"description": "Unique identifier (number) for the beacon "
+ "associated to this platform",
"example": 2407,
},
"emergency": emergency_schema,
"min_altitude": {
"type": "number",
"format": "float",
"description": "Minimum altitude set for squad.",
"description": "Minimum altitude set for platform",
"example": 15.2,
},
"min_velocity": {
"type": "number",
"format": "float",
"description": "Minimum velocity set for squad.",
"description": "Minimum velocity set for platform",
"example": 0.1,
},
"max_velocity": {
"type": "number",
"format": "float",
"description": "Maximum altitude set for squad.",
"description": "Maximum velocity set for platform",
"example": 0.9,
},
"target_altitude": {
"type": "number",
"format": "float",
"description": "Target altitude set for platform. This affects swath width",
"example": 15.0,
},
"turning_radius": {
"type": "number",
"format": "float",
"description": "Turning radius of platform (in metres)",
"example": 1.0,
},
"scan_sensor": scan_sensor_schema,
"additional_data": {
"description": "Any addition fields/data to be added here",
"example": {"swath_width": 10.0, "scan_type": "DVL"},
"example": {"new_sensor_a": "test_sensor", "range": 10.0},
"type": "object",
},
},
"required": [
"operator",
"platform_ID",
"model",
"emergency",
......@@ -97,18 +149,19 @@ region_schema = {
"type": "object",
"properties": {
"geometry_coordinates": {
"type": "array", # TODO: Check if config defn is right.
"type": "array",
"example": [
[
[-4.187143188645706, 50.37072283932642],
[-4.202697005964865, 50.368816892405874],
[-4.203156724702808, 50.365640144076906],
[-4.19449868846155, 50.362267670845654],
[-4.1777839187560915, 50.34173405662855],
[-4.1777839187560915, 50.33820949229701],
[-4.143667777943875, 50.33820949229701],
[-4.143667777943875, 50.34173405662855],
[-4.1777839187560915, 50.34173405662855],
]
],
},
},
"description": "Using GEOJSON, exact 4-point region (rectangle shaped)",
"description": "Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)",
}
squad_metadata_schema = {
......@@ -136,19 +189,12 @@ squad_metadata_schema = {
+ ", `inspection`",
"example": "survey",
},
"squad_state": {
"type": "string",
"description": "In execution, Waiting.. <define further>",
"example": False,
},
"region_of_interest": region_schema,
},
"required": [
"squad_ID",
"no_of_platforms",
"platforms",
"squad_mission_type",
"squad_state",
],
}
......@@ -167,6 +213,11 @@ planning_configuration_schema = {
+ " configuration plan",
"example": 3,
},
"region_of_interest": {
"type": "array",
"items": region_schema,
"description": "Region of interest for the entire operation",
},
"exclusion_zones": {
"type": "array",
"items": region_schema,
......@@ -182,5 +233,6 @@ planning_configuration_schema = {
"planning_config_ID",
"squads",
"exclusion_zones",
"region_of_interest",
],
}
......@@ -75,13 +75,13 @@ platform_status_schema = {
"latitude": {
"type": "number",
"format": "float",
"description": "Latitude in decimal degrees.",
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
},
"longitude": {
"type": "number",
"format": "float",
"description": "Longitude in decimal degrees.",
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
},
"depth": {
......
from formats.encoded import encoded_schema
from copy import deepcopy
platform_status_encoded_schema = encoded_schema
platform_status_encoded_schema = deepcopy(encoded_schema)
platform_status_encoded_schema["properties"]["message_type"]["enum"] = [
"platform_status_encoded"
......
......@@ -107,6 +107,12 @@
"example":3,
"type":"integer"
},
"emergency":{
"default":false,
"description":"To indicate if this is an emergency. true = emergency and false = no emergency",
"example":false,
"type":"boolean"
},
"message_type":{
"description":"Type of message",
"enum":[
......@@ -115,12 +121,6 @@
"example":"mission_plan",
"type":"string"
},
"emergency": {
"default": false,
"description": "To indicate if this is an emergency. true = emergency and false = no emergency",
"example": false,
"type": "boolean"
},
"plan":{
"items":{
"properties":{
......@@ -383,26 +383,30 @@
"exclusion_zones":{
"description":"Exclusion zones for all platforms",
"items":{
"description":"Using GEOJSON, exact 4-point region (rectangle shaped)",
"description":"Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)",
"properties":{
"geometry_coordinates":{
"example":[
[
[
-4.187143188645706,
50.37072283932642
-4.1777839187560915,
50.34173405662855
],
[
-4.202697005964865,
50.368816892405874
-4.1777839187560915,
50.33820949229701
],
[
-4.203156724702808,
50.365640144076906
-4.143667777943875,
50.33820949229701
],
[
-4.19449868846155,
50.362267670845654
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
],
......@@ -426,6 +430,43 @@
"example":3,
"type":"integer"
},
"region_of_interest":{
"description":"Region of interest for the entire operation",
"items":{
"description":"Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)",
"properties":{
"geometry_coordinates":{
"example":[
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
],
"type":"array"
}
},
"type":"object"
},
"type":"array"
},
"squads":{
"items":{
"properties":{
......@@ -441,20 +482,18 @@
"additional_data":{
"description":"Any addition fields/data to be added here",
"example":{
"scan_type":"DVL",
"swath_width":10.0
"new_sensor_a":"test_sensor",
"range":10.0
},
"type":"object"
},
"beacon_ID":{
"description":"Unique identifier (number) for the beacon associated to this platform",
"example":9407,
"type":"number"
},
"emergency":{
"properties":{
"additional_data":{
"type": "object",
"description":"Any addition fields/data to be added here",
"example":{
}
},
"safe_command":{
"description":"Command/Action that is native to respective partner's platform/C2",
"enum":[
......@@ -492,19 +531,19 @@
"type":"object"
},
"max_velocity":{
"description":"Maximum altitude set for squad.",
"description":"Maximum velocity set for platform",
"example":0.9,
"format":"float",
"type":"number"
},
"min_altitude":{
"description":"Minimum altitude set for squad.",
"description":"Minimum altitude set for platform",
"example":15.2,
"format":"float",
"type":"number"
},
"min_velocity":{
"description":"Minimum velocity set for squad.",
"description":"Minimum velocity set for platform",
"example":0.1,
"format":"float",
"type":"number"
......@@ -513,13 +552,63 @@
"example":"reav",
"type":"string"
},
"operator":{
"description":"Operator of platform",
"example":"noc",
"type":"string"
},
"platform_ID":{
"description":"Unique identifier for this platform",
"example":"reav-x-1",
"type":"string"
},
"scan_sensor":{
"properties":{
"angle":{
"description":"Angle of range of swath width (in degrees)",
"example":140.0,
"format":"float",
"type":"number"
},
"frequency":{
"description":"Frequency of scanning sensor (in kHz)",
"example":700.0,
"format":"float",
"type":"number"
},
"sensor_type":{
"description":"Unique identifier for this platform",
"enum":[
"SIDESCAN",
"MBES"
],
"example":"MBES",
"type":"string"
},
"swath_width":{
"description":"Function of `target_altitude` for the platform's swath width (in metres)",
"example":38.0,
"format":"float",
"type":"number"
}
},
"type":"object"
},
"target_altitude":{
"description":"Target altitude set for platform. This affects swath width",
"example":15.0,
"format":"float",
"type":"number"
},
"turning_radius":{
"description":"Turning radius of platform (in metres)",
"example":1.0,
"format":"float",
"type":"number"
}
},
"required":[
"operator",
"platform_ID",
"model",
"emergency",
......@@ -531,35 +620,6 @@
},
"type":"array"
},
"region_of_interest":{
"description":"Using GEOJSON, exact 4-point region (rectangle shaped)",
"properties":{
"geometry_coordinates":{
"example":[
[
[
-4.187143188645706,
50.37072283932642
],
[
-4.202697005964865,
50.368816892405874
],
[
-4.203156724702808,
50.365640144076906
],
[
-4.19449868846155,
50.362267670845654
]
]
],
"type":"array"
}
},
"type":"object"
},
"squad_ID":{
"description":"Identifier of given squad",
"example":23,
......@@ -574,19 +634,13 @@
],
"example":"survey",
"type":"string"
},
"squad_state":{
"description":"In execution, Waiting.. <define further>",
"example":false,
"type":"string"
}
},
"required":[
"squad_ID",
"no_of_platforms",
"platforms",
"squad_mission_type",
"squad_state"
"squad_mission_type"
],
"type":"object"
},
......@@ -597,7 +651,8 @@
"message_type",
"planning_config_ID",
"squads",
"exclusion_zones"
"exclusion_zones",
"region_of_interest"
],
"type":"object"
},
......@@ -830,4 +885,4 @@
"paths":{
}
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -259,13 +259,13 @@ emergency_schema = {
"type": "number",
"format": "float",
"description": "X-coordinate safe place for respective platform",
"example": -7.432,
"example": 50.365,
},
"target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "Y-coordinate safe place for respective platform",
"example": 50.365,
"example": -7.432,
},
"target_depth": {
"type": "number",
......@@ -315,7 +315,7 @@ platform_schema = {
"max_velocity": {
"type": "number",
"format": "float",
"description": "Maximum altitude set for squad.",
"description": "Maximum velocity set for squad.",
"example": 0.9,
},
"additional_data": {
......
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