mission_plan.py 3.19 KB
Newer Older
1
"""
2
    schemas: Mission plan (un-compiled) generated by the Autonomy Engine
3 4
    sent to the respective platform's C2 to compile into a platform-specific
    mission plan.
5 6
"""

7 8 9 10 11 12
action_schema = {
    "type": "object",
    "properties": {
        "action": {
            "type": "string",
            "description": "Autonomy Engine's action from `move`, `payload`,"
13
            + " `dive`, `send_hits`, `scanline`, `scanpoint`.",
14 15 16 17 18
            "example": "move",
        },
        "flight_style": {
            "type": "string",
            "description": "Platform-specific modes/flight styles to perform"
19
            + " next action",
20 21
            "example": "orbit",
        },
22
        "start_point_latitude": {
23
            "type": "number",
24
            "format": "float",
25
            "description": "Start point, x-coordinate",
26 27
            "example": -4.187143188645706,
        },
28
        "start_point_longitude": {
29
            "type": "number",
30
            "format": "float",
31 32 33 34 35 36 37 38 39 40 41 42 43
            "description": "Start point, y-coordinate",
            "example": 50.37072283932642,
        },
        "target_waypoint_latitude": {
            "type": "number",
            "format": "float",
            "description": "Target waypoint, x-coordinate",
            "example": -4.187143188645706,
        },
        "target_waypoint_longitude": {
            "type": "number",
            "format": "float",
            "description": "Target waypoint, y-coordinate",
44 45 46 47
            "example": 50.37072283932642,
        },
        "altitude": {
            "type": "number",
48
            "format": "float",
49 50 51 52 53
            "description": "Altitude of next action",
            "example": 15.0,
        },
        "depth": {
            "type": "number",
54
            "format": "float",
55 56 57 58 59 60
            "description": "Depth of next action",
            "example": 15.0,
        },
        "activate_payload": {
            "type": "boolean",
            "description": "To activate/deactivate sensor for Autosub "
61
            + "Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
62 63 64 65
            "example": True,
        },
        "send_environmental_data": {
            "type": "boolean",
66 67
            "description": "To trigger the platform to send list of"
            + "  observations if any found",
68 69
            "example": False,
        },
70
    },
71
    "required": [
72 73
        "target_waypoint_latitude",
        "target_waypoint_longitude",
74 75
    ],
}
76

77 78 79
mission_plan_schema = {
    "type": "object",
    "properties": {
80 81 82 83 84
        "message_type": {
            "type": "string",
            "description": "Type of message",
            "example": "mission_plan",
        },
85 86 87 88 89 90 91
        "autonomy_engine_plan_ID": {
            "type": "integer",
            "description": "Unique identifier for this plan"
            + "generated by the Autonomy Engine",
            "example": 3,
        },
        "platform_ID": {
92
            "type": "string",
93
            "description": "Unique identifier for this platform",
94
            "example": "reav-x-1",
95
        },
96 97 98 99
        "plan": {
            "type": "array",
            "items": action_schema,
        },
100
    },
Trishna Saeharaseelan's avatar
Trishna Saeharaseelan committed
101 102 103 104 105 106
    "required": [
        "message_type",
        "autonomy_engine_plan_ID",
        "platform_ID",
        "plan",
    ],
107
}