@blueyerobotics/protocol-definitions 3.2.0-05fb7ac4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2559 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.7
5
+ // protoc v3.21.12
6
+ // source: mission_planning.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.MissionStatus = exports.ReferenceAutoPilot = exports.PathSegment = exports.SurveyCommand = exports.GoToHomeCommand = exports.GoToSeabedCommand = exports.GoToSurfaceCommand = exports.CameraCommand = exports.WaitForCommand = exports.TiltMultibeamCommand = exports.TiltMainCameraCommand = exports.DepthSetPointCommand = exports.WaypointCommand = exports.ControlModeCommand = exports.Waypoint = exports.DepthSetPoint = exports.Instruction = exports.Mission = exports.MissionState = exports.InstructionType = exports.CameraAction = exports.ControlModeHorizontal = exports.ControlModeVertical = exports.DepthZeroReference = void 0;
9
+ exports.depthZeroReferenceFromJSON = depthZeroReferenceFromJSON;
10
+ exports.depthZeroReferenceToJSON = depthZeroReferenceToJSON;
11
+ exports.controlModeVerticalFromJSON = controlModeVerticalFromJSON;
12
+ exports.controlModeVerticalToJSON = controlModeVerticalToJSON;
13
+ exports.controlModeHorizontalFromJSON = controlModeHorizontalFromJSON;
14
+ exports.controlModeHorizontalToJSON = controlModeHorizontalToJSON;
15
+ exports.cameraActionFromJSON = cameraActionFromJSON;
16
+ exports.cameraActionToJSON = cameraActionToJSON;
17
+ exports.instructionTypeFromJSON = instructionTypeFromJSON;
18
+ exports.instructionTypeToJSON = instructionTypeToJSON;
19
+ exports.missionStateFromJSON = missionStateFromJSON;
20
+ exports.missionStateToJSON = missionStateToJSON;
21
+ /* eslint-disable */
22
+ const wire_1 = require("@bufbuild/protobuf/wire");
23
+ const message_formats_1 = require("./message_formats");
24
+ /**
25
+ * Mission Planning Protocol.
26
+ *
27
+ * These messages are used to start a mission and to monitor the status of the mission.
28
+ */
29
+ /** Depth zero reference from surface for depth, and seabed for altitude. */
30
+ var DepthZeroReference;
31
+ (function (DepthZeroReference) {
32
+ DepthZeroReference[DepthZeroReference["DEPTH_ZERO_REFERENCE_UNSPECIFIED"] = 0] = "DEPTH_ZERO_REFERENCE_UNSPECIFIED";
33
+ DepthZeroReference[DepthZeroReference["DEPTH_ZERO_REFERENCE_SURFACE"] = 1] = "DEPTH_ZERO_REFERENCE_SURFACE";
34
+ DepthZeroReference[DepthZeroReference["DEPTH_ZERO_REFERENCE_SEABED"] = 2] = "DEPTH_ZERO_REFERENCE_SEABED";
35
+ DepthZeroReference[DepthZeroReference["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
36
+ })(DepthZeroReference || (exports.DepthZeroReference = DepthZeroReference = {}));
37
+ function depthZeroReferenceFromJSON(object) {
38
+ switch (object) {
39
+ case 0:
40
+ case "DEPTH_ZERO_REFERENCE_UNSPECIFIED":
41
+ return DepthZeroReference.DEPTH_ZERO_REFERENCE_UNSPECIFIED;
42
+ case 1:
43
+ case "DEPTH_ZERO_REFERENCE_SURFACE":
44
+ return DepthZeroReference.DEPTH_ZERO_REFERENCE_SURFACE;
45
+ case 2:
46
+ case "DEPTH_ZERO_REFERENCE_SEABED":
47
+ return DepthZeroReference.DEPTH_ZERO_REFERENCE_SEABED;
48
+ case -1:
49
+ case "UNRECOGNIZED":
50
+ default:
51
+ return DepthZeroReference.UNRECOGNIZED;
52
+ }
53
+ }
54
+ function depthZeroReferenceToJSON(object) {
55
+ switch (object) {
56
+ case DepthZeroReference.DEPTH_ZERO_REFERENCE_UNSPECIFIED:
57
+ return "DEPTH_ZERO_REFERENCE_UNSPECIFIED";
58
+ case DepthZeroReference.DEPTH_ZERO_REFERENCE_SURFACE:
59
+ return "DEPTH_ZERO_REFERENCE_SURFACE";
60
+ case DepthZeroReference.DEPTH_ZERO_REFERENCE_SEABED:
61
+ return "DEPTH_ZERO_REFERENCE_SEABED";
62
+ case DepthZeroReference.UNRECOGNIZED:
63
+ default:
64
+ return "UNRECOGNIZED";
65
+ }
66
+ }
67
+ /** Control mode for the vertical axis of the drone. */
68
+ var ControlModeVertical;
69
+ (function (ControlModeVertical) {
70
+ /** CONTROL_MODE_VERTICAL_UNSPECIFIED - Unspecified. */
71
+ ControlModeVertical[ControlModeVertical["CONTROL_MODE_VERTICAL_UNSPECIFIED"] = 0] = "CONTROL_MODE_VERTICAL_UNSPECIFIED";
72
+ /** CONTROL_MODE_VERTICAL_MANUAL - Manual control mode. */
73
+ ControlModeVertical[ControlModeVertical["CONTROL_MODE_VERTICAL_MANUAL"] = 1] = "CONTROL_MODE_VERTICAL_MANUAL";
74
+ /** CONTROL_MODE_VERTICAL_AUTO_DEPTH - Auto depth control mode. */
75
+ ControlModeVertical[ControlModeVertical["CONTROL_MODE_VERTICAL_AUTO_DEPTH"] = 2] = "CONTROL_MODE_VERTICAL_AUTO_DEPTH";
76
+ /** CONTROL_MODE_VERTICAL_AUTO_ALTITUDE - Auto altitude control mode. */
77
+ ControlModeVertical[ControlModeVertical["CONTROL_MODE_VERTICAL_AUTO_ALTITUDE"] = 3] = "CONTROL_MODE_VERTICAL_AUTO_ALTITUDE";
78
+ ControlModeVertical[ControlModeVertical["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
79
+ })(ControlModeVertical || (exports.ControlModeVertical = ControlModeVertical = {}));
80
+ function controlModeVerticalFromJSON(object) {
81
+ switch (object) {
82
+ case 0:
83
+ case "CONTROL_MODE_VERTICAL_UNSPECIFIED":
84
+ return ControlModeVertical.CONTROL_MODE_VERTICAL_UNSPECIFIED;
85
+ case 1:
86
+ case "CONTROL_MODE_VERTICAL_MANUAL":
87
+ return ControlModeVertical.CONTROL_MODE_VERTICAL_MANUAL;
88
+ case 2:
89
+ case "CONTROL_MODE_VERTICAL_AUTO_DEPTH":
90
+ return ControlModeVertical.CONTROL_MODE_VERTICAL_AUTO_DEPTH;
91
+ case 3:
92
+ case "CONTROL_MODE_VERTICAL_AUTO_ALTITUDE":
93
+ return ControlModeVertical.CONTROL_MODE_VERTICAL_AUTO_ALTITUDE;
94
+ case -1:
95
+ case "UNRECOGNIZED":
96
+ default:
97
+ return ControlModeVertical.UNRECOGNIZED;
98
+ }
99
+ }
100
+ function controlModeVerticalToJSON(object) {
101
+ switch (object) {
102
+ case ControlModeVertical.CONTROL_MODE_VERTICAL_UNSPECIFIED:
103
+ return "CONTROL_MODE_VERTICAL_UNSPECIFIED";
104
+ case ControlModeVertical.CONTROL_MODE_VERTICAL_MANUAL:
105
+ return "CONTROL_MODE_VERTICAL_MANUAL";
106
+ case ControlModeVertical.CONTROL_MODE_VERTICAL_AUTO_DEPTH:
107
+ return "CONTROL_MODE_VERTICAL_AUTO_DEPTH";
108
+ case ControlModeVertical.CONTROL_MODE_VERTICAL_AUTO_ALTITUDE:
109
+ return "CONTROL_MODE_VERTICAL_AUTO_ALTITUDE";
110
+ case ControlModeVertical.UNRECOGNIZED:
111
+ default:
112
+ return "UNRECOGNIZED";
113
+ }
114
+ }
115
+ /** Control mode for the horizontal axis of the drone. */
116
+ var ControlModeHorizontal;
117
+ (function (ControlModeHorizontal) {
118
+ /** CONTROL_MODE_HORIZONTAL_UNSPECIFIED - Unspecified. */
119
+ ControlModeHorizontal[ControlModeHorizontal["CONTROL_MODE_HORIZONTAL_UNSPECIFIED"] = 0] = "CONTROL_MODE_HORIZONTAL_UNSPECIFIED";
120
+ /** CONTROL_MODE_HORIZONTAL_MANUAL - Manual control mode. */
121
+ ControlModeHorizontal[ControlModeHorizontal["CONTROL_MODE_HORIZONTAL_MANUAL"] = 1] = "CONTROL_MODE_HORIZONTAL_MANUAL";
122
+ /** CONTROL_MODE_HORIZONTAL_AUTO_HEADING - Auto heading control mode. */
123
+ ControlModeHorizontal[ControlModeHorizontal["CONTROL_MODE_HORIZONTAL_AUTO_HEADING"] = 2] = "CONTROL_MODE_HORIZONTAL_AUTO_HEADING";
124
+ /** CONTROL_MODE_HORIZONTAL_STATION_KEEPING - Station keeping control mode. */
125
+ ControlModeHorizontal[ControlModeHorizontal["CONTROL_MODE_HORIZONTAL_STATION_KEEPING"] = 3] = "CONTROL_MODE_HORIZONTAL_STATION_KEEPING";
126
+ ControlModeHorizontal[ControlModeHorizontal["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
127
+ })(ControlModeHorizontal || (exports.ControlModeHorizontal = ControlModeHorizontal = {}));
128
+ function controlModeHorizontalFromJSON(object) {
129
+ switch (object) {
130
+ case 0:
131
+ case "CONTROL_MODE_HORIZONTAL_UNSPECIFIED":
132
+ return ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_UNSPECIFIED;
133
+ case 1:
134
+ case "CONTROL_MODE_HORIZONTAL_MANUAL":
135
+ return ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_MANUAL;
136
+ case 2:
137
+ case "CONTROL_MODE_HORIZONTAL_AUTO_HEADING":
138
+ return ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_AUTO_HEADING;
139
+ case 3:
140
+ case "CONTROL_MODE_HORIZONTAL_STATION_KEEPING":
141
+ return ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_STATION_KEEPING;
142
+ case -1:
143
+ case "UNRECOGNIZED":
144
+ default:
145
+ return ControlModeHorizontal.UNRECOGNIZED;
146
+ }
147
+ }
148
+ function controlModeHorizontalToJSON(object) {
149
+ switch (object) {
150
+ case ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_UNSPECIFIED:
151
+ return "CONTROL_MODE_HORIZONTAL_UNSPECIFIED";
152
+ case ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_MANUAL:
153
+ return "CONTROL_MODE_HORIZONTAL_MANUAL";
154
+ case ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_AUTO_HEADING:
155
+ return "CONTROL_MODE_HORIZONTAL_AUTO_HEADING";
156
+ case ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_STATION_KEEPING:
157
+ return "CONTROL_MODE_HORIZONTAL_STATION_KEEPING";
158
+ case ControlModeHorizontal.UNRECOGNIZED:
159
+ default:
160
+ return "UNRECOGNIZED";
161
+ }
162
+ }
163
+ /** List of available camera actions. */
164
+ var CameraAction;
165
+ (function (CameraAction) {
166
+ /** CAMERA_ACTION_UNSPECIFIED - Unspecified command. */
167
+ CameraAction[CameraAction["CAMERA_ACTION_UNSPECIFIED"] = 0] = "CAMERA_ACTION_UNSPECIFIED";
168
+ /** CAMERA_ACTION_TAKE_PHOTO - Take one photo. */
169
+ CameraAction[CameraAction["CAMERA_ACTION_TAKE_PHOTO"] = 1] = "CAMERA_ACTION_TAKE_PHOTO";
170
+ /** CAMERA_ACTION_TAKE_PHOTOS_TIME - Take a photo every x second. */
171
+ CameraAction[CameraAction["CAMERA_ACTION_TAKE_PHOTOS_TIME"] = 2] = "CAMERA_ACTION_TAKE_PHOTOS_TIME";
172
+ /** CAMERA_ACTION_TAKE_PHOTOS_DISTANCE - Take a photo every x meter. */
173
+ CameraAction[CameraAction["CAMERA_ACTION_TAKE_PHOTOS_DISTANCE"] = 3] = "CAMERA_ACTION_TAKE_PHOTOS_DISTANCE";
174
+ /** CAMERA_ACTION_STOP_TAKING_PHOTOS - Stop taking photos. */
175
+ CameraAction[CameraAction["CAMERA_ACTION_STOP_TAKING_PHOTOS"] = 4] = "CAMERA_ACTION_STOP_TAKING_PHOTOS";
176
+ /** CAMERA_ACTION_START_RECORDING - Start recording. */
177
+ CameraAction[CameraAction["CAMERA_ACTION_START_RECORDING"] = 5] = "CAMERA_ACTION_START_RECORDING";
178
+ /** CAMERA_ACTION_STOP_RECORDING - Stop recording. */
179
+ CameraAction[CameraAction["CAMERA_ACTION_STOP_RECORDING"] = 6] = "CAMERA_ACTION_STOP_RECORDING";
180
+ CameraAction[CameraAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
181
+ })(CameraAction || (exports.CameraAction = CameraAction = {}));
182
+ function cameraActionFromJSON(object) {
183
+ switch (object) {
184
+ case 0:
185
+ case "CAMERA_ACTION_UNSPECIFIED":
186
+ return CameraAction.CAMERA_ACTION_UNSPECIFIED;
187
+ case 1:
188
+ case "CAMERA_ACTION_TAKE_PHOTO":
189
+ return CameraAction.CAMERA_ACTION_TAKE_PHOTO;
190
+ case 2:
191
+ case "CAMERA_ACTION_TAKE_PHOTOS_TIME":
192
+ return CameraAction.CAMERA_ACTION_TAKE_PHOTOS_TIME;
193
+ case 3:
194
+ case "CAMERA_ACTION_TAKE_PHOTOS_DISTANCE":
195
+ return CameraAction.CAMERA_ACTION_TAKE_PHOTOS_DISTANCE;
196
+ case 4:
197
+ case "CAMERA_ACTION_STOP_TAKING_PHOTOS":
198
+ return CameraAction.CAMERA_ACTION_STOP_TAKING_PHOTOS;
199
+ case 5:
200
+ case "CAMERA_ACTION_START_RECORDING":
201
+ return CameraAction.CAMERA_ACTION_START_RECORDING;
202
+ case 6:
203
+ case "CAMERA_ACTION_STOP_RECORDING":
204
+ return CameraAction.CAMERA_ACTION_STOP_RECORDING;
205
+ case -1:
206
+ case "UNRECOGNIZED":
207
+ default:
208
+ return CameraAction.UNRECOGNIZED;
209
+ }
210
+ }
211
+ function cameraActionToJSON(object) {
212
+ switch (object) {
213
+ case CameraAction.CAMERA_ACTION_UNSPECIFIED:
214
+ return "CAMERA_ACTION_UNSPECIFIED";
215
+ case CameraAction.CAMERA_ACTION_TAKE_PHOTO:
216
+ return "CAMERA_ACTION_TAKE_PHOTO";
217
+ case CameraAction.CAMERA_ACTION_TAKE_PHOTOS_TIME:
218
+ return "CAMERA_ACTION_TAKE_PHOTOS_TIME";
219
+ case CameraAction.CAMERA_ACTION_TAKE_PHOTOS_DISTANCE:
220
+ return "CAMERA_ACTION_TAKE_PHOTOS_DISTANCE";
221
+ case CameraAction.CAMERA_ACTION_STOP_TAKING_PHOTOS:
222
+ return "CAMERA_ACTION_STOP_TAKING_PHOTOS";
223
+ case CameraAction.CAMERA_ACTION_START_RECORDING:
224
+ return "CAMERA_ACTION_START_RECORDING";
225
+ case CameraAction.CAMERA_ACTION_STOP_RECORDING:
226
+ return "CAMERA_ACTION_STOP_RECORDING";
227
+ case CameraAction.UNRECOGNIZED:
228
+ default:
229
+ return "UNRECOGNIZED";
230
+ }
231
+ }
232
+ /** List of available instruction types. */
233
+ var InstructionType;
234
+ (function (InstructionType) {
235
+ /** INSTRUCTION_TYPE_UNSPECIFIED - Unspecified. */
236
+ InstructionType[InstructionType["INSTRUCTION_TYPE_UNSPECIFIED"] = 0] = "INSTRUCTION_TYPE_UNSPECIFIED";
237
+ /** INSTRUCTION_TYPE_NONE - None. */
238
+ InstructionType[InstructionType["INSTRUCTION_TYPE_NONE"] = 1] = "INSTRUCTION_TYPE_NONE";
239
+ /** INSTRUCTION_TYPE_GO_TO_WAYPOINT - Go to waypoint. */
240
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_WAYPOINT"] = 2] = "INSTRUCTION_TYPE_GO_TO_WAYPOINT";
241
+ /** INSTRUCTION_TYPE_GO_TO_WAYPOINT_WITH_DEPTH_SET_POINT - Go to waypoint with depth set point. */
242
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_WAYPOINT_WITH_DEPTH_SET_POINT"] = 3] = "INSTRUCTION_TYPE_GO_TO_WAYPOINT_WITH_DEPTH_SET_POINT";
243
+ /** INSTRUCTION_TYPE_GO_TO_DEPTH_SET_POINT - Go to depth set point. */
244
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_DEPTH_SET_POINT"] = 4] = "INSTRUCTION_TYPE_GO_TO_DEPTH_SET_POINT";
245
+ /** INSTRUCTION_TYPE_SET_CAMERA_ACTION - Command used to take photo repeatedly or start, stop recording. */
246
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_CAMERA_ACTION"] = 5] = "INSTRUCTION_TYPE_SET_CAMERA_ACTION";
247
+ /** INSTRUCTION_TYPE_SET_CONTROL_MODE - Sets a new control mode. */
248
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_CONTROL_MODE"] = 6] = "INSTRUCTION_TYPE_SET_CONTROL_MODE";
249
+ /** INSTRUCTION_TYPE_SET_TILT_MAIN_CAMERA - Sets a new angle for the tilt servo. */
250
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_TILT_MAIN_CAMERA"] = 7] = "INSTRUCTION_TYPE_SET_TILT_MAIN_CAMERA";
251
+ /** INSTRUCTION_TYPE_SET_TILT_SERVO - Sets a new angle for the tilt servo. */
252
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_TILT_SERVO"] = 8] = "INSTRUCTION_TYPE_SET_TILT_SERVO";
253
+ /** INSTRUCTION_TYPE_WAIT_FOR_SEC - Waiting for requested time in seconds. */
254
+ InstructionType[InstructionType["INSTRUCTION_TYPE_WAIT_FOR_SEC"] = 9] = "INSTRUCTION_TYPE_WAIT_FOR_SEC";
255
+ /** INSTRUCTION_TYPE_GO_TO_SURFACE - Go to the surface. */
256
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_SURFACE"] = 10] = "INSTRUCTION_TYPE_GO_TO_SURFACE";
257
+ /** INSTRUCTION_TYPE_GO_TO_SEABED - Go to the seabed. */
258
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_SEABED"] = 11] = "INSTRUCTION_TYPE_GO_TO_SEABED";
259
+ /** INSTRUCTION_TYPE_GO_TO_HOME - Returning to home. */
260
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_HOME"] = 12] = "INSTRUCTION_TYPE_GO_TO_HOME";
261
+ /** INSTRUCTION_TYPE_SURVEY - Execute a survey pattern over a polygon area. */
262
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SURVEY"] = 13] = "INSTRUCTION_TYPE_SURVEY";
263
+ InstructionType[InstructionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
264
+ })(InstructionType || (exports.InstructionType = InstructionType = {}));
265
+ function instructionTypeFromJSON(object) {
266
+ switch (object) {
267
+ case 0:
268
+ case "INSTRUCTION_TYPE_UNSPECIFIED":
269
+ return InstructionType.INSTRUCTION_TYPE_UNSPECIFIED;
270
+ case 1:
271
+ case "INSTRUCTION_TYPE_NONE":
272
+ return InstructionType.INSTRUCTION_TYPE_NONE;
273
+ case 2:
274
+ case "INSTRUCTION_TYPE_GO_TO_WAYPOINT":
275
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_WAYPOINT;
276
+ case 3:
277
+ case "INSTRUCTION_TYPE_GO_TO_WAYPOINT_WITH_DEPTH_SET_POINT":
278
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_WAYPOINT_WITH_DEPTH_SET_POINT;
279
+ case 4:
280
+ case "INSTRUCTION_TYPE_GO_TO_DEPTH_SET_POINT":
281
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_DEPTH_SET_POINT;
282
+ case 5:
283
+ case "INSTRUCTION_TYPE_SET_CAMERA_ACTION":
284
+ return InstructionType.INSTRUCTION_TYPE_SET_CAMERA_ACTION;
285
+ case 6:
286
+ case "INSTRUCTION_TYPE_SET_CONTROL_MODE":
287
+ return InstructionType.INSTRUCTION_TYPE_SET_CONTROL_MODE;
288
+ case 7:
289
+ case "INSTRUCTION_TYPE_SET_TILT_MAIN_CAMERA":
290
+ return InstructionType.INSTRUCTION_TYPE_SET_TILT_MAIN_CAMERA;
291
+ case 8:
292
+ case "INSTRUCTION_TYPE_SET_TILT_SERVO":
293
+ return InstructionType.INSTRUCTION_TYPE_SET_TILT_SERVO;
294
+ case 9:
295
+ case "INSTRUCTION_TYPE_WAIT_FOR_SEC":
296
+ return InstructionType.INSTRUCTION_TYPE_WAIT_FOR_SEC;
297
+ case 10:
298
+ case "INSTRUCTION_TYPE_GO_TO_SURFACE":
299
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_SURFACE;
300
+ case 11:
301
+ case "INSTRUCTION_TYPE_GO_TO_SEABED":
302
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_SEABED;
303
+ case 12:
304
+ case "INSTRUCTION_TYPE_GO_TO_HOME":
305
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_HOME;
306
+ case 13:
307
+ case "INSTRUCTION_TYPE_SURVEY":
308
+ return InstructionType.INSTRUCTION_TYPE_SURVEY;
309
+ case -1:
310
+ case "UNRECOGNIZED":
311
+ default:
312
+ return InstructionType.UNRECOGNIZED;
313
+ }
314
+ }
315
+ function instructionTypeToJSON(object) {
316
+ switch (object) {
317
+ case InstructionType.INSTRUCTION_TYPE_UNSPECIFIED:
318
+ return "INSTRUCTION_TYPE_UNSPECIFIED";
319
+ case InstructionType.INSTRUCTION_TYPE_NONE:
320
+ return "INSTRUCTION_TYPE_NONE";
321
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_WAYPOINT:
322
+ return "INSTRUCTION_TYPE_GO_TO_WAYPOINT";
323
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_WAYPOINT_WITH_DEPTH_SET_POINT:
324
+ return "INSTRUCTION_TYPE_GO_TO_WAYPOINT_WITH_DEPTH_SET_POINT";
325
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_DEPTH_SET_POINT:
326
+ return "INSTRUCTION_TYPE_GO_TO_DEPTH_SET_POINT";
327
+ case InstructionType.INSTRUCTION_TYPE_SET_CAMERA_ACTION:
328
+ return "INSTRUCTION_TYPE_SET_CAMERA_ACTION";
329
+ case InstructionType.INSTRUCTION_TYPE_SET_CONTROL_MODE:
330
+ return "INSTRUCTION_TYPE_SET_CONTROL_MODE";
331
+ case InstructionType.INSTRUCTION_TYPE_SET_TILT_MAIN_CAMERA:
332
+ return "INSTRUCTION_TYPE_SET_TILT_MAIN_CAMERA";
333
+ case InstructionType.INSTRUCTION_TYPE_SET_TILT_SERVO:
334
+ return "INSTRUCTION_TYPE_SET_TILT_SERVO";
335
+ case InstructionType.INSTRUCTION_TYPE_WAIT_FOR_SEC:
336
+ return "INSTRUCTION_TYPE_WAIT_FOR_SEC";
337
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_SURFACE:
338
+ return "INSTRUCTION_TYPE_GO_TO_SURFACE";
339
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_SEABED:
340
+ return "INSTRUCTION_TYPE_GO_TO_SEABED";
341
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_HOME:
342
+ return "INSTRUCTION_TYPE_GO_TO_HOME";
343
+ case InstructionType.INSTRUCTION_TYPE_SURVEY:
344
+ return "INSTRUCTION_TYPE_SURVEY";
345
+ case InstructionType.UNRECOGNIZED:
346
+ default:
347
+ return "UNRECOGNIZED";
348
+ }
349
+ }
350
+ /** List of mission supervisor states. */
351
+ var MissionState;
352
+ (function (MissionState) {
353
+ /** MISSION_STATE_UNSPECIFIED - Unspecified. */
354
+ MissionState[MissionState["MISSION_STATE_UNSPECIFIED"] = 0] = "MISSION_STATE_UNSPECIFIED";
355
+ /** MISSION_STATE_INACTIVE - Mission supervisor is inactive. */
356
+ MissionState[MissionState["MISSION_STATE_INACTIVE"] = 1] = "MISSION_STATE_INACTIVE";
357
+ /** MISSION_STATE_READY - Ready to start mission. */
358
+ MissionState[MissionState["MISSION_STATE_READY"] = 2] = "MISSION_STATE_READY";
359
+ /** MISSION_STATE_RUNNING - Mission is running. */
360
+ MissionState[MissionState["MISSION_STATE_RUNNING"] = 3] = "MISSION_STATE_RUNNING";
361
+ /** MISSION_STATE_PAUSED - Mission is paused. */
362
+ MissionState[MissionState["MISSION_STATE_PAUSED"] = 4] = "MISSION_STATE_PAUSED";
363
+ /** MISSION_STATE_COMPLETED - Mission is completed. */
364
+ MissionState[MissionState["MISSION_STATE_COMPLETED"] = 5] = "MISSION_STATE_COMPLETED";
365
+ /** MISSION_STATE_ABORTED - Mission is aborted by the mission supervisor. */
366
+ MissionState[MissionState["MISSION_STATE_ABORTED"] = 6] = "MISSION_STATE_ABORTED";
367
+ /** MISSION_STATE_FAILED_TO_LOAD_MISSION - Mission has failed to load. */
368
+ MissionState[MissionState["MISSION_STATE_FAILED_TO_LOAD_MISSION"] = 7] = "MISSION_STATE_FAILED_TO_LOAD_MISSION";
369
+ /** MISSION_STATE_FAILED_TO_START_MISSION - Mission has failed to start. */
370
+ MissionState[MissionState["MISSION_STATE_FAILED_TO_START_MISSION"] = 8] = "MISSION_STATE_FAILED_TO_START_MISSION";
371
+ MissionState[MissionState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
372
+ })(MissionState || (exports.MissionState = MissionState = {}));
373
+ function missionStateFromJSON(object) {
374
+ switch (object) {
375
+ case 0:
376
+ case "MISSION_STATE_UNSPECIFIED":
377
+ return MissionState.MISSION_STATE_UNSPECIFIED;
378
+ case 1:
379
+ case "MISSION_STATE_INACTIVE":
380
+ return MissionState.MISSION_STATE_INACTIVE;
381
+ case 2:
382
+ case "MISSION_STATE_READY":
383
+ return MissionState.MISSION_STATE_READY;
384
+ case 3:
385
+ case "MISSION_STATE_RUNNING":
386
+ return MissionState.MISSION_STATE_RUNNING;
387
+ case 4:
388
+ case "MISSION_STATE_PAUSED":
389
+ return MissionState.MISSION_STATE_PAUSED;
390
+ case 5:
391
+ case "MISSION_STATE_COMPLETED":
392
+ return MissionState.MISSION_STATE_COMPLETED;
393
+ case 6:
394
+ case "MISSION_STATE_ABORTED":
395
+ return MissionState.MISSION_STATE_ABORTED;
396
+ case 7:
397
+ case "MISSION_STATE_FAILED_TO_LOAD_MISSION":
398
+ return MissionState.MISSION_STATE_FAILED_TO_LOAD_MISSION;
399
+ case 8:
400
+ case "MISSION_STATE_FAILED_TO_START_MISSION":
401
+ return MissionState.MISSION_STATE_FAILED_TO_START_MISSION;
402
+ case -1:
403
+ case "UNRECOGNIZED":
404
+ default:
405
+ return MissionState.UNRECOGNIZED;
406
+ }
407
+ }
408
+ function missionStateToJSON(object) {
409
+ switch (object) {
410
+ case MissionState.MISSION_STATE_UNSPECIFIED:
411
+ return "MISSION_STATE_UNSPECIFIED";
412
+ case MissionState.MISSION_STATE_INACTIVE:
413
+ return "MISSION_STATE_INACTIVE";
414
+ case MissionState.MISSION_STATE_READY:
415
+ return "MISSION_STATE_READY";
416
+ case MissionState.MISSION_STATE_RUNNING:
417
+ return "MISSION_STATE_RUNNING";
418
+ case MissionState.MISSION_STATE_PAUSED:
419
+ return "MISSION_STATE_PAUSED";
420
+ case MissionState.MISSION_STATE_COMPLETED:
421
+ return "MISSION_STATE_COMPLETED";
422
+ case MissionState.MISSION_STATE_ABORTED:
423
+ return "MISSION_STATE_ABORTED";
424
+ case MissionState.MISSION_STATE_FAILED_TO_LOAD_MISSION:
425
+ return "MISSION_STATE_FAILED_TO_LOAD_MISSION";
426
+ case MissionState.MISSION_STATE_FAILED_TO_START_MISSION:
427
+ return "MISSION_STATE_FAILED_TO_START_MISSION";
428
+ case MissionState.UNRECOGNIZED:
429
+ default:
430
+ return "UNRECOGNIZED";
431
+ }
432
+ }
433
+ function createBaseMission() {
434
+ return {
435
+ id: 0,
436
+ name: "",
437
+ instructions: [],
438
+ pathSegments: [],
439
+ totalDistance: 0,
440
+ totalDurationTime: 0,
441
+ defaultSurgeSpeed: 0,
442
+ defaultHeaveSpeed: 0,
443
+ defaultCircleOfAcceptance: 0,
444
+ };
445
+ }
446
+ exports.Mission = {
447
+ encode(message, writer = new wire_1.BinaryWriter()) {
448
+ if (message.id !== 0) {
449
+ writer.uint32(8).uint32(message.id);
450
+ }
451
+ if (message.name !== "") {
452
+ writer.uint32(18).string(message.name);
453
+ }
454
+ for (const v of message.instructions) {
455
+ exports.Instruction.encode(v, writer.uint32(26).fork()).join();
456
+ }
457
+ for (const v of message.pathSegments) {
458
+ exports.PathSegment.encode(v, writer.uint32(34).fork()).join();
459
+ }
460
+ if (message.totalDistance !== 0) {
461
+ writer.uint32(40).uint32(message.totalDistance);
462
+ }
463
+ if (message.totalDurationTime !== 0) {
464
+ writer.uint32(48).uint32(message.totalDurationTime);
465
+ }
466
+ if (message.defaultSurgeSpeed !== 0) {
467
+ writer.uint32(61).float(message.defaultSurgeSpeed);
468
+ }
469
+ if (message.defaultHeaveSpeed !== 0) {
470
+ writer.uint32(69).float(message.defaultHeaveSpeed);
471
+ }
472
+ if (message.defaultCircleOfAcceptance !== 0) {
473
+ writer.uint32(77).float(message.defaultCircleOfAcceptance);
474
+ }
475
+ return writer;
476
+ },
477
+ decode(input, length) {
478
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
479
+ const end = length === undefined ? reader.len : reader.pos + length;
480
+ const message = createBaseMission();
481
+ while (reader.pos < end) {
482
+ const tag = reader.uint32();
483
+ switch (tag >>> 3) {
484
+ case 1: {
485
+ if (tag !== 8) {
486
+ break;
487
+ }
488
+ message.id = reader.uint32();
489
+ continue;
490
+ }
491
+ case 2: {
492
+ if (tag !== 18) {
493
+ break;
494
+ }
495
+ message.name = reader.string();
496
+ continue;
497
+ }
498
+ case 3: {
499
+ if (tag !== 26) {
500
+ break;
501
+ }
502
+ message.instructions.push(exports.Instruction.decode(reader, reader.uint32()));
503
+ continue;
504
+ }
505
+ case 4: {
506
+ if (tag !== 34) {
507
+ break;
508
+ }
509
+ message.pathSegments.push(exports.PathSegment.decode(reader, reader.uint32()));
510
+ continue;
511
+ }
512
+ case 5: {
513
+ if (tag !== 40) {
514
+ break;
515
+ }
516
+ message.totalDistance = reader.uint32();
517
+ continue;
518
+ }
519
+ case 6: {
520
+ if (tag !== 48) {
521
+ break;
522
+ }
523
+ message.totalDurationTime = reader.uint32();
524
+ continue;
525
+ }
526
+ case 7: {
527
+ if (tag !== 61) {
528
+ break;
529
+ }
530
+ message.defaultSurgeSpeed = reader.float();
531
+ continue;
532
+ }
533
+ case 8: {
534
+ if (tag !== 69) {
535
+ break;
536
+ }
537
+ message.defaultHeaveSpeed = reader.float();
538
+ continue;
539
+ }
540
+ case 9: {
541
+ if (tag !== 77) {
542
+ break;
543
+ }
544
+ message.defaultCircleOfAcceptance = reader.float();
545
+ continue;
546
+ }
547
+ }
548
+ if ((tag & 7) === 4 || tag === 0) {
549
+ break;
550
+ }
551
+ reader.skip(tag & 7);
552
+ }
553
+ return message;
554
+ },
555
+ fromJSON(object) {
556
+ return {
557
+ id: isSet(object.id) ? gt.Number(object.id) : 0,
558
+ name: isSet(object.name) ? gt.String(object.name) : "",
559
+ instructions: gt.Array.isArray(object?.instructions)
560
+ ? object.instructions.map((e) => exports.Instruction.fromJSON(e))
561
+ : [],
562
+ pathSegments: gt.Array.isArray(object?.pathSegments)
563
+ ? object.pathSegments.map((e) => exports.PathSegment.fromJSON(e))
564
+ : [],
565
+ totalDistance: isSet(object.totalDistance) ? gt.Number(object.totalDistance) : 0,
566
+ totalDurationTime: isSet(object.totalDurationTime) ? gt.Number(object.totalDurationTime) : 0,
567
+ defaultSurgeSpeed: isSet(object.defaultSurgeSpeed) ? gt.Number(object.defaultSurgeSpeed) : 0,
568
+ defaultHeaveSpeed: isSet(object.defaultHeaveSpeed) ? gt.Number(object.defaultHeaveSpeed) : 0,
569
+ defaultCircleOfAcceptance: isSet(object.defaultCircleOfAcceptance)
570
+ ? gt.Number(object.defaultCircleOfAcceptance)
571
+ : 0,
572
+ };
573
+ },
574
+ toJSON(message) {
575
+ const obj = {};
576
+ if (message.id !== 0) {
577
+ obj.id = Math.round(message.id);
578
+ }
579
+ if (message.name !== "") {
580
+ obj.name = message.name;
581
+ }
582
+ if (message.instructions?.length) {
583
+ obj.instructions = message.instructions.map((e) => exports.Instruction.toJSON(e));
584
+ }
585
+ if (message.pathSegments?.length) {
586
+ obj.pathSegments = message.pathSegments.map((e) => exports.PathSegment.toJSON(e));
587
+ }
588
+ if (message.totalDistance !== 0) {
589
+ obj.totalDistance = Math.round(message.totalDistance);
590
+ }
591
+ if (message.totalDurationTime !== 0) {
592
+ obj.totalDurationTime = Math.round(message.totalDurationTime);
593
+ }
594
+ if (message.defaultSurgeSpeed !== 0) {
595
+ obj.defaultSurgeSpeed = message.defaultSurgeSpeed;
596
+ }
597
+ if (message.defaultHeaveSpeed !== 0) {
598
+ obj.defaultHeaveSpeed = message.defaultHeaveSpeed;
599
+ }
600
+ if (message.defaultCircleOfAcceptance !== 0) {
601
+ obj.defaultCircleOfAcceptance = message.defaultCircleOfAcceptance;
602
+ }
603
+ return obj;
604
+ },
605
+ create(base) {
606
+ return exports.Mission.fromPartial(base ?? {});
607
+ },
608
+ fromPartial(object) {
609
+ const message = createBaseMission();
610
+ message.id = object.id ?? 0;
611
+ message.name = object.name ?? "";
612
+ message.instructions = object.instructions?.map((e) => exports.Instruction.fromPartial(e)) || [];
613
+ message.pathSegments = object.pathSegments?.map((e) => exports.PathSegment.fromPartial(e)) || [];
614
+ message.totalDistance = object.totalDistance ?? 0;
615
+ message.totalDurationTime = object.totalDurationTime ?? 0;
616
+ message.defaultSurgeSpeed = object.defaultSurgeSpeed ?? 0;
617
+ message.defaultHeaveSpeed = object.defaultHeaveSpeed ?? 0;
618
+ message.defaultCircleOfAcceptance = object.defaultCircleOfAcceptance ?? 0;
619
+ return message;
620
+ },
621
+ };
622
+ function createBaseInstruction() {
623
+ return {
624
+ id: 0,
625
+ groupId: 0,
626
+ autoContinue: false,
627
+ waypointCommand: undefined,
628
+ depthSetPointCommand: undefined,
629
+ cameraCommand: undefined,
630
+ controlModeCommand: undefined,
631
+ tiltMainCameraCommand: undefined,
632
+ tiltMultibeamCommand: undefined,
633
+ waitForCommand: undefined,
634
+ goToSurfaceCommand: undefined,
635
+ goToSeabedCommand: undefined,
636
+ goToHomeCommand: undefined,
637
+ surveyCommand: undefined,
638
+ };
639
+ }
640
+ exports.Instruction = {
641
+ encode(message, writer = new wire_1.BinaryWriter()) {
642
+ if (message.id !== 0) {
643
+ writer.uint32(8).uint32(message.id);
644
+ }
645
+ if (message.groupId !== 0) {
646
+ writer.uint32(16).uint32(message.groupId);
647
+ }
648
+ if (message.autoContinue !== false) {
649
+ writer.uint32(24).bool(message.autoContinue);
650
+ }
651
+ if (message.waypointCommand !== undefined) {
652
+ exports.WaypointCommand.encode(message.waypointCommand, writer.uint32(34).fork()).join();
653
+ }
654
+ if (message.depthSetPointCommand !== undefined) {
655
+ exports.DepthSetPointCommand.encode(message.depthSetPointCommand, writer.uint32(42).fork()).join();
656
+ }
657
+ if (message.cameraCommand !== undefined) {
658
+ exports.CameraCommand.encode(message.cameraCommand, writer.uint32(50).fork()).join();
659
+ }
660
+ if (message.controlModeCommand !== undefined) {
661
+ exports.ControlModeCommand.encode(message.controlModeCommand, writer.uint32(58).fork()).join();
662
+ }
663
+ if (message.tiltMainCameraCommand !== undefined) {
664
+ exports.TiltMainCameraCommand.encode(message.tiltMainCameraCommand, writer.uint32(66).fork()).join();
665
+ }
666
+ if (message.tiltMultibeamCommand !== undefined) {
667
+ exports.TiltMultibeamCommand.encode(message.tiltMultibeamCommand, writer.uint32(74).fork()).join();
668
+ }
669
+ if (message.waitForCommand !== undefined) {
670
+ exports.WaitForCommand.encode(message.waitForCommand, writer.uint32(82).fork()).join();
671
+ }
672
+ if (message.goToSurfaceCommand !== undefined) {
673
+ exports.GoToSurfaceCommand.encode(message.goToSurfaceCommand, writer.uint32(90).fork()).join();
674
+ }
675
+ if (message.goToSeabedCommand !== undefined) {
676
+ exports.GoToSeabedCommand.encode(message.goToSeabedCommand, writer.uint32(98).fork()).join();
677
+ }
678
+ if (message.goToHomeCommand !== undefined) {
679
+ exports.GoToHomeCommand.encode(message.goToHomeCommand, writer.uint32(106).fork()).join();
680
+ }
681
+ if (message.surveyCommand !== undefined) {
682
+ exports.SurveyCommand.encode(message.surveyCommand, writer.uint32(114).fork()).join();
683
+ }
684
+ return writer;
685
+ },
686
+ decode(input, length) {
687
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
688
+ const end = length === undefined ? reader.len : reader.pos + length;
689
+ const message = createBaseInstruction();
690
+ while (reader.pos < end) {
691
+ const tag = reader.uint32();
692
+ switch (tag >>> 3) {
693
+ case 1: {
694
+ if (tag !== 8) {
695
+ break;
696
+ }
697
+ message.id = reader.uint32();
698
+ continue;
699
+ }
700
+ case 2: {
701
+ if (tag !== 16) {
702
+ break;
703
+ }
704
+ message.groupId = reader.uint32();
705
+ continue;
706
+ }
707
+ case 3: {
708
+ if (tag !== 24) {
709
+ break;
710
+ }
711
+ message.autoContinue = reader.bool();
712
+ continue;
713
+ }
714
+ case 4: {
715
+ if (tag !== 34) {
716
+ break;
717
+ }
718
+ message.waypointCommand = exports.WaypointCommand.decode(reader, reader.uint32());
719
+ continue;
720
+ }
721
+ case 5: {
722
+ if (tag !== 42) {
723
+ break;
724
+ }
725
+ message.depthSetPointCommand = exports.DepthSetPointCommand.decode(reader, reader.uint32());
726
+ continue;
727
+ }
728
+ case 6: {
729
+ if (tag !== 50) {
730
+ break;
731
+ }
732
+ message.cameraCommand = exports.CameraCommand.decode(reader, reader.uint32());
733
+ continue;
734
+ }
735
+ case 7: {
736
+ if (tag !== 58) {
737
+ break;
738
+ }
739
+ message.controlModeCommand = exports.ControlModeCommand.decode(reader, reader.uint32());
740
+ continue;
741
+ }
742
+ case 8: {
743
+ if (tag !== 66) {
744
+ break;
745
+ }
746
+ message.tiltMainCameraCommand = exports.TiltMainCameraCommand.decode(reader, reader.uint32());
747
+ continue;
748
+ }
749
+ case 9: {
750
+ if (tag !== 74) {
751
+ break;
752
+ }
753
+ message.tiltMultibeamCommand = exports.TiltMultibeamCommand.decode(reader, reader.uint32());
754
+ continue;
755
+ }
756
+ case 10: {
757
+ if (tag !== 82) {
758
+ break;
759
+ }
760
+ message.waitForCommand = exports.WaitForCommand.decode(reader, reader.uint32());
761
+ continue;
762
+ }
763
+ case 11: {
764
+ if (tag !== 90) {
765
+ break;
766
+ }
767
+ message.goToSurfaceCommand = exports.GoToSurfaceCommand.decode(reader, reader.uint32());
768
+ continue;
769
+ }
770
+ case 12: {
771
+ if (tag !== 98) {
772
+ break;
773
+ }
774
+ message.goToSeabedCommand = exports.GoToSeabedCommand.decode(reader, reader.uint32());
775
+ continue;
776
+ }
777
+ case 13: {
778
+ if (tag !== 106) {
779
+ break;
780
+ }
781
+ message.goToHomeCommand = exports.GoToHomeCommand.decode(reader, reader.uint32());
782
+ continue;
783
+ }
784
+ case 14: {
785
+ if (tag !== 114) {
786
+ break;
787
+ }
788
+ message.surveyCommand = exports.SurveyCommand.decode(reader, reader.uint32());
789
+ continue;
790
+ }
791
+ }
792
+ if ((tag & 7) === 4 || tag === 0) {
793
+ break;
794
+ }
795
+ reader.skip(tag & 7);
796
+ }
797
+ return message;
798
+ },
799
+ fromJSON(object) {
800
+ return {
801
+ id: isSet(object.id) ? gt.Number(object.id) : 0,
802
+ groupId: isSet(object.groupId) ? gt.Number(object.groupId) : 0,
803
+ autoContinue: isSet(object.autoContinue) ? gt.Boolean(object.autoContinue) : false,
804
+ waypointCommand: isSet(object.waypointCommand) ? exports.WaypointCommand.fromJSON(object.waypointCommand) : undefined,
805
+ depthSetPointCommand: isSet(object.depthSetPointCommand)
806
+ ? exports.DepthSetPointCommand.fromJSON(object.depthSetPointCommand)
807
+ : undefined,
808
+ cameraCommand: isSet(object.cameraCommand) ? exports.CameraCommand.fromJSON(object.cameraCommand) : undefined,
809
+ controlModeCommand: isSet(object.controlModeCommand)
810
+ ? exports.ControlModeCommand.fromJSON(object.controlModeCommand)
811
+ : undefined,
812
+ tiltMainCameraCommand: isSet(object.tiltMainCameraCommand)
813
+ ? exports.TiltMainCameraCommand.fromJSON(object.tiltMainCameraCommand)
814
+ : undefined,
815
+ tiltMultibeamCommand: isSet(object.tiltMultibeamCommand)
816
+ ? exports.TiltMultibeamCommand.fromJSON(object.tiltMultibeamCommand)
817
+ : undefined,
818
+ waitForCommand: isSet(object.waitForCommand) ? exports.WaitForCommand.fromJSON(object.waitForCommand) : undefined,
819
+ goToSurfaceCommand: isSet(object.goToSurfaceCommand)
820
+ ? exports.GoToSurfaceCommand.fromJSON(object.goToSurfaceCommand)
821
+ : undefined,
822
+ goToSeabedCommand: isSet(object.goToSeabedCommand)
823
+ ? exports.GoToSeabedCommand.fromJSON(object.goToSeabedCommand)
824
+ : undefined,
825
+ goToHomeCommand: isSet(object.goToHomeCommand) ? exports.GoToHomeCommand.fromJSON(object.goToHomeCommand) : undefined,
826
+ surveyCommand: isSet(object.surveyCommand) ? exports.SurveyCommand.fromJSON(object.surveyCommand) : undefined,
827
+ };
828
+ },
829
+ toJSON(message) {
830
+ const obj = {};
831
+ if (message.id !== 0) {
832
+ obj.id = Math.round(message.id);
833
+ }
834
+ if (message.groupId !== 0) {
835
+ obj.groupId = Math.round(message.groupId);
836
+ }
837
+ if (message.autoContinue !== false) {
838
+ obj.autoContinue = message.autoContinue;
839
+ }
840
+ if (message.waypointCommand !== undefined) {
841
+ obj.waypointCommand = exports.WaypointCommand.toJSON(message.waypointCommand);
842
+ }
843
+ if (message.depthSetPointCommand !== undefined) {
844
+ obj.depthSetPointCommand = exports.DepthSetPointCommand.toJSON(message.depthSetPointCommand);
845
+ }
846
+ if (message.cameraCommand !== undefined) {
847
+ obj.cameraCommand = exports.CameraCommand.toJSON(message.cameraCommand);
848
+ }
849
+ if (message.controlModeCommand !== undefined) {
850
+ obj.controlModeCommand = exports.ControlModeCommand.toJSON(message.controlModeCommand);
851
+ }
852
+ if (message.tiltMainCameraCommand !== undefined) {
853
+ obj.tiltMainCameraCommand = exports.TiltMainCameraCommand.toJSON(message.tiltMainCameraCommand);
854
+ }
855
+ if (message.tiltMultibeamCommand !== undefined) {
856
+ obj.tiltMultibeamCommand = exports.TiltMultibeamCommand.toJSON(message.tiltMultibeamCommand);
857
+ }
858
+ if (message.waitForCommand !== undefined) {
859
+ obj.waitForCommand = exports.WaitForCommand.toJSON(message.waitForCommand);
860
+ }
861
+ if (message.goToSurfaceCommand !== undefined) {
862
+ obj.goToSurfaceCommand = exports.GoToSurfaceCommand.toJSON(message.goToSurfaceCommand);
863
+ }
864
+ if (message.goToSeabedCommand !== undefined) {
865
+ obj.goToSeabedCommand = exports.GoToSeabedCommand.toJSON(message.goToSeabedCommand);
866
+ }
867
+ if (message.goToHomeCommand !== undefined) {
868
+ obj.goToHomeCommand = exports.GoToHomeCommand.toJSON(message.goToHomeCommand);
869
+ }
870
+ if (message.surveyCommand !== undefined) {
871
+ obj.surveyCommand = exports.SurveyCommand.toJSON(message.surveyCommand);
872
+ }
873
+ return obj;
874
+ },
875
+ create(base) {
876
+ return exports.Instruction.fromPartial(base ?? {});
877
+ },
878
+ fromPartial(object) {
879
+ const message = createBaseInstruction();
880
+ message.id = object.id ?? 0;
881
+ message.groupId = object.groupId ?? 0;
882
+ message.autoContinue = object.autoContinue ?? false;
883
+ message.waypointCommand = (object.waypointCommand !== undefined && object.waypointCommand !== null)
884
+ ? exports.WaypointCommand.fromPartial(object.waypointCommand)
885
+ : undefined;
886
+ message.depthSetPointCommand = (object.depthSetPointCommand !== undefined && object.depthSetPointCommand !== null)
887
+ ? exports.DepthSetPointCommand.fromPartial(object.depthSetPointCommand)
888
+ : undefined;
889
+ message.cameraCommand = (object.cameraCommand !== undefined && object.cameraCommand !== null)
890
+ ? exports.CameraCommand.fromPartial(object.cameraCommand)
891
+ : undefined;
892
+ message.controlModeCommand = (object.controlModeCommand !== undefined && object.controlModeCommand !== null)
893
+ ? exports.ControlModeCommand.fromPartial(object.controlModeCommand)
894
+ : undefined;
895
+ message.tiltMainCameraCommand =
896
+ (object.tiltMainCameraCommand !== undefined && object.tiltMainCameraCommand !== null)
897
+ ? exports.TiltMainCameraCommand.fromPartial(object.tiltMainCameraCommand)
898
+ : undefined;
899
+ message.tiltMultibeamCommand = (object.tiltMultibeamCommand !== undefined && object.tiltMultibeamCommand !== null)
900
+ ? exports.TiltMultibeamCommand.fromPartial(object.tiltMultibeamCommand)
901
+ : undefined;
902
+ message.waitForCommand = (object.waitForCommand !== undefined && object.waitForCommand !== null)
903
+ ? exports.WaitForCommand.fromPartial(object.waitForCommand)
904
+ : undefined;
905
+ message.goToSurfaceCommand = (object.goToSurfaceCommand !== undefined && object.goToSurfaceCommand !== null)
906
+ ? exports.GoToSurfaceCommand.fromPartial(object.goToSurfaceCommand)
907
+ : undefined;
908
+ message.goToSeabedCommand = (object.goToSeabedCommand !== undefined && object.goToSeabedCommand !== null)
909
+ ? exports.GoToSeabedCommand.fromPartial(object.goToSeabedCommand)
910
+ : undefined;
911
+ message.goToHomeCommand = (object.goToHomeCommand !== undefined && object.goToHomeCommand !== null)
912
+ ? exports.GoToHomeCommand.fromPartial(object.goToHomeCommand)
913
+ : undefined;
914
+ message.surveyCommand = (object.surveyCommand !== undefined && object.surveyCommand !== null)
915
+ ? exports.SurveyCommand.fromPartial(object.surveyCommand)
916
+ : undefined;
917
+ return message;
918
+ },
919
+ };
920
+ function createBaseDepthSetPoint() {
921
+ return { depth: 0, speedToDepth: 0, depthZeroReference: 0 };
922
+ }
923
+ exports.DepthSetPoint = {
924
+ encode(message, writer = new wire_1.BinaryWriter()) {
925
+ if (message.depth !== 0) {
926
+ writer.uint32(13).float(message.depth);
927
+ }
928
+ if (message.speedToDepth !== 0) {
929
+ writer.uint32(21).float(message.speedToDepth);
930
+ }
931
+ if (message.depthZeroReference !== 0) {
932
+ writer.uint32(24).int32(message.depthZeroReference);
933
+ }
934
+ return writer;
935
+ },
936
+ decode(input, length) {
937
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
938
+ const end = length === undefined ? reader.len : reader.pos + length;
939
+ const message = createBaseDepthSetPoint();
940
+ while (reader.pos < end) {
941
+ const tag = reader.uint32();
942
+ switch (tag >>> 3) {
943
+ case 1: {
944
+ if (tag !== 13) {
945
+ break;
946
+ }
947
+ message.depth = reader.float();
948
+ continue;
949
+ }
950
+ case 2: {
951
+ if (tag !== 21) {
952
+ break;
953
+ }
954
+ message.speedToDepth = reader.float();
955
+ continue;
956
+ }
957
+ case 3: {
958
+ if (tag !== 24) {
959
+ break;
960
+ }
961
+ message.depthZeroReference = reader.int32();
962
+ continue;
963
+ }
964
+ }
965
+ if ((tag & 7) === 4 || tag === 0) {
966
+ break;
967
+ }
968
+ reader.skip(tag & 7);
969
+ }
970
+ return message;
971
+ },
972
+ fromJSON(object) {
973
+ return {
974
+ depth: isSet(object.depth) ? gt.Number(object.depth) : 0,
975
+ speedToDepth: isSet(object.speedToDepth) ? gt.Number(object.speedToDepth) : 0,
976
+ depthZeroReference: isSet(object.depthZeroReference) ? depthZeroReferenceFromJSON(object.depthZeroReference) : 0,
977
+ };
978
+ },
979
+ toJSON(message) {
980
+ const obj = {};
981
+ if (message.depth !== 0) {
982
+ obj.depth = message.depth;
983
+ }
984
+ if (message.speedToDepth !== 0) {
985
+ obj.speedToDepth = message.speedToDepth;
986
+ }
987
+ if (message.depthZeroReference !== 0) {
988
+ obj.depthZeroReference = depthZeroReferenceToJSON(message.depthZeroReference);
989
+ }
990
+ return obj;
991
+ },
992
+ create(base) {
993
+ return exports.DepthSetPoint.fromPartial(base ?? {});
994
+ },
995
+ fromPartial(object) {
996
+ const message = createBaseDepthSetPoint();
997
+ message.depth = object.depth ?? 0;
998
+ message.speedToDepth = object.speedToDepth ?? 0;
999
+ message.depthZeroReference = object.depthZeroReference ?? 0;
1000
+ return message;
1001
+ },
1002
+ };
1003
+ function createBaseWaypoint() {
1004
+ return {
1005
+ id: 0,
1006
+ name: "",
1007
+ globalPosition: undefined,
1008
+ circleOfAcceptance: 0,
1009
+ speedToTarget: 0,
1010
+ depthSetPoint: undefined,
1011
+ };
1012
+ }
1013
+ exports.Waypoint = {
1014
+ encode(message, writer = new wire_1.BinaryWriter()) {
1015
+ if (message.id !== 0) {
1016
+ writer.uint32(8).uint32(message.id);
1017
+ }
1018
+ if (message.name !== "") {
1019
+ writer.uint32(18).string(message.name);
1020
+ }
1021
+ if (message.globalPosition !== undefined) {
1022
+ message_formats_1.LatLongPosition.encode(message.globalPosition, writer.uint32(26).fork()).join();
1023
+ }
1024
+ if (message.circleOfAcceptance !== 0) {
1025
+ writer.uint32(37).float(message.circleOfAcceptance);
1026
+ }
1027
+ if (message.speedToTarget !== 0) {
1028
+ writer.uint32(45).float(message.speedToTarget);
1029
+ }
1030
+ if (message.depthSetPoint !== undefined) {
1031
+ exports.DepthSetPoint.encode(message.depthSetPoint, writer.uint32(50).fork()).join();
1032
+ }
1033
+ return writer;
1034
+ },
1035
+ decode(input, length) {
1036
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1037
+ const end = length === undefined ? reader.len : reader.pos + length;
1038
+ const message = createBaseWaypoint();
1039
+ while (reader.pos < end) {
1040
+ const tag = reader.uint32();
1041
+ switch (tag >>> 3) {
1042
+ case 1: {
1043
+ if (tag !== 8) {
1044
+ break;
1045
+ }
1046
+ message.id = reader.uint32();
1047
+ continue;
1048
+ }
1049
+ case 2: {
1050
+ if (tag !== 18) {
1051
+ break;
1052
+ }
1053
+ message.name = reader.string();
1054
+ continue;
1055
+ }
1056
+ case 3: {
1057
+ if (tag !== 26) {
1058
+ break;
1059
+ }
1060
+ message.globalPosition = message_formats_1.LatLongPosition.decode(reader, reader.uint32());
1061
+ continue;
1062
+ }
1063
+ case 4: {
1064
+ if (tag !== 37) {
1065
+ break;
1066
+ }
1067
+ message.circleOfAcceptance = reader.float();
1068
+ continue;
1069
+ }
1070
+ case 5: {
1071
+ if (tag !== 45) {
1072
+ break;
1073
+ }
1074
+ message.speedToTarget = reader.float();
1075
+ continue;
1076
+ }
1077
+ case 6: {
1078
+ if (tag !== 50) {
1079
+ break;
1080
+ }
1081
+ message.depthSetPoint = exports.DepthSetPoint.decode(reader, reader.uint32());
1082
+ continue;
1083
+ }
1084
+ }
1085
+ if ((tag & 7) === 4 || tag === 0) {
1086
+ break;
1087
+ }
1088
+ reader.skip(tag & 7);
1089
+ }
1090
+ return message;
1091
+ },
1092
+ fromJSON(object) {
1093
+ return {
1094
+ id: isSet(object.id) ? gt.Number(object.id) : 0,
1095
+ name: isSet(object.name) ? gt.String(object.name) : "",
1096
+ globalPosition: isSet(object.globalPosition) ? message_formats_1.LatLongPosition.fromJSON(object.globalPosition) : undefined,
1097
+ circleOfAcceptance: isSet(object.circleOfAcceptance) ? gt.Number(object.circleOfAcceptance) : 0,
1098
+ speedToTarget: isSet(object.speedToTarget) ? gt.Number(object.speedToTarget) : 0,
1099
+ depthSetPoint: isSet(object.depthSetPoint) ? exports.DepthSetPoint.fromJSON(object.depthSetPoint) : undefined,
1100
+ };
1101
+ },
1102
+ toJSON(message) {
1103
+ const obj = {};
1104
+ if (message.id !== 0) {
1105
+ obj.id = Math.round(message.id);
1106
+ }
1107
+ if (message.name !== "") {
1108
+ obj.name = message.name;
1109
+ }
1110
+ if (message.globalPosition !== undefined) {
1111
+ obj.globalPosition = message_formats_1.LatLongPosition.toJSON(message.globalPosition);
1112
+ }
1113
+ if (message.circleOfAcceptance !== 0) {
1114
+ obj.circleOfAcceptance = message.circleOfAcceptance;
1115
+ }
1116
+ if (message.speedToTarget !== 0) {
1117
+ obj.speedToTarget = message.speedToTarget;
1118
+ }
1119
+ if (message.depthSetPoint !== undefined) {
1120
+ obj.depthSetPoint = exports.DepthSetPoint.toJSON(message.depthSetPoint);
1121
+ }
1122
+ return obj;
1123
+ },
1124
+ create(base) {
1125
+ return exports.Waypoint.fromPartial(base ?? {});
1126
+ },
1127
+ fromPartial(object) {
1128
+ const message = createBaseWaypoint();
1129
+ message.id = object.id ?? 0;
1130
+ message.name = object.name ?? "";
1131
+ message.globalPosition = (object.globalPosition !== undefined && object.globalPosition !== null)
1132
+ ? message_formats_1.LatLongPosition.fromPartial(object.globalPosition)
1133
+ : undefined;
1134
+ message.circleOfAcceptance = object.circleOfAcceptance ?? 0;
1135
+ message.speedToTarget = object.speedToTarget ?? 0;
1136
+ message.depthSetPoint = (object.depthSetPoint !== undefined && object.depthSetPoint !== null)
1137
+ ? exports.DepthSetPoint.fromPartial(object.depthSetPoint)
1138
+ : undefined;
1139
+ return message;
1140
+ },
1141
+ };
1142
+ function createBaseControlModeCommand() {
1143
+ return { controlModeVertical: 0, controlModeHorizontal: 0 };
1144
+ }
1145
+ exports.ControlModeCommand = {
1146
+ encode(message, writer = new wire_1.BinaryWriter()) {
1147
+ if (message.controlModeVertical !== 0) {
1148
+ writer.uint32(40).int32(message.controlModeVertical);
1149
+ }
1150
+ if (message.controlModeHorizontal !== 0) {
1151
+ writer.uint32(48).int32(message.controlModeHorizontal);
1152
+ }
1153
+ return writer;
1154
+ },
1155
+ decode(input, length) {
1156
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1157
+ const end = length === undefined ? reader.len : reader.pos + length;
1158
+ const message = createBaseControlModeCommand();
1159
+ while (reader.pos < end) {
1160
+ const tag = reader.uint32();
1161
+ switch (tag >>> 3) {
1162
+ case 5: {
1163
+ if (tag !== 40) {
1164
+ break;
1165
+ }
1166
+ message.controlModeVertical = reader.int32();
1167
+ continue;
1168
+ }
1169
+ case 6: {
1170
+ if (tag !== 48) {
1171
+ break;
1172
+ }
1173
+ message.controlModeHorizontal = reader.int32();
1174
+ continue;
1175
+ }
1176
+ }
1177
+ if ((tag & 7) === 4 || tag === 0) {
1178
+ break;
1179
+ }
1180
+ reader.skip(tag & 7);
1181
+ }
1182
+ return message;
1183
+ },
1184
+ fromJSON(object) {
1185
+ return {
1186
+ controlModeVertical: isSet(object.controlModeVertical)
1187
+ ? controlModeVerticalFromJSON(object.controlModeVertical)
1188
+ : 0,
1189
+ controlModeHorizontal: isSet(object.controlModeHorizontal)
1190
+ ? controlModeHorizontalFromJSON(object.controlModeHorizontal)
1191
+ : 0,
1192
+ };
1193
+ },
1194
+ toJSON(message) {
1195
+ const obj = {};
1196
+ if (message.controlModeVertical !== 0) {
1197
+ obj.controlModeVertical = controlModeVerticalToJSON(message.controlModeVertical);
1198
+ }
1199
+ if (message.controlModeHorizontal !== 0) {
1200
+ obj.controlModeHorizontal = controlModeHorizontalToJSON(message.controlModeHorizontal);
1201
+ }
1202
+ return obj;
1203
+ },
1204
+ create(base) {
1205
+ return exports.ControlModeCommand.fromPartial(base ?? {});
1206
+ },
1207
+ fromPartial(object) {
1208
+ const message = createBaseControlModeCommand();
1209
+ message.controlModeVertical = object.controlModeVertical ?? 0;
1210
+ message.controlModeHorizontal = object.controlModeHorizontal ?? 0;
1211
+ return message;
1212
+ },
1213
+ };
1214
+ function createBaseWaypointCommand() {
1215
+ return { waypoint: undefined };
1216
+ }
1217
+ exports.WaypointCommand = {
1218
+ encode(message, writer = new wire_1.BinaryWriter()) {
1219
+ if (message.waypoint !== undefined) {
1220
+ exports.Waypoint.encode(message.waypoint, writer.uint32(10).fork()).join();
1221
+ }
1222
+ return writer;
1223
+ },
1224
+ decode(input, length) {
1225
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1226
+ const end = length === undefined ? reader.len : reader.pos + length;
1227
+ const message = createBaseWaypointCommand();
1228
+ while (reader.pos < end) {
1229
+ const tag = reader.uint32();
1230
+ switch (tag >>> 3) {
1231
+ case 1: {
1232
+ if (tag !== 10) {
1233
+ break;
1234
+ }
1235
+ message.waypoint = exports.Waypoint.decode(reader, reader.uint32());
1236
+ continue;
1237
+ }
1238
+ }
1239
+ if ((tag & 7) === 4 || tag === 0) {
1240
+ break;
1241
+ }
1242
+ reader.skip(tag & 7);
1243
+ }
1244
+ return message;
1245
+ },
1246
+ fromJSON(object) {
1247
+ return { waypoint: isSet(object.waypoint) ? exports.Waypoint.fromJSON(object.waypoint) : undefined };
1248
+ },
1249
+ toJSON(message) {
1250
+ const obj = {};
1251
+ if (message.waypoint !== undefined) {
1252
+ obj.waypoint = exports.Waypoint.toJSON(message.waypoint);
1253
+ }
1254
+ return obj;
1255
+ },
1256
+ create(base) {
1257
+ return exports.WaypointCommand.fromPartial(base ?? {});
1258
+ },
1259
+ fromPartial(object) {
1260
+ const message = createBaseWaypointCommand();
1261
+ message.waypoint = (object.waypoint !== undefined && object.waypoint !== null)
1262
+ ? exports.Waypoint.fromPartial(object.waypoint)
1263
+ : undefined;
1264
+ return message;
1265
+ },
1266
+ };
1267
+ function createBaseDepthSetPointCommand() {
1268
+ return { depthSetPoint: undefined };
1269
+ }
1270
+ exports.DepthSetPointCommand = {
1271
+ encode(message, writer = new wire_1.BinaryWriter()) {
1272
+ if (message.depthSetPoint !== undefined) {
1273
+ exports.DepthSetPoint.encode(message.depthSetPoint, writer.uint32(10).fork()).join();
1274
+ }
1275
+ return writer;
1276
+ },
1277
+ decode(input, length) {
1278
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1279
+ const end = length === undefined ? reader.len : reader.pos + length;
1280
+ const message = createBaseDepthSetPointCommand();
1281
+ while (reader.pos < end) {
1282
+ const tag = reader.uint32();
1283
+ switch (tag >>> 3) {
1284
+ case 1: {
1285
+ if (tag !== 10) {
1286
+ break;
1287
+ }
1288
+ message.depthSetPoint = exports.DepthSetPoint.decode(reader, reader.uint32());
1289
+ continue;
1290
+ }
1291
+ }
1292
+ if ((tag & 7) === 4 || tag === 0) {
1293
+ break;
1294
+ }
1295
+ reader.skip(tag & 7);
1296
+ }
1297
+ return message;
1298
+ },
1299
+ fromJSON(object) {
1300
+ return { depthSetPoint: isSet(object.depthSetPoint) ? exports.DepthSetPoint.fromJSON(object.depthSetPoint) : undefined };
1301
+ },
1302
+ toJSON(message) {
1303
+ const obj = {};
1304
+ if (message.depthSetPoint !== undefined) {
1305
+ obj.depthSetPoint = exports.DepthSetPoint.toJSON(message.depthSetPoint);
1306
+ }
1307
+ return obj;
1308
+ },
1309
+ create(base) {
1310
+ return exports.DepthSetPointCommand.fromPartial(base ?? {});
1311
+ },
1312
+ fromPartial(object) {
1313
+ const message = createBaseDepthSetPointCommand();
1314
+ message.depthSetPoint = (object.depthSetPoint !== undefined && object.depthSetPoint !== null)
1315
+ ? exports.DepthSetPoint.fromPartial(object.depthSetPoint)
1316
+ : undefined;
1317
+ return message;
1318
+ },
1319
+ };
1320
+ function createBaseTiltMainCameraCommand() {
1321
+ return { tiltAngle: undefined };
1322
+ }
1323
+ exports.TiltMainCameraCommand = {
1324
+ encode(message, writer = new wire_1.BinaryWriter()) {
1325
+ if (message.tiltAngle !== undefined) {
1326
+ message_formats_1.TiltAngle.encode(message.tiltAngle, writer.uint32(10).fork()).join();
1327
+ }
1328
+ return writer;
1329
+ },
1330
+ decode(input, length) {
1331
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1332
+ const end = length === undefined ? reader.len : reader.pos + length;
1333
+ const message = createBaseTiltMainCameraCommand();
1334
+ while (reader.pos < end) {
1335
+ const tag = reader.uint32();
1336
+ switch (tag >>> 3) {
1337
+ case 1: {
1338
+ if (tag !== 10) {
1339
+ break;
1340
+ }
1341
+ message.tiltAngle = message_formats_1.TiltAngle.decode(reader, reader.uint32());
1342
+ continue;
1343
+ }
1344
+ }
1345
+ if ((tag & 7) === 4 || tag === 0) {
1346
+ break;
1347
+ }
1348
+ reader.skip(tag & 7);
1349
+ }
1350
+ return message;
1351
+ },
1352
+ fromJSON(object) {
1353
+ return { tiltAngle: isSet(object.tiltAngle) ? message_formats_1.TiltAngle.fromJSON(object.tiltAngle) : undefined };
1354
+ },
1355
+ toJSON(message) {
1356
+ const obj = {};
1357
+ if (message.tiltAngle !== undefined) {
1358
+ obj.tiltAngle = message_formats_1.TiltAngle.toJSON(message.tiltAngle);
1359
+ }
1360
+ return obj;
1361
+ },
1362
+ create(base) {
1363
+ return exports.TiltMainCameraCommand.fromPartial(base ?? {});
1364
+ },
1365
+ fromPartial(object) {
1366
+ const message = createBaseTiltMainCameraCommand();
1367
+ message.tiltAngle = (object.tiltAngle !== undefined && object.tiltAngle !== null)
1368
+ ? message_formats_1.TiltAngle.fromPartial(object.tiltAngle)
1369
+ : undefined;
1370
+ return message;
1371
+ },
1372
+ };
1373
+ function createBaseTiltMultibeamCommand() {
1374
+ return { multibeamServo: undefined };
1375
+ }
1376
+ exports.TiltMultibeamCommand = {
1377
+ encode(message, writer = new wire_1.BinaryWriter()) {
1378
+ if (message.multibeamServo !== undefined) {
1379
+ message_formats_1.MultibeamServo.encode(message.multibeamServo, writer.uint32(10).fork()).join();
1380
+ }
1381
+ return writer;
1382
+ },
1383
+ decode(input, length) {
1384
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1385
+ const end = length === undefined ? reader.len : reader.pos + length;
1386
+ const message = createBaseTiltMultibeamCommand();
1387
+ while (reader.pos < end) {
1388
+ const tag = reader.uint32();
1389
+ switch (tag >>> 3) {
1390
+ case 1: {
1391
+ if (tag !== 10) {
1392
+ break;
1393
+ }
1394
+ message.multibeamServo = message_formats_1.MultibeamServo.decode(reader, reader.uint32());
1395
+ continue;
1396
+ }
1397
+ }
1398
+ if ((tag & 7) === 4 || tag === 0) {
1399
+ break;
1400
+ }
1401
+ reader.skip(tag & 7);
1402
+ }
1403
+ return message;
1404
+ },
1405
+ fromJSON(object) {
1406
+ return {
1407
+ multibeamServo: isSet(object.multibeamServo) ? message_formats_1.MultibeamServo.fromJSON(object.multibeamServo) : undefined,
1408
+ };
1409
+ },
1410
+ toJSON(message) {
1411
+ const obj = {};
1412
+ if (message.multibeamServo !== undefined) {
1413
+ obj.multibeamServo = message_formats_1.MultibeamServo.toJSON(message.multibeamServo);
1414
+ }
1415
+ return obj;
1416
+ },
1417
+ create(base) {
1418
+ return exports.TiltMultibeamCommand.fromPartial(base ?? {});
1419
+ },
1420
+ fromPartial(object) {
1421
+ const message = createBaseTiltMultibeamCommand();
1422
+ message.multibeamServo = (object.multibeamServo !== undefined && object.multibeamServo !== null)
1423
+ ? message_formats_1.MultibeamServo.fromPartial(object.multibeamServo)
1424
+ : undefined;
1425
+ return message;
1426
+ },
1427
+ };
1428
+ function createBaseWaitForCommand() {
1429
+ return { waitForSeconds: 0 };
1430
+ }
1431
+ exports.WaitForCommand = {
1432
+ encode(message, writer = new wire_1.BinaryWriter()) {
1433
+ if (message.waitForSeconds !== 0) {
1434
+ writer.uint32(13).float(message.waitForSeconds);
1435
+ }
1436
+ return writer;
1437
+ },
1438
+ decode(input, length) {
1439
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1440
+ const end = length === undefined ? reader.len : reader.pos + length;
1441
+ const message = createBaseWaitForCommand();
1442
+ while (reader.pos < end) {
1443
+ const tag = reader.uint32();
1444
+ switch (tag >>> 3) {
1445
+ case 1: {
1446
+ if (tag !== 13) {
1447
+ break;
1448
+ }
1449
+ message.waitForSeconds = reader.float();
1450
+ continue;
1451
+ }
1452
+ }
1453
+ if ((tag & 7) === 4 || tag === 0) {
1454
+ break;
1455
+ }
1456
+ reader.skip(tag & 7);
1457
+ }
1458
+ return message;
1459
+ },
1460
+ fromJSON(object) {
1461
+ return { waitForSeconds: isSet(object.waitForSeconds) ? gt.Number(object.waitForSeconds) : 0 };
1462
+ },
1463
+ toJSON(message) {
1464
+ const obj = {};
1465
+ if (message.waitForSeconds !== 0) {
1466
+ obj.waitForSeconds = message.waitForSeconds;
1467
+ }
1468
+ return obj;
1469
+ },
1470
+ create(base) {
1471
+ return exports.WaitForCommand.fromPartial(base ?? {});
1472
+ },
1473
+ fromPartial(object) {
1474
+ const message = createBaseWaitForCommand();
1475
+ message.waitForSeconds = object.waitForSeconds ?? 0;
1476
+ return message;
1477
+ },
1478
+ };
1479
+ function createBaseCameraCommand() {
1480
+ return { cameraAction: 0, actionParam: 0 };
1481
+ }
1482
+ exports.CameraCommand = {
1483
+ encode(message, writer = new wire_1.BinaryWriter()) {
1484
+ if (message.cameraAction !== 0) {
1485
+ writer.uint32(8).int32(message.cameraAction);
1486
+ }
1487
+ if (message.actionParam !== 0) {
1488
+ writer.uint32(21).float(message.actionParam);
1489
+ }
1490
+ return writer;
1491
+ },
1492
+ decode(input, length) {
1493
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1494
+ const end = length === undefined ? reader.len : reader.pos + length;
1495
+ const message = createBaseCameraCommand();
1496
+ while (reader.pos < end) {
1497
+ const tag = reader.uint32();
1498
+ switch (tag >>> 3) {
1499
+ case 1: {
1500
+ if (tag !== 8) {
1501
+ break;
1502
+ }
1503
+ message.cameraAction = reader.int32();
1504
+ continue;
1505
+ }
1506
+ case 2: {
1507
+ if (tag !== 21) {
1508
+ break;
1509
+ }
1510
+ message.actionParam = reader.float();
1511
+ continue;
1512
+ }
1513
+ }
1514
+ if ((tag & 7) === 4 || tag === 0) {
1515
+ break;
1516
+ }
1517
+ reader.skip(tag & 7);
1518
+ }
1519
+ return message;
1520
+ },
1521
+ fromJSON(object) {
1522
+ return {
1523
+ cameraAction: isSet(object.cameraAction) ? cameraActionFromJSON(object.cameraAction) : 0,
1524
+ actionParam: isSet(object.actionParam) ? gt.Number(object.actionParam) : 0,
1525
+ };
1526
+ },
1527
+ toJSON(message) {
1528
+ const obj = {};
1529
+ if (message.cameraAction !== 0) {
1530
+ obj.cameraAction = cameraActionToJSON(message.cameraAction);
1531
+ }
1532
+ if (message.actionParam !== 0) {
1533
+ obj.actionParam = message.actionParam;
1534
+ }
1535
+ return obj;
1536
+ },
1537
+ create(base) {
1538
+ return exports.CameraCommand.fromPartial(base ?? {});
1539
+ },
1540
+ fromPartial(object) {
1541
+ const message = createBaseCameraCommand();
1542
+ message.cameraAction = object.cameraAction ?? 0;
1543
+ message.actionParam = object.actionParam ?? 0;
1544
+ return message;
1545
+ },
1546
+ };
1547
+ function createBaseGoToSurfaceCommand() {
1548
+ return { desiredSpeed: 0 };
1549
+ }
1550
+ exports.GoToSurfaceCommand = {
1551
+ encode(message, writer = new wire_1.BinaryWriter()) {
1552
+ if (message.desiredSpeed !== 0) {
1553
+ writer.uint32(13).float(message.desiredSpeed);
1554
+ }
1555
+ return writer;
1556
+ },
1557
+ decode(input, length) {
1558
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1559
+ const end = length === undefined ? reader.len : reader.pos + length;
1560
+ const message = createBaseGoToSurfaceCommand();
1561
+ while (reader.pos < end) {
1562
+ const tag = reader.uint32();
1563
+ switch (tag >>> 3) {
1564
+ case 1: {
1565
+ if (tag !== 13) {
1566
+ break;
1567
+ }
1568
+ message.desiredSpeed = reader.float();
1569
+ continue;
1570
+ }
1571
+ }
1572
+ if ((tag & 7) === 4 || tag === 0) {
1573
+ break;
1574
+ }
1575
+ reader.skip(tag & 7);
1576
+ }
1577
+ return message;
1578
+ },
1579
+ fromJSON(object) {
1580
+ return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
1581
+ },
1582
+ toJSON(message) {
1583
+ const obj = {};
1584
+ if (message.desiredSpeed !== 0) {
1585
+ obj.desiredSpeed = message.desiredSpeed;
1586
+ }
1587
+ return obj;
1588
+ },
1589
+ create(base) {
1590
+ return exports.GoToSurfaceCommand.fromPartial(base ?? {});
1591
+ },
1592
+ fromPartial(object) {
1593
+ const message = createBaseGoToSurfaceCommand();
1594
+ message.desiredSpeed = object.desiredSpeed ?? 0;
1595
+ return message;
1596
+ },
1597
+ };
1598
+ function createBaseGoToSeabedCommand() {
1599
+ return { desiredSpeed: 0 };
1600
+ }
1601
+ exports.GoToSeabedCommand = {
1602
+ encode(message, writer = new wire_1.BinaryWriter()) {
1603
+ if (message.desiredSpeed !== 0) {
1604
+ writer.uint32(13).float(message.desiredSpeed);
1605
+ }
1606
+ return writer;
1607
+ },
1608
+ decode(input, length) {
1609
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1610
+ const end = length === undefined ? reader.len : reader.pos + length;
1611
+ const message = createBaseGoToSeabedCommand();
1612
+ while (reader.pos < end) {
1613
+ const tag = reader.uint32();
1614
+ switch (tag >>> 3) {
1615
+ case 1: {
1616
+ if (tag !== 13) {
1617
+ break;
1618
+ }
1619
+ message.desiredSpeed = reader.float();
1620
+ continue;
1621
+ }
1622
+ }
1623
+ if ((tag & 7) === 4 || tag === 0) {
1624
+ break;
1625
+ }
1626
+ reader.skip(tag & 7);
1627
+ }
1628
+ return message;
1629
+ },
1630
+ fromJSON(object) {
1631
+ return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
1632
+ },
1633
+ toJSON(message) {
1634
+ const obj = {};
1635
+ if (message.desiredSpeed !== 0) {
1636
+ obj.desiredSpeed = message.desiredSpeed;
1637
+ }
1638
+ return obj;
1639
+ },
1640
+ create(base) {
1641
+ return exports.GoToSeabedCommand.fromPartial(base ?? {});
1642
+ },
1643
+ fromPartial(object) {
1644
+ const message = createBaseGoToSeabedCommand();
1645
+ message.desiredSpeed = object.desiredSpeed ?? 0;
1646
+ return message;
1647
+ },
1648
+ };
1649
+ function createBaseGoToHomeCommand() {
1650
+ return { desiredSpeed: 0 };
1651
+ }
1652
+ exports.GoToHomeCommand = {
1653
+ encode(message, writer = new wire_1.BinaryWriter()) {
1654
+ if (message.desiredSpeed !== 0) {
1655
+ writer.uint32(13).float(message.desiredSpeed);
1656
+ }
1657
+ return writer;
1658
+ },
1659
+ decode(input, length) {
1660
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1661
+ const end = length === undefined ? reader.len : reader.pos + length;
1662
+ const message = createBaseGoToHomeCommand();
1663
+ while (reader.pos < end) {
1664
+ const tag = reader.uint32();
1665
+ switch (tag >>> 3) {
1666
+ case 1: {
1667
+ if (tag !== 13) {
1668
+ break;
1669
+ }
1670
+ message.desiredSpeed = reader.float();
1671
+ continue;
1672
+ }
1673
+ }
1674
+ if ((tag & 7) === 4 || tag === 0) {
1675
+ break;
1676
+ }
1677
+ reader.skip(tag & 7);
1678
+ }
1679
+ return message;
1680
+ },
1681
+ fromJSON(object) {
1682
+ return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
1683
+ },
1684
+ toJSON(message) {
1685
+ const obj = {};
1686
+ if (message.desiredSpeed !== 0) {
1687
+ obj.desiredSpeed = message.desiredSpeed;
1688
+ }
1689
+ return obj;
1690
+ },
1691
+ create(base) {
1692
+ return exports.GoToHomeCommand.fromPartial(base ?? {});
1693
+ },
1694
+ fromPartial(object) {
1695
+ const message = createBaseGoToHomeCommand();
1696
+ message.desiredSpeed = object.desiredSpeed ?? 0;
1697
+ return message;
1698
+ },
1699
+ };
1700
+ function createBaseSurveyCommand() {
1701
+ return {
1702
+ vertices: [],
1703
+ surveyLineHeading: 0,
1704
+ laneSpacing: 0,
1705
+ turnaroundDistance: 0,
1706
+ cruiseSpeed: 0,
1707
+ circleOfAcceptance: 0,
1708
+ depthSetPoint: undefined,
1709
+ reverse: false,
1710
+ waypoints: [],
1711
+ swathWidth: 0,
1712
+ overlapPercent: 0,
1713
+ };
1714
+ }
1715
+ exports.SurveyCommand = {
1716
+ encode(message, writer = new wire_1.BinaryWriter()) {
1717
+ for (const v of message.vertices) {
1718
+ message_formats_1.LatLongPosition.encode(v, writer.uint32(10).fork()).join();
1719
+ }
1720
+ if (message.surveyLineHeading !== 0) {
1721
+ writer.uint32(21).float(message.surveyLineHeading);
1722
+ }
1723
+ if (message.laneSpacing !== 0) {
1724
+ writer.uint32(29).float(message.laneSpacing);
1725
+ }
1726
+ if (message.turnaroundDistance !== 0) {
1727
+ writer.uint32(37).float(message.turnaroundDistance);
1728
+ }
1729
+ if (message.cruiseSpeed !== 0) {
1730
+ writer.uint32(45).float(message.cruiseSpeed);
1731
+ }
1732
+ if (message.circleOfAcceptance !== 0) {
1733
+ writer.uint32(53).float(message.circleOfAcceptance);
1734
+ }
1735
+ if (message.depthSetPoint !== undefined) {
1736
+ exports.DepthSetPoint.encode(message.depthSetPoint, writer.uint32(58).fork()).join();
1737
+ }
1738
+ if (message.reverse !== false) {
1739
+ writer.uint32(64).bool(message.reverse);
1740
+ }
1741
+ for (const v of message.waypoints) {
1742
+ exports.Waypoint.encode(v, writer.uint32(74).fork()).join();
1743
+ }
1744
+ if (message.swathWidth !== 0) {
1745
+ writer.uint32(85).float(message.swathWidth);
1746
+ }
1747
+ if (message.overlapPercent !== 0) {
1748
+ writer.uint32(93).float(message.overlapPercent);
1749
+ }
1750
+ return writer;
1751
+ },
1752
+ decode(input, length) {
1753
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1754
+ const end = length === undefined ? reader.len : reader.pos + length;
1755
+ const message = createBaseSurveyCommand();
1756
+ while (reader.pos < end) {
1757
+ const tag = reader.uint32();
1758
+ switch (tag >>> 3) {
1759
+ case 1: {
1760
+ if (tag !== 10) {
1761
+ break;
1762
+ }
1763
+ message.vertices.push(message_formats_1.LatLongPosition.decode(reader, reader.uint32()));
1764
+ continue;
1765
+ }
1766
+ case 2: {
1767
+ if (tag !== 21) {
1768
+ break;
1769
+ }
1770
+ message.surveyLineHeading = reader.float();
1771
+ continue;
1772
+ }
1773
+ case 3: {
1774
+ if (tag !== 29) {
1775
+ break;
1776
+ }
1777
+ message.laneSpacing = reader.float();
1778
+ continue;
1779
+ }
1780
+ case 4: {
1781
+ if (tag !== 37) {
1782
+ break;
1783
+ }
1784
+ message.turnaroundDistance = reader.float();
1785
+ continue;
1786
+ }
1787
+ case 5: {
1788
+ if (tag !== 45) {
1789
+ break;
1790
+ }
1791
+ message.cruiseSpeed = reader.float();
1792
+ continue;
1793
+ }
1794
+ case 6: {
1795
+ if (tag !== 53) {
1796
+ break;
1797
+ }
1798
+ message.circleOfAcceptance = reader.float();
1799
+ continue;
1800
+ }
1801
+ case 7: {
1802
+ if (tag !== 58) {
1803
+ break;
1804
+ }
1805
+ message.depthSetPoint = exports.DepthSetPoint.decode(reader, reader.uint32());
1806
+ continue;
1807
+ }
1808
+ case 8: {
1809
+ if (tag !== 64) {
1810
+ break;
1811
+ }
1812
+ message.reverse = reader.bool();
1813
+ continue;
1814
+ }
1815
+ case 9: {
1816
+ if (tag !== 74) {
1817
+ break;
1818
+ }
1819
+ message.waypoints.push(exports.Waypoint.decode(reader, reader.uint32()));
1820
+ continue;
1821
+ }
1822
+ case 10: {
1823
+ if (tag !== 85) {
1824
+ break;
1825
+ }
1826
+ message.swathWidth = reader.float();
1827
+ continue;
1828
+ }
1829
+ case 11: {
1830
+ if (tag !== 93) {
1831
+ break;
1832
+ }
1833
+ message.overlapPercent = reader.float();
1834
+ continue;
1835
+ }
1836
+ }
1837
+ if ((tag & 7) === 4 || tag === 0) {
1838
+ break;
1839
+ }
1840
+ reader.skip(tag & 7);
1841
+ }
1842
+ return message;
1843
+ },
1844
+ fromJSON(object) {
1845
+ return {
1846
+ vertices: gt.Array.isArray(object?.vertices) ? object.vertices.map((e) => message_formats_1.LatLongPosition.fromJSON(e)) : [],
1847
+ surveyLineHeading: isSet(object.surveyLineHeading) ? gt.Number(object.surveyLineHeading) : 0,
1848
+ laneSpacing: isSet(object.laneSpacing) ? gt.Number(object.laneSpacing) : 0,
1849
+ turnaroundDistance: isSet(object.turnaroundDistance) ? gt.Number(object.turnaroundDistance) : 0,
1850
+ cruiseSpeed: isSet(object.cruiseSpeed) ? gt.Number(object.cruiseSpeed) : 0,
1851
+ circleOfAcceptance: isSet(object.circleOfAcceptance) ? gt.Number(object.circleOfAcceptance) : 0,
1852
+ depthSetPoint: isSet(object.depthSetPoint) ? exports.DepthSetPoint.fromJSON(object.depthSetPoint) : undefined,
1853
+ reverse: isSet(object.reverse) ? gt.Boolean(object.reverse) : false,
1854
+ waypoints: gt.Array.isArray(object?.waypoints) ? object.waypoints.map((e) => exports.Waypoint.fromJSON(e)) : [],
1855
+ swathWidth: isSet(object.swathWidth) ? gt.Number(object.swathWidth) : 0,
1856
+ overlapPercent: isSet(object.overlapPercent) ? gt.Number(object.overlapPercent) : 0,
1857
+ };
1858
+ },
1859
+ toJSON(message) {
1860
+ const obj = {};
1861
+ if (message.vertices?.length) {
1862
+ obj.vertices = message.vertices.map((e) => message_formats_1.LatLongPosition.toJSON(e));
1863
+ }
1864
+ if (message.surveyLineHeading !== 0) {
1865
+ obj.surveyLineHeading = message.surveyLineHeading;
1866
+ }
1867
+ if (message.laneSpacing !== 0) {
1868
+ obj.laneSpacing = message.laneSpacing;
1869
+ }
1870
+ if (message.turnaroundDistance !== 0) {
1871
+ obj.turnaroundDistance = message.turnaroundDistance;
1872
+ }
1873
+ if (message.cruiseSpeed !== 0) {
1874
+ obj.cruiseSpeed = message.cruiseSpeed;
1875
+ }
1876
+ if (message.circleOfAcceptance !== 0) {
1877
+ obj.circleOfAcceptance = message.circleOfAcceptance;
1878
+ }
1879
+ if (message.depthSetPoint !== undefined) {
1880
+ obj.depthSetPoint = exports.DepthSetPoint.toJSON(message.depthSetPoint);
1881
+ }
1882
+ if (message.reverse !== false) {
1883
+ obj.reverse = message.reverse;
1884
+ }
1885
+ if (message.waypoints?.length) {
1886
+ obj.waypoints = message.waypoints.map((e) => exports.Waypoint.toJSON(e));
1887
+ }
1888
+ if (message.swathWidth !== 0) {
1889
+ obj.swathWidth = message.swathWidth;
1890
+ }
1891
+ if (message.overlapPercent !== 0) {
1892
+ obj.overlapPercent = message.overlapPercent;
1893
+ }
1894
+ return obj;
1895
+ },
1896
+ create(base) {
1897
+ return exports.SurveyCommand.fromPartial(base ?? {});
1898
+ },
1899
+ fromPartial(object) {
1900
+ const message = createBaseSurveyCommand();
1901
+ message.vertices = object.vertices?.map((e) => message_formats_1.LatLongPosition.fromPartial(e)) || [];
1902
+ message.surveyLineHeading = object.surveyLineHeading ?? 0;
1903
+ message.laneSpacing = object.laneSpacing ?? 0;
1904
+ message.turnaroundDistance = object.turnaroundDistance ?? 0;
1905
+ message.cruiseSpeed = object.cruiseSpeed ?? 0;
1906
+ message.circleOfAcceptance = object.circleOfAcceptance ?? 0;
1907
+ message.depthSetPoint = (object.depthSetPoint !== undefined && object.depthSetPoint !== null)
1908
+ ? exports.DepthSetPoint.fromPartial(object.depthSetPoint)
1909
+ : undefined;
1910
+ message.reverse = object.reverse ?? false;
1911
+ message.waypoints = object.waypoints?.map((e) => exports.Waypoint.fromPartial(e)) || [];
1912
+ message.swathWidth = object.swathWidth ?? 0;
1913
+ message.overlapPercent = object.overlapPercent ?? 0;
1914
+ return message;
1915
+ },
1916
+ };
1917
+ function createBasePathSegment() {
1918
+ return {
1919
+ id: 0,
1920
+ speedToTarget: 0,
1921
+ courseToTarget: 0,
1922
+ depthSpeed: 0,
1923
+ horizontalLength: 0,
1924
+ verticalLength: 0,
1925
+ fromWpId: 0,
1926
+ toWpId: 0,
1927
+ durationTime: 0,
1928
+ };
1929
+ }
1930
+ exports.PathSegment = {
1931
+ encode(message, writer = new wire_1.BinaryWriter()) {
1932
+ if (message.id !== 0) {
1933
+ writer.uint32(8).uint32(message.id);
1934
+ }
1935
+ if (message.speedToTarget !== 0) {
1936
+ writer.uint32(21).float(message.speedToTarget);
1937
+ }
1938
+ if (message.courseToTarget !== 0) {
1939
+ writer.uint32(29).float(message.courseToTarget);
1940
+ }
1941
+ if (message.depthSpeed !== 0) {
1942
+ writer.uint32(37).float(message.depthSpeed);
1943
+ }
1944
+ if (message.horizontalLength !== 0) {
1945
+ writer.uint32(45).float(message.horizontalLength);
1946
+ }
1947
+ if (message.verticalLength !== 0) {
1948
+ writer.uint32(53).float(message.verticalLength);
1949
+ }
1950
+ if (message.fromWpId !== 0) {
1951
+ writer.uint32(56).uint32(message.fromWpId);
1952
+ }
1953
+ if (message.toWpId !== 0) {
1954
+ writer.uint32(64).uint32(message.toWpId);
1955
+ }
1956
+ if (message.durationTime !== 0) {
1957
+ writer.uint32(77).float(message.durationTime);
1958
+ }
1959
+ return writer;
1960
+ },
1961
+ decode(input, length) {
1962
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1963
+ const end = length === undefined ? reader.len : reader.pos + length;
1964
+ const message = createBasePathSegment();
1965
+ while (reader.pos < end) {
1966
+ const tag = reader.uint32();
1967
+ switch (tag >>> 3) {
1968
+ case 1: {
1969
+ if (tag !== 8) {
1970
+ break;
1971
+ }
1972
+ message.id = reader.uint32();
1973
+ continue;
1974
+ }
1975
+ case 2: {
1976
+ if (tag !== 21) {
1977
+ break;
1978
+ }
1979
+ message.speedToTarget = reader.float();
1980
+ continue;
1981
+ }
1982
+ case 3: {
1983
+ if (tag !== 29) {
1984
+ break;
1985
+ }
1986
+ message.courseToTarget = reader.float();
1987
+ continue;
1988
+ }
1989
+ case 4: {
1990
+ if (tag !== 37) {
1991
+ break;
1992
+ }
1993
+ message.depthSpeed = reader.float();
1994
+ continue;
1995
+ }
1996
+ case 5: {
1997
+ if (tag !== 45) {
1998
+ break;
1999
+ }
2000
+ message.horizontalLength = reader.float();
2001
+ continue;
2002
+ }
2003
+ case 6: {
2004
+ if (tag !== 53) {
2005
+ break;
2006
+ }
2007
+ message.verticalLength = reader.float();
2008
+ continue;
2009
+ }
2010
+ case 7: {
2011
+ if (tag !== 56) {
2012
+ break;
2013
+ }
2014
+ message.fromWpId = reader.uint32();
2015
+ continue;
2016
+ }
2017
+ case 8: {
2018
+ if (tag !== 64) {
2019
+ break;
2020
+ }
2021
+ message.toWpId = reader.uint32();
2022
+ continue;
2023
+ }
2024
+ case 9: {
2025
+ if (tag !== 77) {
2026
+ break;
2027
+ }
2028
+ message.durationTime = reader.float();
2029
+ continue;
2030
+ }
2031
+ }
2032
+ if ((tag & 7) === 4 || tag === 0) {
2033
+ break;
2034
+ }
2035
+ reader.skip(tag & 7);
2036
+ }
2037
+ return message;
2038
+ },
2039
+ fromJSON(object) {
2040
+ return {
2041
+ id: isSet(object.id) ? gt.Number(object.id) : 0,
2042
+ speedToTarget: isSet(object.speedToTarget) ? gt.Number(object.speedToTarget) : 0,
2043
+ courseToTarget: isSet(object.courseToTarget) ? gt.Number(object.courseToTarget) : 0,
2044
+ depthSpeed: isSet(object.depthSpeed) ? gt.Number(object.depthSpeed) : 0,
2045
+ horizontalLength: isSet(object.horizontalLength) ? gt.Number(object.horizontalLength) : 0,
2046
+ verticalLength: isSet(object.verticalLength) ? gt.Number(object.verticalLength) : 0,
2047
+ fromWpId: isSet(object.fromWpId) ? gt.Number(object.fromWpId) : 0,
2048
+ toWpId: isSet(object.toWpId) ? gt.Number(object.toWpId) : 0,
2049
+ durationTime: isSet(object.durationTime) ? gt.Number(object.durationTime) : 0,
2050
+ };
2051
+ },
2052
+ toJSON(message) {
2053
+ const obj = {};
2054
+ if (message.id !== 0) {
2055
+ obj.id = Math.round(message.id);
2056
+ }
2057
+ if (message.speedToTarget !== 0) {
2058
+ obj.speedToTarget = message.speedToTarget;
2059
+ }
2060
+ if (message.courseToTarget !== 0) {
2061
+ obj.courseToTarget = message.courseToTarget;
2062
+ }
2063
+ if (message.depthSpeed !== 0) {
2064
+ obj.depthSpeed = message.depthSpeed;
2065
+ }
2066
+ if (message.horizontalLength !== 0) {
2067
+ obj.horizontalLength = message.horizontalLength;
2068
+ }
2069
+ if (message.verticalLength !== 0) {
2070
+ obj.verticalLength = message.verticalLength;
2071
+ }
2072
+ if (message.fromWpId !== 0) {
2073
+ obj.fromWpId = Math.round(message.fromWpId);
2074
+ }
2075
+ if (message.toWpId !== 0) {
2076
+ obj.toWpId = Math.round(message.toWpId);
2077
+ }
2078
+ if (message.durationTime !== 0) {
2079
+ obj.durationTime = message.durationTime;
2080
+ }
2081
+ return obj;
2082
+ },
2083
+ create(base) {
2084
+ return exports.PathSegment.fromPartial(base ?? {});
2085
+ },
2086
+ fromPartial(object) {
2087
+ const message = createBasePathSegment();
2088
+ message.id = object.id ?? 0;
2089
+ message.speedToTarget = object.speedToTarget ?? 0;
2090
+ message.courseToTarget = object.courseToTarget ?? 0;
2091
+ message.depthSpeed = object.depthSpeed ?? 0;
2092
+ message.horizontalLength = object.horizontalLength ?? 0;
2093
+ message.verticalLength = object.verticalLength ?? 0;
2094
+ message.fromWpId = object.fromWpId ?? 0;
2095
+ message.toWpId = object.toWpId ?? 0;
2096
+ message.durationTime = object.durationTime ?? 0;
2097
+ return message;
2098
+ },
2099
+ };
2100
+ function createBaseReferenceAutoPilot() {
2101
+ return {
2102
+ instructionType: 0,
2103
+ activeInstructionId: 0,
2104
+ activePathSegmentId: 0,
2105
+ courseToTarget: 0,
2106
+ speedOverGround: 0,
2107
+ horizontalDistanceToTarget: 0,
2108
+ circleOfAcceptance: 0,
2109
+ depthSetPoint: 0,
2110
+ heaveVelocity: 0,
2111
+ verticalDistanceToTarget: 0,
2112
+ depthZeroReference: 0,
2113
+ timeToComplete: 0,
2114
+ };
2115
+ }
2116
+ exports.ReferenceAutoPilot = {
2117
+ encode(message, writer = new wire_1.BinaryWriter()) {
2118
+ if (message.instructionType !== 0) {
2119
+ writer.uint32(8).int32(message.instructionType);
2120
+ }
2121
+ if (message.activeInstructionId !== 0) {
2122
+ writer.uint32(16).uint32(message.activeInstructionId);
2123
+ }
2124
+ if (message.activePathSegmentId !== 0) {
2125
+ writer.uint32(24).uint32(message.activePathSegmentId);
2126
+ }
2127
+ if (message.courseToTarget !== 0) {
2128
+ writer.uint32(37).float(message.courseToTarget);
2129
+ }
2130
+ if (message.speedOverGround !== 0) {
2131
+ writer.uint32(45).float(message.speedOverGround);
2132
+ }
2133
+ if (message.horizontalDistanceToTarget !== 0) {
2134
+ writer.uint32(53).float(message.horizontalDistanceToTarget);
2135
+ }
2136
+ if (message.circleOfAcceptance !== 0) {
2137
+ writer.uint32(61).float(message.circleOfAcceptance);
2138
+ }
2139
+ if (message.depthSetPoint !== 0) {
2140
+ writer.uint32(69).float(message.depthSetPoint);
2141
+ }
2142
+ if (message.heaveVelocity !== 0) {
2143
+ writer.uint32(77).float(message.heaveVelocity);
2144
+ }
2145
+ if (message.verticalDistanceToTarget !== 0) {
2146
+ writer.uint32(85).float(message.verticalDistanceToTarget);
2147
+ }
2148
+ if (message.depthZeroReference !== 0) {
2149
+ writer.uint32(88).int32(message.depthZeroReference);
2150
+ }
2151
+ if (message.timeToComplete !== 0) {
2152
+ writer.uint32(101).float(message.timeToComplete);
2153
+ }
2154
+ return writer;
2155
+ },
2156
+ decode(input, length) {
2157
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2158
+ const end = length === undefined ? reader.len : reader.pos + length;
2159
+ const message = createBaseReferenceAutoPilot();
2160
+ while (reader.pos < end) {
2161
+ const tag = reader.uint32();
2162
+ switch (tag >>> 3) {
2163
+ case 1: {
2164
+ if (tag !== 8) {
2165
+ break;
2166
+ }
2167
+ message.instructionType = reader.int32();
2168
+ continue;
2169
+ }
2170
+ case 2: {
2171
+ if (tag !== 16) {
2172
+ break;
2173
+ }
2174
+ message.activeInstructionId = reader.uint32();
2175
+ continue;
2176
+ }
2177
+ case 3: {
2178
+ if (tag !== 24) {
2179
+ break;
2180
+ }
2181
+ message.activePathSegmentId = reader.uint32();
2182
+ continue;
2183
+ }
2184
+ case 4: {
2185
+ if (tag !== 37) {
2186
+ break;
2187
+ }
2188
+ message.courseToTarget = reader.float();
2189
+ continue;
2190
+ }
2191
+ case 5: {
2192
+ if (tag !== 45) {
2193
+ break;
2194
+ }
2195
+ message.speedOverGround = reader.float();
2196
+ continue;
2197
+ }
2198
+ case 6: {
2199
+ if (tag !== 53) {
2200
+ break;
2201
+ }
2202
+ message.horizontalDistanceToTarget = reader.float();
2203
+ continue;
2204
+ }
2205
+ case 7: {
2206
+ if (tag !== 61) {
2207
+ break;
2208
+ }
2209
+ message.circleOfAcceptance = reader.float();
2210
+ continue;
2211
+ }
2212
+ case 8: {
2213
+ if (tag !== 69) {
2214
+ break;
2215
+ }
2216
+ message.depthSetPoint = reader.float();
2217
+ continue;
2218
+ }
2219
+ case 9: {
2220
+ if (tag !== 77) {
2221
+ break;
2222
+ }
2223
+ message.heaveVelocity = reader.float();
2224
+ continue;
2225
+ }
2226
+ case 10: {
2227
+ if (tag !== 85) {
2228
+ break;
2229
+ }
2230
+ message.verticalDistanceToTarget = reader.float();
2231
+ continue;
2232
+ }
2233
+ case 11: {
2234
+ if (tag !== 88) {
2235
+ break;
2236
+ }
2237
+ message.depthZeroReference = reader.int32();
2238
+ continue;
2239
+ }
2240
+ case 12: {
2241
+ if (tag !== 101) {
2242
+ break;
2243
+ }
2244
+ message.timeToComplete = reader.float();
2245
+ continue;
2246
+ }
2247
+ }
2248
+ if ((tag & 7) === 4 || tag === 0) {
2249
+ break;
2250
+ }
2251
+ reader.skip(tag & 7);
2252
+ }
2253
+ return message;
2254
+ },
2255
+ fromJSON(object) {
2256
+ return {
2257
+ instructionType: isSet(object.instructionType) ? instructionTypeFromJSON(object.instructionType) : 0,
2258
+ activeInstructionId: isSet(object.activeInstructionId) ? gt.Number(object.activeInstructionId) : 0,
2259
+ activePathSegmentId: isSet(object.activePathSegmentId) ? gt.Number(object.activePathSegmentId) : 0,
2260
+ courseToTarget: isSet(object.courseToTarget) ? gt.Number(object.courseToTarget) : 0,
2261
+ speedOverGround: isSet(object.speedOverGround) ? gt.Number(object.speedOverGround) : 0,
2262
+ horizontalDistanceToTarget: isSet(object.horizontalDistanceToTarget)
2263
+ ? gt.Number(object.horizontalDistanceToTarget)
2264
+ : 0,
2265
+ circleOfAcceptance: isSet(object.circleOfAcceptance) ? gt.Number(object.circleOfAcceptance) : 0,
2266
+ depthSetPoint: isSet(object.depthSetPoint) ? gt.Number(object.depthSetPoint) : 0,
2267
+ heaveVelocity: isSet(object.heaveVelocity) ? gt.Number(object.heaveVelocity) : 0,
2268
+ verticalDistanceToTarget: isSet(object.verticalDistanceToTarget) ? gt.Number(object.verticalDistanceToTarget) : 0,
2269
+ depthZeroReference: isSet(object.depthZeroReference) ? depthZeroReferenceFromJSON(object.depthZeroReference) : 0,
2270
+ timeToComplete: isSet(object.timeToComplete) ? gt.Number(object.timeToComplete) : 0,
2271
+ };
2272
+ },
2273
+ toJSON(message) {
2274
+ const obj = {};
2275
+ if (message.instructionType !== 0) {
2276
+ obj.instructionType = instructionTypeToJSON(message.instructionType);
2277
+ }
2278
+ if (message.activeInstructionId !== 0) {
2279
+ obj.activeInstructionId = Math.round(message.activeInstructionId);
2280
+ }
2281
+ if (message.activePathSegmentId !== 0) {
2282
+ obj.activePathSegmentId = Math.round(message.activePathSegmentId);
2283
+ }
2284
+ if (message.courseToTarget !== 0) {
2285
+ obj.courseToTarget = message.courseToTarget;
2286
+ }
2287
+ if (message.speedOverGround !== 0) {
2288
+ obj.speedOverGround = message.speedOverGround;
2289
+ }
2290
+ if (message.horizontalDistanceToTarget !== 0) {
2291
+ obj.horizontalDistanceToTarget = message.horizontalDistanceToTarget;
2292
+ }
2293
+ if (message.circleOfAcceptance !== 0) {
2294
+ obj.circleOfAcceptance = message.circleOfAcceptance;
2295
+ }
2296
+ if (message.depthSetPoint !== 0) {
2297
+ obj.depthSetPoint = message.depthSetPoint;
2298
+ }
2299
+ if (message.heaveVelocity !== 0) {
2300
+ obj.heaveVelocity = message.heaveVelocity;
2301
+ }
2302
+ if (message.verticalDistanceToTarget !== 0) {
2303
+ obj.verticalDistanceToTarget = message.verticalDistanceToTarget;
2304
+ }
2305
+ if (message.depthZeroReference !== 0) {
2306
+ obj.depthZeroReference = depthZeroReferenceToJSON(message.depthZeroReference);
2307
+ }
2308
+ if (message.timeToComplete !== 0) {
2309
+ obj.timeToComplete = message.timeToComplete;
2310
+ }
2311
+ return obj;
2312
+ },
2313
+ create(base) {
2314
+ return exports.ReferenceAutoPilot.fromPartial(base ?? {});
2315
+ },
2316
+ fromPartial(object) {
2317
+ const message = createBaseReferenceAutoPilot();
2318
+ message.instructionType = object.instructionType ?? 0;
2319
+ message.activeInstructionId = object.activeInstructionId ?? 0;
2320
+ message.activePathSegmentId = object.activePathSegmentId ?? 0;
2321
+ message.courseToTarget = object.courseToTarget ?? 0;
2322
+ message.speedOverGround = object.speedOverGround ?? 0;
2323
+ message.horizontalDistanceToTarget = object.horizontalDistanceToTarget ?? 0;
2324
+ message.circleOfAcceptance = object.circleOfAcceptance ?? 0;
2325
+ message.depthSetPoint = object.depthSetPoint ?? 0;
2326
+ message.heaveVelocity = object.heaveVelocity ?? 0;
2327
+ message.verticalDistanceToTarget = object.verticalDistanceToTarget ?? 0;
2328
+ message.depthZeroReference = object.depthZeroReference ?? 0;
2329
+ message.timeToComplete = object.timeToComplete ?? 0;
2330
+ return message;
2331
+ },
2332
+ };
2333
+ function createBaseMissionStatus() {
2334
+ return {
2335
+ state: 0,
2336
+ timeElapsed: 0,
2337
+ estimatedTimeToComplete: 0,
2338
+ distanceToComplete: 0,
2339
+ completedInstructionIds: [],
2340
+ totalNumberOfInstructions: 0,
2341
+ completedPathSegmentIds: [],
2342
+ totalNumberOfPathSegments: 0,
2343
+ id: 0,
2344
+ };
2345
+ }
2346
+ exports.MissionStatus = {
2347
+ encode(message, writer = new wire_1.BinaryWriter()) {
2348
+ if (message.state !== 0) {
2349
+ writer.uint32(8).int32(message.state);
2350
+ }
2351
+ if (message.timeElapsed !== 0) {
2352
+ writer.uint32(16).uint32(message.timeElapsed);
2353
+ }
2354
+ if (message.estimatedTimeToComplete !== 0) {
2355
+ writer.uint32(24).uint32(message.estimatedTimeToComplete);
2356
+ }
2357
+ if (message.distanceToComplete !== 0) {
2358
+ writer.uint32(32).uint32(message.distanceToComplete);
2359
+ }
2360
+ writer.uint32(42).fork();
2361
+ for (const v of message.completedInstructionIds) {
2362
+ writer.uint32(v);
2363
+ }
2364
+ writer.join();
2365
+ if (message.totalNumberOfInstructions !== 0) {
2366
+ writer.uint32(48).uint32(message.totalNumberOfInstructions);
2367
+ }
2368
+ writer.uint32(58).fork();
2369
+ for (const v of message.completedPathSegmentIds) {
2370
+ writer.uint32(v);
2371
+ }
2372
+ writer.join();
2373
+ if (message.totalNumberOfPathSegments !== 0) {
2374
+ writer.uint32(64).uint32(message.totalNumberOfPathSegments);
2375
+ }
2376
+ if (message.id !== 0) {
2377
+ writer.uint32(72).uint32(message.id);
2378
+ }
2379
+ return writer;
2380
+ },
2381
+ decode(input, length) {
2382
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2383
+ const end = length === undefined ? reader.len : reader.pos + length;
2384
+ const message = createBaseMissionStatus();
2385
+ while (reader.pos < end) {
2386
+ const tag = reader.uint32();
2387
+ switch (tag >>> 3) {
2388
+ case 1: {
2389
+ if (tag !== 8) {
2390
+ break;
2391
+ }
2392
+ message.state = reader.int32();
2393
+ continue;
2394
+ }
2395
+ case 2: {
2396
+ if (tag !== 16) {
2397
+ break;
2398
+ }
2399
+ message.timeElapsed = reader.uint32();
2400
+ continue;
2401
+ }
2402
+ case 3: {
2403
+ if (tag !== 24) {
2404
+ break;
2405
+ }
2406
+ message.estimatedTimeToComplete = reader.uint32();
2407
+ continue;
2408
+ }
2409
+ case 4: {
2410
+ if (tag !== 32) {
2411
+ break;
2412
+ }
2413
+ message.distanceToComplete = reader.uint32();
2414
+ continue;
2415
+ }
2416
+ case 5: {
2417
+ if (tag === 40) {
2418
+ message.completedInstructionIds.push(reader.uint32());
2419
+ continue;
2420
+ }
2421
+ if (tag === 42) {
2422
+ const end2 = reader.uint32() + reader.pos;
2423
+ while (reader.pos < end2) {
2424
+ message.completedInstructionIds.push(reader.uint32());
2425
+ }
2426
+ continue;
2427
+ }
2428
+ break;
2429
+ }
2430
+ case 6: {
2431
+ if (tag !== 48) {
2432
+ break;
2433
+ }
2434
+ message.totalNumberOfInstructions = reader.uint32();
2435
+ continue;
2436
+ }
2437
+ case 7: {
2438
+ if (tag === 56) {
2439
+ message.completedPathSegmentIds.push(reader.uint32());
2440
+ continue;
2441
+ }
2442
+ if (tag === 58) {
2443
+ const end2 = reader.uint32() + reader.pos;
2444
+ while (reader.pos < end2) {
2445
+ message.completedPathSegmentIds.push(reader.uint32());
2446
+ }
2447
+ continue;
2448
+ }
2449
+ break;
2450
+ }
2451
+ case 8: {
2452
+ if (tag !== 64) {
2453
+ break;
2454
+ }
2455
+ message.totalNumberOfPathSegments = reader.uint32();
2456
+ continue;
2457
+ }
2458
+ case 9: {
2459
+ if (tag !== 72) {
2460
+ break;
2461
+ }
2462
+ message.id = reader.uint32();
2463
+ continue;
2464
+ }
2465
+ }
2466
+ if ((tag & 7) === 4 || tag === 0) {
2467
+ break;
2468
+ }
2469
+ reader.skip(tag & 7);
2470
+ }
2471
+ return message;
2472
+ },
2473
+ fromJSON(object) {
2474
+ return {
2475
+ state: isSet(object.state) ? missionStateFromJSON(object.state) : 0,
2476
+ timeElapsed: isSet(object.timeElapsed) ? gt.Number(object.timeElapsed) : 0,
2477
+ estimatedTimeToComplete: isSet(object.estimatedTimeToComplete) ? gt.Number(object.estimatedTimeToComplete) : 0,
2478
+ distanceToComplete: isSet(object.distanceToComplete) ? gt.Number(object.distanceToComplete) : 0,
2479
+ completedInstructionIds: gt.Array.isArray(object?.completedInstructionIds)
2480
+ ? object.completedInstructionIds.map((e) => gt.Number(e))
2481
+ : [],
2482
+ totalNumberOfInstructions: isSet(object.totalNumberOfInstructions)
2483
+ ? gt.Number(object.totalNumberOfInstructions)
2484
+ : 0,
2485
+ completedPathSegmentIds: gt.Array.isArray(object?.completedPathSegmentIds)
2486
+ ? object.completedPathSegmentIds.map((e) => gt.Number(e))
2487
+ : [],
2488
+ totalNumberOfPathSegments: isSet(object.totalNumberOfPathSegments)
2489
+ ? gt.Number(object.totalNumberOfPathSegments)
2490
+ : 0,
2491
+ id: isSet(object.id) ? gt.Number(object.id) : 0,
2492
+ };
2493
+ },
2494
+ toJSON(message) {
2495
+ const obj = {};
2496
+ if (message.state !== 0) {
2497
+ obj.state = missionStateToJSON(message.state);
2498
+ }
2499
+ if (message.timeElapsed !== 0) {
2500
+ obj.timeElapsed = Math.round(message.timeElapsed);
2501
+ }
2502
+ if (message.estimatedTimeToComplete !== 0) {
2503
+ obj.estimatedTimeToComplete = Math.round(message.estimatedTimeToComplete);
2504
+ }
2505
+ if (message.distanceToComplete !== 0) {
2506
+ obj.distanceToComplete = Math.round(message.distanceToComplete);
2507
+ }
2508
+ if (message.completedInstructionIds?.length) {
2509
+ obj.completedInstructionIds = message.completedInstructionIds.map((e) => Math.round(e));
2510
+ }
2511
+ if (message.totalNumberOfInstructions !== 0) {
2512
+ obj.totalNumberOfInstructions = Math.round(message.totalNumberOfInstructions);
2513
+ }
2514
+ if (message.completedPathSegmentIds?.length) {
2515
+ obj.completedPathSegmentIds = message.completedPathSegmentIds.map((e) => Math.round(e));
2516
+ }
2517
+ if (message.totalNumberOfPathSegments !== 0) {
2518
+ obj.totalNumberOfPathSegments = Math.round(message.totalNumberOfPathSegments);
2519
+ }
2520
+ if (message.id !== 0) {
2521
+ obj.id = Math.round(message.id);
2522
+ }
2523
+ return obj;
2524
+ },
2525
+ create(base) {
2526
+ return exports.MissionStatus.fromPartial(base ?? {});
2527
+ },
2528
+ fromPartial(object) {
2529
+ const message = createBaseMissionStatus();
2530
+ message.state = object.state ?? 0;
2531
+ message.timeElapsed = object.timeElapsed ?? 0;
2532
+ message.estimatedTimeToComplete = object.estimatedTimeToComplete ?? 0;
2533
+ message.distanceToComplete = object.distanceToComplete ?? 0;
2534
+ message.completedInstructionIds = object.completedInstructionIds?.map((e) => e) || [];
2535
+ message.totalNumberOfInstructions = object.totalNumberOfInstructions ?? 0;
2536
+ message.completedPathSegmentIds = object.completedPathSegmentIds?.map((e) => e) || [];
2537
+ message.totalNumberOfPathSegments = object.totalNumberOfPathSegments ?? 0;
2538
+ message.id = object.id ?? 0;
2539
+ return message;
2540
+ },
2541
+ };
2542
+ const gt = (() => {
2543
+ if (typeof globalThis !== "undefined") {
2544
+ return globalThis;
2545
+ }
2546
+ if (typeof self !== "undefined") {
2547
+ return self;
2548
+ }
2549
+ if (typeof window !== "undefined") {
2550
+ return window;
2551
+ }
2552
+ if (typeof global !== "undefined") {
2553
+ return global;
2554
+ }
2555
+ throw "Unable to locate global object";
2556
+ })();
2557
+ function isSet(value) {
2558
+ return value !== null && value !== undefined;
2559
+ }