survey.py 3.79 KB
Newer Older
1 2 3 4 5 6 7 8
"""
    schema: Survey Message that is decoded sent by platforms
    to track progress
"""

survey_schema = {
    "type": "object",
    "properties": {
9 10 11 12 13 14
        "message_type": {
            "type": "string",
            "description": "Type of message",
            "example": "survey",
            "enum": ["survey"],
        },
15 16 17 18 19 20 21 22 23
        "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp for onboard message",
            "example": "2022-12-21T00:00:00Z",
        },
        "latitude_A": {
            "type": "number",
            "format": "float",
Trishna Saeharaseelan's avatar
Trishna Saeharaseelan committed
24 25 26 27
            "description": (
                "Latitude of point A(intersection of normal)"
                + "from waypoint A to survey line"
            ),
28 29 30 31 32
            "example": 178.2,
        },
        "longitude_A": {
            "type": "number",
            "format": "float",
Trishna Saeharaseelan's avatar
Trishna Saeharaseelan committed
33 34 35 36
            "description": (
                "Longitude of point A(intersection of normal)"
                + "from waypoint A to survey line"
            ),
37 38 39 40 41
            "example": -10.122,
        },
        "latitude_B": {
            "type": "number",
            "format": "float",
Trishna Saeharaseelan's avatar
Trishna Saeharaseelan committed
42 43 44 45
            "description": (
                "Latitude of point B(intersection of normal)"
                + "from waypoint B to survey line"
            ),
46 47 48 49 50
            "example": 178.2,
        },
        "longitude_B": {
            "type": "number",
            "format": "float",
Trishna Saeharaseelan's avatar
Trishna Saeharaseelan committed
51 52 53 54
            "description": (
                "Longitude of point B(intersection of normal)"
                + "from waypoint B to survey line"
            ),
55 56
            "example": -10.122,
        },
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
        "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,
        },
111 112 113 114
        "platform_ID": {
            "type": "string",
            "description": "Unique identifier for this platform",
            "example": "ecosub-2",
Trishna Saeharaseelan's avatar
Trishna Saeharaseelan committed
115
        },
116 117 118 119 120 121
        "track_ID": {
            "type": "integer",
            "description": "Track number of action(s) currently executed by platform",
            "example": 1,
        },
    },
Trishna Saeharaseelan's avatar
Trishna Saeharaseelan committed
122 123 124 125 126 127 128
    "required": [
        "latitude_A",
        "longitude_A",
        "latitude_B",
        "longitude_B",
        "platform_ID",
    ],
129
}