Commit 599713bd authored by Trishna Saeharaseelan's avatar Trishna Saeharaseelan
Browse files

refactor(survey): add 3 additional points

......@@ -69,11 +69,16 @@ eg
* `soar.*.*.*.to_platform.*` - all messages outbound to platforms (hermes)
* `soar.*.slocum.#` - all messages relating to a slocum platform type
## Run Docs
Run the command below and go to `http://127.0.0.1:5000`
## Run Docs & Save Schema When Updating Message Formats
1. Run the command below and go to `http://127.0.0.1:5000`
```
python3 generate_schema_config.py
```
2. Copy the schema generated `http://127.0.0.1:5000/soar_protocol.json` into the `backbone-message-format/project/<project_name>/swagger.json`
3. In the json copied, remove the key `"definitions"` from the schema and save this.
## Run Tests
Run both tests below:
1. Test 1
......
......@@ -15,6 +15,12 @@
"longitude_A": -10.122,
"latitude_B": 178.2,
"longitude_B": -10.122,
"latitude_C": 177.9,
"longitude_C": -10.122,
"latitude_D": 178.2,
"longitude_D": -11.122,
"latitude_E": 179.2,
"longitude_E": -11.122,
"platform_ID": "ecosub-2",
"track_ID": 12
}
......
{
"header": {
"message_ID": "e1237003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2023-03-16T00:00:00Z",
"version": 2,
"source": "ecosub.ecosub-c2",
"destination": "soar.planet-ocean.ecosub.ecosub-2.from_platform.survey",
"delivery_type": "publish",
"encoded": false
},
"payload": {
"message_type": "survey",
"timestamp": "2026-12-21T00:00:00Z",
"latitude_A": 188.1,
"longitude_A": -10.122,
"latitude_B": 178.2,
"longitude_B": -10.122,
"latitude_C": 177.9,
"longitude_C": -10.122,
"latitude_D": 178.2,
"longitude_D": -11.122,
"latitude_E": 179.2,
"longitude_E": -11.122,
"platform_ID": "ecosub-2",
"track_ID": 12
}
}
\ No newline at end of file
{
"header": {
"message_ID": "t1237003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2023-03-16T00:00:00Z",
"version": 2,
"source": "hermes.ecosub-2",
"destination": "soar.noc.autosub.alr-52.from_platform.survey_encoded",
"delivery_type": "publish",
"encoded": true
},
"payload": {
"message_type": "survey_encoded",
"data": "HWYFBAAD+zwBySUAAAADVek72v1N2lUAAAAA9P2cP166ab+9cg==",
"file_name": "ecosub2-survey-data_03837434286438.sbd",
"mime_type": "application/gzip",
"is_binary": true
}
}
\ No newline at end of file
......@@ -48,6 +48,60 @@ survey_schema = {
),
"example": -10.122,
},
"latitude_C": {
"type": "number",
"format": "float",
"description": (
"Latitude of point C(intersection of normal)"
+ "from waypoint C to survey line"
),
"example": 178.2,
},
"longitude_C": {
"type": "number",
"format": "float",
"description": (
"Longitude of point C(intersection of normal)"
+ "from waypoint C to survey line"
),
"example": -10.122,
},
"latitude_D": {
"type": "number",
"format": "float",
"description": (
"Latitude of point D(intersection of normal)"
+ "from waypoint D to survey line"
),
"example": 178.2,
},
"longitude_D": {
"type": "number",
"format": "float",
"description": (
"Longitude of point D(intersection of normal)"
+ "from waypoint D to survey line"
),
"example": -10.122,
},
"latitude_E": {
"type": "number",
"format": "float",
"description": (
"Latitude of point E(intersection of normal)"
+ "from waypoint E to survey line"
),
"example": 178.2,
},
"longitude_E": {
"type": "number",
"format": "float",
"description": (
"Longitude of point E(intersection of normal)"
+ "from waypoint E to survey line"
),
"example": -10.122,
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
......
......@@ -896,6 +896,24 @@
"format":"float",
"type":"number"
},
"latitude_C":{
"description":"Latitude of point C(intersection of normal)from waypoint C to survey line",
"example":178.2,
"format":"float",
"type":"number"
},
"latitude_D":{
"description":"Latitude of point D(intersection of normal)from waypoint D to survey line",
"example":178.2,
"format":"float",
"type":"number"
},
"latitude_E":{
"description":"Latitude of point E(intersection of normal)from waypoint E to survey line",
"example":178.2,
"format":"float",
"type":"number"
},
"longitude_A":{
"description":"Longitude of point A(intersection of normal)from waypoint A to survey line",
"example":-10.122,
......@@ -908,6 +926,24 @@
"format":"float",
"type":"number"
},
"longitude_C":{
"description":"Longitude of point C(intersection of normal)from waypoint C to survey line",
"example":-10.122,
"format":"float",
"type":"number"
},
"longitude_D":{
"description":"Longitude of point D(intersection of normal)from waypoint D to survey line",
"example":-10.122,
"format":"float",
"type":"number"
},
"longitude_E":{
"description":"Longitude of point E(intersection of normal)from waypoint E to survey line",
"example":-10.122,
"format":"float",
"type":"number"
},
"platform_ID":{
"description":"Unique identifier for this platform",
"example":"ecosub-2",
......
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