JaiaBot 1.10.0+14+g8dbf2589
JaiaBot micro-AUV software
 
Loading...
Searching...
No Matches
jaia_dccl.proto
Go to the documentation of this file.
1syntax = "proto2";
2
3import "dccl/option_extensions.proto";
4import "jaiabot/messages/mission.proto";
5import "jaiabot/messages/geographic_coordinate.proto";
6import "jaiabot/messages/high_control.proto";
7import "goby/middleware/protobuf/coroner.proto";
8import "jaiabot/messages/health.proto";
9import "jaiabot/messages/imu.proto";
10
11package jaiabot.protobuf;
12
13message Command
14{
15 /*
16 Actual maximum size of message: 179 bytes / 1432 bits
17 dccl.id head...........................8
18 user head..............................0
19 body................................1423
20 padding to full byte...................1
21 Allowed maximum size of message: 250 bytes / 2000 bits
22 */
23 option (dccl.msg) = {
24 id: 80
25 max_bytes: 250
26 codec_version: 4
27 unit_system: "si"
28 };
29
30 required uint32 bot_id = 1 [(dccl.field) = { min: 0 max: 255 }];
31 required uint64 time = 2 [(dccl.field) = {
32 codec: "dccl.time2"
33 units { prefix: "micro" derived_dimensions: "time" }
34 precision: -6 // second precision
35 }];
36
37 enum CommandType
38 {
39 // pre mission
40 MISSION_PLAN = 1;
41 ACTIVATE = 2;
42 START_MISSION = 3;
43 MISSION_PLAN_FRAGMENT = 4;
44
45 // during any mission
46 NEXT_TASK = 10;
47 RETURN_TO_HOME = 11;
48 STOP = 12;
49 PAUSE = 13;
50 RESUME = 14;
51
52 // during remote control mission
53 REMOTE_CONTROL_SETPOINT = 20;
54 REMOTE_CONTROL_TASK = 21;
55 REMOTE_CONTROL_RESUME_MOVEMENT = 22;
56
57 // post mission
58 RECOVERED = 30;
59 SHUTDOWN = 31;
60 RETRY_DATA_OFFLOAD = 32;
61 DATA_OFFLOAD_COMPLETE = 33;
62 DATA_OFFLOAD_FAILED = 34;
63
64 // debugging low level commands
65 RESTART_ALL_SERVICES = 40;
66 REBOOT_COMPUTER = 41;
67 SHUTDOWN_COMPUTER = 42;
68 }
69
70 required CommandType type = 10;
71
72 oneof command_data
73 {
74 // required for type == MISSION_PLAN
75 MissionPlan plan = 20;
76
77 // required for type == REMOTE_CONTROL_SETPOINT
78 RemoteControl rc = 30;
79
80 // required for type == REMOTE_CONTROL_TASK
81 MissionTask rc_task = 31;
82 }
83}
84
85message CommandForHub
86{
87 option (dccl.msg) = {
88 unit_system: "si"
89 };
90
91 required uint32 hub_id = 1;
92 required uint64 time = 2 [
93 (dccl.field) = { units { prefix: "micro" derived_dimensions: "time" } }
94 ];
95
96 enum HubCommandType
97 {
98 SCAN_FOR_BOTS = 5;
99
100 // debugging low level commands
101 RESTART_ALL_SERVICES = 40;
102 REBOOT_COMPUTER = 41;
103 SHUTDOWN_COMPUTER = 42;
104 }
105
106 required HubCommandType type = 10;
107 optional uint32 scan_for_bot_id = 11;
108}
109
110message BotStatus
111{
112 /*
113 Actual maximum size of message: 53 bytes / 424 bits
114 dccl.id head...........................8
115 user head..............................0
116 body.................................415
117 padding to full byte...................1
118 Allowed maximum size of message: 250 bytes / 2000 bits
119 */
120 option (dccl.msg) = {
121 id: 81
122 max_bytes: 250
123 codec_version: 4
124 unit_system: "si"
125 };
126
127 required uint32 bot_id = 1 [(dccl.field) = { min: 0 max: 255 }];
128 required uint64 time = 2 [(dccl.field) = {
129 codec: "dccl.time2"
130 units { prefix: "micro" derived_dimensions: "time" }
131 }];
132 optional uint64 last_command_time = 3 [(dccl.field) = {
133 codec: "dccl.time2"
134 units { prefix: "micro" derived_dimensions: "time" }
135 }];
136
137 optional goby.middleware.protobuf.HealthState health_state = 4;
138 repeated Error error = 5 [(dccl.field).max_repeat = 5];
139 repeated Warning warning = 6 [(dccl.field).max_repeat = 5];
140 enum BotType
141 {
142 HYDRO = 1;
143 ECHO = 2;
144 }
145 optional BotType bot_type = 7;
146
147 optional GeographicCoordinate location = 10;
148
149 optional double depth = 11 [(dccl.field) = {
150 min: -1
151 max: 100
152 precision: 1
153 units: { derived_dimensions: "length" }
154 }];
155
156 message Attitude
157 {
158 optional double roll = 1 [(dccl.field) = {
159 min: -180
160 max: 180
161 precision: 0
162 units { derived_dimensions: "plane_angle" system: "angle::degree" }
163 }];
164 optional double pitch = 2 [(dccl.field) = {
165 min: -180
166 max: 180
167 precision: 0
168 units { derived_dimensions: "plane_angle" system: "angle::degree" }
169 }];
170 optional double heading = 3 [(dccl.field) = {
171 min: 0
172 max: 360
173 precision: 0
174 units { derived_dimensions: "plane_angle" system: "angle::degree" }
175 }];
176 optional double course_over_ground = 4 [(dccl.field) = {
177 min: 0
178 max: 360
179 precision: 0
180 units { derived_dimensions: "plane_angle" system: "angle::degree" }
181 }];
182 }
183 optional Attitude attitude = 20;
184
185 message Speed
186 {
187 optional double over_ground = 1 [(dccl.field) = {
188 min: -5
189 max: 10
190 precision: 1
191 units { derived_dimensions: "velocity" }
192 }];
193 optional double over_water = 2 [(dccl.field) = {
194 min: -5
195 max: 10
196 precision: 1
197 units { derived_dimensions: "velocity" }
198 }];
199 }
200 optional Speed speed = 30;
201
202 optional MissionState mission_state = 40;
203
204 // bounds should match MissionPlan.goal max_repeat value *
205 // expected_fragments max
206 optional int32 active_goal = 41 [(dccl.field) = { min: 0 max: 29 }];
207 optional double distance_to_active_goal = 42 [(dccl.field) = {
208 min: 0
209 max: 1000
210 precision: 1
211 units: { derived_dimensions: "length" }
212 }];
213 optional uint32 active_goal_timeout = 43 [(dccl.field) = {
214 min: 0
215 max: 3600
216 precision: 0
217 units { base_dimensions: "T" }
218 }];
219 optional int32 repeat_index = 44
220 [(dccl.field) = { min: 0 max: 1000 precision: 0 }];
221
222 optional double salinity = 51
223 [(dccl.field) = { min: 0 max: 100 precision: 1 }];
224
225 optional double temperature = 52 [(dccl.field) = {
226 min: -50
227 max: 100
228 precision: 2
229 units { derived_dimensions: "temperature" system: "celsius" }
230 }];
231
232 optional double thermocouple_temperature = 53 [(dccl.field) = {
233 min: -50
234 max: 100
235 precision: 2
236 units { derived_dimensions: "temperature" system: "celsius" }
237 }];
238
239 optional double vv_current = 54 [(dccl.field) = {
240 min: -5
241 max: 1000
242 precision: 2
243 units { derived_dimensions: "current" }
244 }];
245
246 optional double vcc_current = 55 [(dccl.field) = {
247 min: -5
248 max: 1000
249 precision: 2
250 units { derived_dimensions: "current" }
251 }];
252
253 optional double vcc_voltage = 56 [(dccl.field) = {
254 min: 0
255 max: 25
256 precision: 2
257 units { derived_dimensions: "electric_potential" system: "si" }
258 }];
259
260 optional double battery_percent = 57
261 [(dccl.field) = { min: 0 max: 100 precision: 0 }];
262
263 optional int32 calibration_status = 58 [(dccl.field) = { min: 0 max: 3 }];
264
265 optional IMUCalibrationState calibration_state = 59;
266
267 optional double hdop = 60 [(dccl.field) = { min: 0 max: 100 precision: 2 }];
268
269 optional double pdop = 61 [(dccl.field) = { min: 0 max: 100 precision: 2 }];
270
271 optional int32 wifi_link_quality_percentage = 62
272 [(dccl.field) = { min: 0 max: 100 precision: 0 }];
273}
274
275message DriftPacket
276{
277 option (dccl.msg) = {
278 unit_system: "si"
279 };
280
281 optional int32 drift_duration = 1 [
282 default = 0,
283 (dccl.field) = {
284 min: 0
285 max: 3600
286 precision: -1
287 units { base_dimensions: "T" }
288 }
289 ];
290
291 message EstimatedDrift
292 {
293 required double speed = 1 [(dccl.field) = {
294 min: 0
295 max: 10
296 precision: 1
297 units { derived_dimensions: "velocity" }
298 }];
299
300 optional double heading = 3 [(dccl.field) = {
301 min: 0
302 max: 360
303 precision: 0
304 units { derived_dimensions: "plane_angle" system: "angle::degree" }
305 }];
306 }
307
308 // should correspond to ocean current velocity
309 optional EstimatedDrift estimated_drift = 10;
310
311 // location C
312 optional GeographicCoordinate start_location = 11;
313 // location D
314 optional GeographicCoordinate end_location = 12;
315
316 // Significant wave height is defined as the average wave height,
317 // from trough to crest, of the highest one-third of the waves
318 optional double significant_wave_height = 13 [(dccl.field) = {
319 min: 0
320 max: 50
321 precision: 3
322 units: { derived_dimensions: "length" }
323 }];
324}
325
326message DivePacket
327{
328 option (dccl.msg) = {
329 unit_system: "si"
330 };
331
332 required double dive_rate = 10 [(dccl.field) = {
333 min: 0
334 max: 10
335 precision: 1
336 units { derived_dimensions: "velocity" }
337 }];
338
339 optional double unpowered_rise_rate = 11 [(dccl.field) = {
340 min: 0
341 max: 10
342 precision: 1
343 units { derived_dimensions: "velocity" }
344 }];
345
346 optional double powered_rise_rate = 12 [(dccl.field) = {
347 min: 0
348 max: 10
349 precision: 1
350 units { derived_dimensions: "velocity" }
351 }];
352
353 required double depth_achieved = 13 [(dccl.field) = {
354 min: 0
355 max: 100
356 precision: 1
357 units: { derived_dimensions: "length" }
358 }];
359
360 message Measurements
361 {
362 optional double mean_depth = 1 [(dccl.field) = {
363 min: 0
364 max: 100
365 precision: 1
366 units: { derived_dimensions: "length" }
367 }];
368
369 optional double mean_temperature = 2 [(dccl.field) = {
370 min: -1
371 max: 50
372 precision: 1
373 units { derived_dimensions: "temperature" system: "celsius" }
374 }];
375
376 optional double mean_salinity = 3
377 [(dccl.field) = { min: 0 max: 45 precision: 1 }];
378 }
379
380 repeated Measurements measurement = 14 [(dccl.field) = { max_repeat: 50 }];
381
382 // location A
383 optional GeographicCoordinate start_location = 15;
384
385 optional double duration_to_acquire_gps = 16 [(dccl.field) = {
386 min: 0
387 max: 120
388 precision: 1
389 units { base_dimensions: "T" }
390 }];
391
392 // Did we reach seafloor?
393 optional bool bottom_dive = 17 [default = false];
394
395 // Did we reach min depth?
396 optional bool reached_min_depth = 18 [default = false];
397
398 // If we reached bottom, what was the bottom type
399 enum BottomType
400 {
401 HARD = 1;
402 SOFT = 2;
403 }
404
405 optional BottomType bottom_type = 19;
406
407 // For bottom characterization
408 optional double max_acceleration = 20 [(dccl.field) = {
409 min: 0
410 max: 100
411 precision: 1
412 units { derived_dimensions: "acceleration" }
413 }];
414}
415
416message TaskPacket
417{
418 /*
419 Actual maximum size of message: 218 bytes / 1744 bits
420 dccl.id head..........................16
421 user head..............................0
422 body................................1728
423 padding to full byte...................0
424 Allowed maximum size of message: 250 bytes / 2000 bits
425 */
426 option (dccl.msg) = {
427 id: 0x5001
428 max_bytes: 250
429 codec_version: 4
430 unit_system: "si"
431 };
432
433 required uint32 bot_id = 1 [(dccl.field) = { min: 0 max: 255 }];
434 required uint64 start_time = 2 [(dccl.field) = {
435 codec: "dccl.time2"
436 units { prefix: "micro" derived_dimensions: "time" }
437 }];
438 required uint64 end_time = 3 [(dccl.field) = {
439 codec: "dccl.time2"
440 units { prefix: "micro" derived_dimensions: "time" }
441 }];
442 required MissionTask.TaskType type = 4;
443
444 optional DivePacket dive = 10;
445 optional DriftPacket drift = 11;
446}