JaiaBot 3.0.0
JaiaBot micro-AUV software
Loading...
Searching...
No Matches
storm.proto
Go to the documentation of this file.
1syntax = "proto2";
2
3import "dccl/option_extensions.proto";
4
5import "jaiabot/messages/mission.proto";
6
7package jaiabot.protobuf;
8
9enum StormMissionState
10{
11 STARTING_UP = 0;
12 ACTIVATING = 1;
13 MISSION_RUNNING = 2;
14
15 SELF_TEST__IN_WATER_DETECTION = 100;
16 SELF_TEST__LAUNCH_TUBE_DETECTION = 101;
17 SELF_TEST__LAUNCH_TUBE_RECOVERY = 102;
18 SELF_TEST__PARACHUTE_ATTACHMENT_DETECTION = 103;
19 SELF_TEST__PARACHUTE_ATTACHMENT_RECOVERY = 104;
20 SELF_TEST__AIR_DESCENT_DATA_OFFLOAD = 105;
21 SELF_TEST__WRAPUP = 106;
22
23 MISSION_PLANNING__WAIT_FOR_MISSION_MANAGER = 200;
24 MISSION_PLANNING__WAIT_FOR_REMOTE_MISSION = 201;
25 MISSION_PLANNING__SEND_MISSION = 202;
26
27 SLEEP_PREP__DATA_OFFLOAD = 300;
28 SLEEP_PREP__WRAPUP = 301;
29}
30
31message StormMission
32{
33 option (dccl.msg) = {
34 unit_system: "si"
35 };
36
37 required MissionTask.DiveParameters dive = 10;
38
39 required uint32 sleep_for_minutes = 20 [(dccl.field) = {
40 min: 0
41 max: 10080 // week
42 units { unit: "metric::minute" }
43 }];
44
45 optional uint32 min_battery_percentage = 30
46 [default = 10, (dccl.field) = { min: 0 max: 99 }];
47
48 // maximum number of un-offloaded datasets to store before a low battery
49 // cancels the dive
50 optional uint32 max_stored_datasets = 31
51 [default = 2, (dccl.field) = { min: 0 max: 100 }];
52
53 optional uint32 surface_drift_time = 32
54 [default = 30, (dccl.field) = { min: 0 max: 3600 units { base_dimensions: "T" } }];
55
56 optional uint32 remote_mission_wait_minutes = 40 [
57 default = 0,
58 (dccl.field) = {
59 min: 0
60 max: 60
61 units { unit: "metric::minute" }
62 }
63 ];
64
65 // timeout for the SLEEP_PREP__DATA_OFFLOAD state (Iridium TaskPacket send)
66 optional uint32 data_offload_timeout_minutes = 50 [
67 default = 60,
68 (dccl.field) = {
69 min: 0
70 max: 600
71 units { unit: "metric::minute" }
72 }
73 ];
74
75 // timeout for the SELF_TEST__AIR_DESCENT_DATA_OFFLOAD state (local MCU
76 // serial link) - kept separate from data_offload_timeout_minutes since
77 // that satellite link timeout can be much longer than is reasonable to
78 // wait on the local, fast, serial MCU connection.
79 optional uint32 air_descent_data_offload_timeout_minutes = 51 [
80 default = 1,
81 (dccl.field) = {
82 min: 0
83 max: 600
84 units { unit: "metric::minute" }
85 }
86 ];
87
88 message Threshold
89 {
90 enum Stat
91 {
92 MEAN = 1;
93 MEDIAN = 2;
94 STDDEV = 3;
95 }
96
97 enum Condition
98 {
99 IGNORE = 0;
100 GREATER_THAN = 1;
101 LESS_THAN = 2;
102 }
103
104 message Check
105 {
106 optional Condition condition = 1 [default = IGNORE];
107 optional Stat stat = 2 [default = MEAN];
108
109 oneof value
110 {
111 double conductivity = 10
112 [(dccl.field) = { min: 0 max: 60000 precision: -1 }];
113 // REQUIRES DCCL 4.3.1 - uncomment when we wrap this in
114 // [(dccl.field) = {
115 // units {
116 // custom {
117 // unit: "jaiabot::units::microsiemens_per_cm_unit"
118 // header: "jaiabot/units/conductivity.h"
119 // }
120 // }
121 // }];
122 double pressure = 11 [(dccl.field) = {
123 min: -10
124 max: 100
125 precision: 1
126 units { prefix: "deci" unit: "metric::bar" }
127 }];
128
129 double gps_altitude = 12 [(dccl.field) = {
130 min: -10
131 max: 1000
132 precision: -1
133 units { derived_dimensions: "length" }
134 }];
135 }
136
137 optional double hold_time = 3 [
138 default = 0,
139 (dccl.field) = {
140 min: 0
141 max: 600
142 precision: 0
143 units { derived_dimensions: "time" }
144 }
145 ];
146 }
147 repeated Check check = 1 [(dccl.field).max_repeat = 5];
148 }
149
150 message InWaterDetectionParams
151 {
152 required Threshold threshold = 1;
153 }
154 optional InWaterDetectionParams in_water =
155 60; // required for initial mission, unused for updates
156
157 message LaunchTubeDetectionParams
158 {
159 required Threshold cleared_threshold = 1;
160 required Threshold stuck_threshold = 2;
161
162 message Action
163 {
164 required int32 thrust_percentage = 1
165 [(dccl.field) = { min: -100 max: 100 }];
166
167 required uint32 thrust_duration = 2 [
168 default = 5,
169 (dccl.field) = {
170 min: 0
171 max: 60
172 units { base_dimensions: "T" }
173 }
174 ];
175 optional uint32 count = 3
176 [default = 1, (dccl.field) = { min: 1 max: 10 }];
177 }
178
179 repeated Action recovery_action = 3 [(dccl.field) = { max_repeat: 10 }];
180 }
181 optional LaunchTubeDetectionParams launch_tube =
182 61; // required for initial mission, unused for updates
183
184 message ParachuteAttachmentDetectionParams
185 {
186 required Threshold cleared_threshold = 1;
187 required Threshold entangled_threshold = 2;
188
189 message Action
190 {
191 required int32 thrust_percentage = 1
192 [(dccl.field) = { min: -100 max: 100 }];
193
194 required uint32 thrust_duration = 2 [
195 default = 5,
196 (dccl.field) = {
197 min: 0
198 max: 60
199 units { base_dimensions: "T" }
200 }
201 ];
202 optional uint32 count = 3
203 [default = 1, (dccl.field) = { min: 1 max: 10 }];
204 }
205
206 repeated Action recovery_action = 3 [(dccl.field) = { max_repeat: 10 }];
207 }
208
209 optional ParachuteAttachmentDetectionParams parachute =
210 62; // required for initial mission, unused for updates
211}
212
213message StormMissionUpdate
214{
215 enum UpdateType
216 {
217 UPDATE_MISSION = 1;
218
219 // TODO: Implement
220 ABORT = 2;
221 PAUSE = 3;
222 RESUME = 4;
223 DELAY = 5;
224 }
225 required UpdateType type = 1;
226
227 oneof update_data
228 {
229 // required when type == UPDATE_MISSION
230 StormMission new_mission = 10;
231
232 // required when type == DELAY
233 uint32 delay_for_minutes = 20 [(dccl.field) = {
234 min: 1
235 max: 1440 // day
236 units { unit: "metric::minute" }
237 }];
238 }
239}
240
241message StormMissionReport
242{
243 option (dccl.msg) = {
244 unit_system: "si"
245 };
246
247 required StormMissionState state = 10;
248}
249
250message StormMissionStateChange
251{
252 required StormMissionState state = 1;
253
254 enum Direction
255 {
256 ENTERED = 1;
257 EXITED = 2;
258 }
259
260 required Direction direction = 2;
261}
262
263// added to BotStatus
264message StormStatus
265{
266 option (dccl.msg) = {
267 unit_system: "si"
268 };
269
270 required StormMissionState mission_state = 10;
271}
272
273enum StormMissionSimulatorStage
274{
275 AIR_DESCENT = 1;
276 IN_WATER = 2;
277}