@rise-maritime/keelson-js 0.6.0-alpha.282.dev.1 → 0.6.0-experimental.1
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.
- package/dist/index.d.ts +8 -37
- package/dist/interfaces/ContainerControl.d.ts +7 -0
- package/dist/interfaces/ContainerControl.js +18 -1
- package/dist/interfaces/ContainerHost.d.ts +45 -0
- package/dist/interfaces/ContainerHost.js +332 -1
- package/dist/interfaces/ReplayControl.d.ts +49 -1
- package/dist/interfaces/ReplayControl.js +274 -1
- package/dist/interfaces/Route.d.ts +77 -1
- package/dist/interfaces/Route.js +213 -2
- package/dist/interfaces/serviceRegistry.d.ts +8 -38
- package/dist/interfaces/serviceRegistry.js +0 -2
- package/dist/interfaces.json +0 -1
- package/dist/payloads/AdviceDisposition.d.ts +20 -5
- package/dist/payloads/AdviceDisposition.js +7 -0
- package/dist/payloads/ContainerHost.d.ts +48 -0
- package/dist/payloads/ContainerHost.js +341 -1
- package/dist/payloads/NavigationAdvice.d.ts +24 -0
- package/dist/payloads/NavigationAdvice.js +91 -1
- package/dist/payloads/NavigationState.d.ts +0 -46
- package/dist/payloads/NavigationState.js +1 -252
- package/dist/payloads/Route.d.ts +78 -1
- package/dist/payloads/Route.js +222 -2
- package/package.json +1 -1
- package/dist/interfaces/NavigationControl.d.ts +0 -169
- package/dist/interfaces/NavigationControl.js +0 -806
- package/dist/interfaces/NavigationState.d.ts +0 -132
- package/dist/interfaces/NavigationState.js +0 -615
- package/dist/interfaces/OperationalAuthority.d.ts +0 -217
- package/dist/interfaces/OperationalAuthority.js +0 -807
- package/dist/interfaces/VesselType.d.ts +0 -133
- package/dist/interfaces/VesselType.js +0 -726
- package/dist/interfaces/Voyage.d.ts +0 -151
- package/dist/interfaces/Voyage.js +0 -855
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: ReplayControl.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.DescribeFileResponse = exports.ChannelInfo = exports.DescribeFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const empty_1 = require("./google/protobuf/empty");
|
|
@@ -283,6 +283,270 @@ exports.ListFilesResponse = {
|
|
|
283
283
|
return message;
|
|
284
284
|
},
|
|
285
285
|
};
|
|
286
|
+
function createBaseDescribeFileRequest() {
|
|
287
|
+
return { path: "" };
|
|
288
|
+
}
|
|
289
|
+
exports.DescribeFileRequest = {
|
|
290
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
291
|
+
if (message.path !== "") {
|
|
292
|
+
writer.uint32(10).string(message.path);
|
|
293
|
+
}
|
|
294
|
+
return writer;
|
|
295
|
+
},
|
|
296
|
+
decode(input, length) {
|
|
297
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
298
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
299
|
+
const message = createBaseDescribeFileRequest();
|
|
300
|
+
while (reader.pos < end) {
|
|
301
|
+
const tag = reader.uint32();
|
|
302
|
+
switch (tag >>> 3) {
|
|
303
|
+
case 1: {
|
|
304
|
+
if (tag !== 10) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
message.path = reader.string();
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
reader.skip(tag & 7);
|
|
315
|
+
}
|
|
316
|
+
return message;
|
|
317
|
+
},
|
|
318
|
+
fromJSON(object) {
|
|
319
|
+
return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
|
|
320
|
+
},
|
|
321
|
+
toJSON(message) {
|
|
322
|
+
const obj = {};
|
|
323
|
+
if (message.path !== "") {
|
|
324
|
+
obj.path = message.path;
|
|
325
|
+
}
|
|
326
|
+
return obj;
|
|
327
|
+
},
|
|
328
|
+
create(base) {
|
|
329
|
+
return exports.DescribeFileRequest.fromPartial(base ?? {});
|
|
330
|
+
},
|
|
331
|
+
fromPartial(object) {
|
|
332
|
+
const message = createBaseDescribeFileRequest();
|
|
333
|
+
message.path = object.path ?? "";
|
|
334
|
+
return message;
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
function createBaseChannelInfo() {
|
|
338
|
+
return { topic: "", schemaName: "", messageEncoding: "", messageCount: 0, firstTime: undefined, lastTime: undefined };
|
|
339
|
+
}
|
|
340
|
+
exports.ChannelInfo = {
|
|
341
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
342
|
+
if (message.topic !== "") {
|
|
343
|
+
writer.uint32(10).string(message.topic);
|
|
344
|
+
}
|
|
345
|
+
if (message.schemaName !== "") {
|
|
346
|
+
writer.uint32(18).string(message.schemaName);
|
|
347
|
+
}
|
|
348
|
+
if (message.messageEncoding !== "") {
|
|
349
|
+
writer.uint32(26).string(message.messageEncoding);
|
|
350
|
+
}
|
|
351
|
+
if (message.messageCount !== 0) {
|
|
352
|
+
writer.uint32(32).uint64(message.messageCount);
|
|
353
|
+
}
|
|
354
|
+
if (message.firstTime !== undefined) {
|
|
355
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.firstTime), writer.uint32(42).fork()).join();
|
|
356
|
+
}
|
|
357
|
+
if (message.lastTime !== undefined) {
|
|
358
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.lastTime), writer.uint32(50).fork()).join();
|
|
359
|
+
}
|
|
360
|
+
return writer;
|
|
361
|
+
},
|
|
362
|
+
decode(input, length) {
|
|
363
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
364
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
365
|
+
const message = createBaseChannelInfo();
|
|
366
|
+
while (reader.pos < end) {
|
|
367
|
+
const tag = reader.uint32();
|
|
368
|
+
switch (tag >>> 3) {
|
|
369
|
+
case 1: {
|
|
370
|
+
if (tag !== 10) {
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
message.topic = reader.string();
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
case 2: {
|
|
377
|
+
if (tag !== 18) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
message.schemaName = reader.string();
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
case 3: {
|
|
384
|
+
if (tag !== 26) {
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
message.messageEncoding = reader.string();
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
case 4: {
|
|
391
|
+
if (tag !== 32) {
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
message.messageCount = longToNumber(reader.uint64());
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
case 5: {
|
|
398
|
+
if (tag !== 42) {
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
message.firstTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
case 6: {
|
|
405
|
+
if (tag !== 50) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
message.lastTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
reader.skip(tag & 7);
|
|
416
|
+
}
|
|
417
|
+
return message;
|
|
418
|
+
},
|
|
419
|
+
fromJSON(object) {
|
|
420
|
+
return {
|
|
421
|
+
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
422
|
+
schemaName: isSet(object.schemaName) ? globalThis.String(object.schemaName) : "",
|
|
423
|
+
messageEncoding: isSet(object.messageEncoding) ? globalThis.String(object.messageEncoding) : "",
|
|
424
|
+
messageCount: isSet(object.messageCount) ? globalThis.Number(object.messageCount) : 0,
|
|
425
|
+
firstTime: isSet(object.firstTime) ? fromJsonTimestamp(object.firstTime) : undefined,
|
|
426
|
+
lastTime: isSet(object.lastTime) ? fromJsonTimestamp(object.lastTime) : undefined,
|
|
427
|
+
};
|
|
428
|
+
},
|
|
429
|
+
toJSON(message) {
|
|
430
|
+
const obj = {};
|
|
431
|
+
if (message.topic !== "") {
|
|
432
|
+
obj.topic = message.topic;
|
|
433
|
+
}
|
|
434
|
+
if (message.schemaName !== "") {
|
|
435
|
+
obj.schemaName = message.schemaName;
|
|
436
|
+
}
|
|
437
|
+
if (message.messageEncoding !== "") {
|
|
438
|
+
obj.messageEncoding = message.messageEncoding;
|
|
439
|
+
}
|
|
440
|
+
if (message.messageCount !== 0) {
|
|
441
|
+
obj.messageCount = Math.round(message.messageCount);
|
|
442
|
+
}
|
|
443
|
+
if (message.firstTime !== undefined) {
|
|
444
|
+
obj.firstTime = message.firstTime.toISOString();
|
|
445
|
+
}
|
|
446
|
+
if (message.lastTime !== undefined) {
|
|
447
|
+
obj.lastTime = message.lastTime.toISOString();
|
|
448
|
+
}
|
|
449
|
+
return obj;
|
|
450
|
+
},
|
|
451
|
+
create(base) {
|
|
452
|
+
return exports.ChannelInfo.fromPartial(base ?? {});
|
|
453
|
+
},
|
|
454
|
+
fromPartial(object) {
|
|
455
|
+
const message = createBaseChannelInfo();
|
|
456
|
+
message.topic = object.topic ?? "";
|
|
457
|
+
message.schemaName = object.schemaName ?? "";
|
|
458
|
+
message.messageEncoding = object.messageEncoding ?? "";
|
|
459
|
+
message.messageCount = object.messageCount ?? 0;
|
|
460
|
+
message.firstTime = object.firstTime ?? undefined;
|
|
461
|
+
message.lastTime = object.lastTime ?? undefined;
|
|
462
|
+
return message;
|
|
463
|
+
},
|
|
464
|
+
};
|
|
465
|
+
function createBaseDescribeFileResponse() {
|
|
466
|
+
return { file: undefined, channels: [], fromScan: false };
|
|
467
|
+
}
|
|
468
|
+
exports.DescribeFileResponse = {
|
|
469
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
470
|
+
if (message.file !== undefined) {
|
|
471
|
+
exports.FileInfo.encode(message.file, writer.uint32(10).fork()).join();
|
|
472
|
+
}
|
|
473
|
+
for (const v of message.channels) {
|
|
474
|
+
exports.ChannelInfo.encode(v, writer.uint32(18).fork()).join();
|
|
475
|
+
}
|
|
476
|
+
if (message.fromScan !== false) {
|
|
477
|
+
writer.uint32(24).bool(message.fromScan);
|
|
478
|
+
}
|
|
479
|
+
return writer;
|
|
480
|
+
},
|
|
481
|
+
decode(input, length) {
|
|
482
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
483
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
484
|
+
const message = createBaseDescribeFileResponse();
|
|
485
|
+
while (reader.pos < end) {
|
|
486
|
+
const tag = reader.uint32();
|
|
487
|
+
switch (tag >>> 3) {
|
|
488
|
+
case 1: {
|
|
489
|
+
if (tag !== 10) {
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
message.file = exports.FileInfo.decode(reader, reader.uint32());
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
495
|
+
case 2: {
|
|
496
|
+
if (tag !== 18) {
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
message.channels.push(exports.ChannelInfo.decode(reader, reader.uint32()));
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
502
|
+
case 3: {
|
|
503
|
+
if (tag !== 24) {
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
message.fromScan = reader.bool();
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
reader.skip(tag & 7);
|
|
514
|
+
}
|
|
515
|
+
return message;
|
|
516
|
+
},
|
|
517
|
+
fromJSON(object) {
|
|
518
|
+
return {
|
|
519
|
+
file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
|
|
520
|
+
channels: globalThis.Array.isArray(object?.channels)
|
|
521
|
+
? object.channels.map((e) => exports.ChannelInfo.fromJSON(e))
|
|
522
|
+
: [],
|
|
523
|
+
fromScan: isSet(object.fromScan) ? globalThis.Boolean(object.fromScan) : false,
|
|
524
|
+
};
|
|
525
|
+
},
|
|
526
|
+
toJSON(message) {
|
|
527
|
+
const obj = {};
|
|
528
|
+
if (message.file !== undefined) {
|
|
529
|
+
obj.file = exports.FileInfo.toJSON(message.file);
|
|
530
|
+
}
|
|
531
|
+
if (message.channels?.length) {
|
|
532
|
+
obj.channels = message.channels.map((e) => exports.ChannelInfo.toJSON(e));
|
|
533
|
+
}
|
|
534
|
+
if (message.fromScan !== false) {
|
|
535
|
+
obj.fromScan = message.fromScan;
|
|
536
|
+
}
|
|
537
|
+
return obj;
|
|
538
|
+
},
|
|
539
|
+
create(base) {
|
|
540
|
+
return exports.DescribeFileResponse.fromPartial(base ?? {});
|
|
541
|
+
},
|
|
542
|
+
fromPartial(object) {
|
|
543
|
+
const message = createBaseDescribeFileResponse();
|
|
544
|
+
message.file = (object.file !== undefined && object.file !== null) ? exports.FileInfo.fromPartial(object.file) : undefined;
|
|
545
|
+
message.channels = object.channels?.map((e) => exports.ChannelInfo.fromPartial(e)) || [];
|
|
546
|
+
message.fromScan = object.fromScan ?? false;
|
|
547
|
+
return message;
|
|
548
|
+
},
|
|
549
|
+
};
|
|
286
550
|
function createBaseLoadFileRequest() {
|
|
287
551
|
return { path: "" };
|
|
288
552
|
}
|
|
@@ -536,6 +800,15 @@ exports.ReplayControlDefinition = {
|
|
|
536
800
|
responseStream: false,
|
|
537
801
|
options: {},
|
|
538
802
|
},
|
|
803
|
+
/** Per-channel message counts and first/last message times for one file. */
|
|
804
|
+
describe_file: {
|
|
805
|
+
name: "describe_file",
|
|
806
|
+
requestType: exports.DescribeFileRequest,
|
|
807
|
+
requestStream: false,
|
|
808
|
+
responseType: exports.DescribeFileResponse,
|
|
809
|
+
responseStream: false,
|
|
810
|
+
options: {},
|
|
811
|
+
},
|
|
539
812
|
load_file: {
|
|
540
813
|
name: "load_file",
|
|
541
814
|
requestType: exports.LoadFileRequest,
|
|
@@ -99,6 +99,34 @@ export declare enum GeometryType {
|
|
|
99
99
|
}
|
|
100
100
|
export declare function geometryTypeFromJSON(object: any): GeometryType;
|
|
101
101
|
export declare function geometryTypeToJSON(object: GeometryType): string;
|
|
102
|
+
/**
|
|
103
|
+
* How a leg's XTD corridor is shaped. UNSPECIFIED MUST be read as FIXED:
|
|
104
|
+
* every leg published before this field existed is a fixed-width corridor, and
|
|
105
|
+
* reading it any other way would change routes nobody edited.
|
|
106
|
+
*/
|
|
107
|
+
export declare enum XtdCorridorMode {
|
|
108
|
+
XTD_CORRIDOR_MODE_UNSPECIFIED = 0,
|
|
109
|
+
/**
|
|
110
|
+
* XTD_CORRIDOR_MODE_FIXED - Fixed width: parallel lines at xtd_port_m / xtd_starboard_m either side of
|
|
111
|
+
* track.
|
|
112
|
+
*/
|
|
113
|
+
XTD_CORRIDOR_MODE_FIXED = 1,
|
|
114
|
+
/**
|
|
115
|
+
* XTD_CORRIDOR_MODE_VARIABLE - Variable width: a boundary drawn by the planner (Leg.xtd_port_boundary /
|
|
116
|
+
* xtd_starboard_boundary), e.g. a corridor that narrows past a shoal.
|
|
117
|
+
* The metre fields (xtd_port_m / xtd_starboard_m and the monitoring pair)
|
|
118
|
+
* MUST NOT exceed the closest approach to track of that side's drawn
|
|
119
|
+
* boundary: they are the INSCRIBED fixed corridor. A monitor that does not
|
|
120
|
+
* evaluate the boundary then alarms early on a wide stretch and never late at
|
|
121
|
+
* the narrow one, which is the direction an XTD limit has to fail. Such a
|
|
122
|
+
* monitor SHOULD report the leg as monitored at reduced fidelity, which is
|
|
123
|
+
* why its alarm may come early.
|
|
124
|
+
*/
|
|
125
|
+
XTD_CORRIDOR_MODE_VARIABLE = 2,
|
|
126
|
+
UNRECOGNIZED = -1
|
|
127
|
+
}
|
|
128
|
+
export declare function xtdCorridorModeFromJSON(object: any): XtdCorridorMode;
|
|
129
|
+
export declare function xtdCorridorModeToJSON(object: XtdCorridorMode): string;
|
|
102
130
|
/**
|
|
103
131
|
* Whether a route's waypoint list closes back on itself. RTZ 1.2 has no such
|
|
104
132
|
* concept, so producers either repeated the first waypoint (breaking id
|
|
@@ -460,12 +488,29 @@ export interface Leg {
|
|
|
460
488
|
/**
|
|
461
489
|
* Cross-track distance (XTD) limits and monitoring thresholds, in metres.
|
|
462
490
|
* `optional` so producers can distinguish "no XTD limit" (unset) from
|
|
463
|
-
* "zero XTD limit" (set to 0).
|
|
491
|
+
* "zero XTD limit" (set to 0). Under XTD_CORRIDOR_MODE_VARIABLE all four are
|
|
492
|
+
* the inscribed corridor (protocol-specification.md §6.2.2).
|
|
464
493
|
*/
|
|
465
494
|
xtdPortM?: number | undefined;
|
|
466
495
|
xtdStarboardM?: number | undefined;
|
|
467
496
|
xtdMonitoringPortM?: number | undefined;
|
|
468
497
|
xtdMonitoringStarboardM?: number | undefined;
|
|
498
|
+
/**
|
|
499
|
+
* Whether this leg's XTD corridor is fixed or variable width. See XtdCorridorMode and
|
|
500
|
+
* protocol-specification.md §6.2.2.
|
|
501
|
+
*/
|
|
502
|
+
xtdCorridorMode: XtdCorridorMode;
|
|
503
|
+
/**
|
|
504
|
+
* VARIABLE only: the drawn corridor boundary on each side, vertices in
|
|
505
|
+
* along-track order, covering this leg and the turn at the waypoint it
|
|
506
|
+
* arrives at. A consumer MUST ignore both lists unless the mode is VARIABLE,
|
|
507
|
+
* so a stale shape left behind by a switch back to FIXED is never sailed.
|
|
508
|
+
* Where the next leg is VARIABLE too, the last vertex on a side SHOULD
|
|
509
|
+
* coincide with the first vertex of waypoint[i+1].leg's list on that side, so
|
|
510
|
+
* a monitor meets neither a gap nor an overlap at the junction.
|
|
511
|
+
*/
|
|
512
|
+
xtdPortBoundary: XtdBoundaryPoint[];
|
|
513
|
+
xtdStarboardBoundary: XtdBoundaryPoint[];
|
|
469
514
|
/**
|
|
470
515
|
* Safety contour (depth in metres below chart datum) below which the route
|
|
471
516
|
* is considered unsafe.
|
|
@@ -514,6 +559,36 @@ export interface Leg {
|
|
|
514
559
|
colregTrafficIntensity: ColregTrafficIntensity;
|
|
515
560
|
extensions: Extensions | undefined;
|
|
516
561
|
}
|
|
562
|
+
/**
|
|
563
|
+
* One vertex of a variable-width XTD corridor boundary (Leg.xtd_port_boundary /
|
|
564
|
+
* Leg.xtd_starboard_boundary).
|
|
565
|
+
*/
|
|
566
|
+
export interface XtdBoundaryPoint {
|
|
567
|
+
/**
|
|
568
|
+
* WGS-84 vertex. Authoritative: this is the boundary a monitor checks
|
|
569
|
+
* against, whatever the anchor below says.
|
|
570
|
+
*/
|
|
571
|
+
position: Coordinate | undefined;
|
|
572
|
+
/**
|
|
573
|
+
* Editor anchor — where along the leg's straight the vertex was placed,
|
|
574
|
+
* 0 at the leg's start and 1 at its end, and how far off track. Lets an
|
|
575
|
+
* editor keep the vertex attached to the leg when a waypoint moves, instead
|
|
576
|
+
* of leaving it stranded at its old position. `optional` because a vertex
|
|
577
|
+
* placed freely (at a leg end or inside a turn) has no such anchor, and 0
|
|
578
|
+
* is a real fraction.
|
|
579
|
+
*/
|
|
580
|
+
alongTrackFraction?: number | undefined;
|
|
581
|
+
/**
|
|
582
|
+
* Perpendicular distance from track for that anchor, metres, always
|
|
583
|
+
* positive: the side is given by which boundary list holds the vertex.
|
|
584
|
+
*/
|
|
585
|
+
offsetM?: number | undefined;
|
|
586
|
+
/**
|
|
587
|
+
* True when the vertex lies on the turn at the leg's end rather than on the
|
|
588
|
+
* straight.
|
|
589
|
+
*/
|
|
590
|
+
inTurn: boolean;
|
|
591
|
+
}
|
|
517
592
|
export interface Schedules {
|
|
518
593
|
/** Multiple schedules can coexist (e.g. "manual", "weather-optimized"). */
|
|
519
594
|
schedule: Schedule[];
|
|
@@ -698,6 +773,7 @@ export declare const Waypoints: MessageFns<Waypoints>;
|
|
|
698
773
|
export declare const DefaultWaypoint: MessageFns<DefaultWaypoint>;
|
|
699
774
|
export declare const Waypoint: MessageFns<Waypoint>;
|
|
700
775
|
export declare const Leg: MessageFns<Leg>;
|
|
776
|
+
export declare const XtdBoundaryPoint: MessageFns<XtdBoundaryPoint>;
|
|
701
777
|
export declare const Schedules: MessageFns<Schedules>;
|
|
702
778
|
export declare const Schedule: MessageFns<Schedule>;
|
|
703
779
|
export declare const ScheduleElement: MessageFns<ScheduleElement>;
|
package/dist/interfaces/Route.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: Route.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
exports.RouteStatusUpdate = exports.RouteSignature = exports.RouteSignatures = exports.RouteIssue = exports.RouteChallenge = exports.HazardZone = exports.ActionPoint = exports.ActionPoints = exports.ScheduleElement = void 0;
|
|
8
|
+
exports.Waypoint = exports.DefaultWaypoint = exports.Waypoints = exports.RouteInfo = exports.Route = exports.Extensions_Entry_AttributesEntry = exports.Extensions_Entry = exports.Extensions = exports.CircleGeometry = exports.RouteRef = exports.schedule_OriginToJSON = exports.schedule_OriginFromJSON = exports.Schedule_Origin = exports.actionPointRequiredActionToJSON = exports.actionPointRequiredActionFromJSON = exports.ActionPointRequiredAction = exports.envelopeBoundToJSON = exports.envelopeBoundFromJSON = exports.EnvelopeBound = exports.routeStatusToJSON = exports.routeStatusFromJSON = exports.RouteStatus = exports.routeTopologyToJSON = exports.routeTopologyFromJSON = exports.RouteTopology = exports.xtdCorridorModeToJSON = exports.xtdCorridorModeFromJSON = exports.XtdCorridorMode = exports.geometryTypeToJSON = exports.geometryTypeFromJSON = exports.GeometryType = exports.colregTrafficIntensityToJSON = exports.colregTrafficIntensityFromJSON = exports.ColregTrafficIntensity = exports.colregSituationToJSON = exports.colregSituationFromJSON = exports.ColregSituation = exports.hazardZoneTypeToJSON = exports.hazardZoneTypeFromJSON = exports.HazardZoneType = exports.routeChallengeTypeToJSON = exports.routeChallengeTypeFromJSON = exports.RouteChallengeType = exports.operationalContextToJSON = exports.operationalContextFromJSON = exports.OperationalContext = exports.autonomyLevelToJSON = exports.autonomyLevelFromJSON = exports.AutonomyLevel = exports.protobufPackage = void 0;
|
|
9
|
+
exports.RouteStatusUpdate = exports.RouteSignature = exports.RouteSignatures = exports.RouteIssue = exports.RouteChallenge = exports.HazardZone = exports.ActionPoint = exports.ActionPoints = exports.ScheduleElement = exports.Schedule = exports.Schedules = exports.XtdBoundaryPoint = exports.Leg = void 0;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
12
12
|
const Coordinate_1 = require("./Coordinate");
|
|
@@ -432,6 +432,65 @@ function geometryTypeToJSON(object) {
|
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
exports.geometryTypeToJSON = geometryTypeToJSON;
|
|
435
|
+
/**
|
|
436
|
+
* How a leg's XTD corridor is shaped. UNSPECIFIED MUST be read as FIXED:
|
|
437
|
+
* every leg published before this field existed is a fixed-width corridor, and
|
|
438
|
+
* reading it any other way would change routes nobody edited.
|
|
439
|
+
*/
|
|
440
|
+
var XtdCorridorMode;
|
|
441
|
+
(function (XtdCorridorMode) {
|
|
442
|
+
XtdCorridorMode[XtdCorridorMode["XTD_CORRIDOR_MODE_UNSPECIFIED"] = 0] = "XTD_CORRIDOR_MODE_UNSPECIFIED";
|
|
443
|
+
/**
|
|
444
|
+
* XTD_CORRIDOR_MODE_FIXED - Fixed width: parallel lines at xtd_port_m / xtd_starboard_m either side of
|
|
445
|
+
* track.
|
|
446
|
+
*/
|
|
447
|
+
XtdCorridorMode[XtdCorridorMode["XTD_CORRIDOR_MODE_FIXED"] = 1] = "XTD_CORRIDOR_MODE_FIXED";
|
|
448
|
+
/**
|
|
449
|
+
* XTD_CORRIDOR_MODE_VARIABLE - Variable width: a boundary drawn by the planner (Leg.xtd_port_boundary /
|
|
450
|
+
* xtd_starboard_boundary), e.g. a corridor that narrows past a shoal.
|
|
451
|
+
* The metre fields (xtd_port_m / xtd_starboard_m and the monitoring pair)
|
|
452
|
+
* MUST NOT exceed the closest approach to track of that side's drawn
|
|
453
|
+
* boundary: they are the INSCRIBED fixed corridor. A monitor that does not
|
|
454
|
+
* evaluate the boundary then alarms early on a wide stretch and never late at
|
|
455
|
+
* the narrow one, which is the direction an XTD limit has to fail. Such a
|
|
456
|
+
* monitor SHOULD report the leg as monitored at reduced fidelity, which is
|
|
457
|
+
* why its alarm may come early.
|
|
458
|
+
*/
|
|
459
|
+
XtdCorridorMode[XtdCorridorMode["XTD_CORRIDOR_MODE_VARIABLE"] = 2] = "XTD_CORRIDOR_MODE_VARIABLE";
|
|
460
|
+
XtdCorridorMode[XtdCorridorMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
461
|
+
})(XtdCorridorMode || (exports.XtdCorridorMode = XtdCorridorMode = {}));
|
|
462
|
+
function xtdCorridorModeFromJSON(object) {
|
|
463
|
+
switch (object) {
|
|
464
|
+
case 0:
|
|
465
|
+
case "XTD_CORRIDOR_MODE_UNSPECIFIED":
|
|
466
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_UNSPECIFIED;
|
|
467
|
+
case 1:
|
|
468
|
+
case "XTD_CORRIDOR_MODE_FIXED":
|
|
469
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_FIXED;
|
|
470
|
+
case 2:
|
|
471
|
+
case "XTD_CORRIDOR_MODE_VARIABLE":
|
|
472
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_VARIABLE;
|
|
473
|
+
case -1:
|
|
474
|
+
case "UNRECOGNIZED":
|
|
475
|
+
default:
|
|
476
|
+
return XtdCorridorMode.UNRECOGNIZED;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
exports.xtdCorridorModeFromJSON = xtdCorridorModeFromJSON;
|
|
480
|
+
function xtdCorridorModeToJSON(object) {
|
|
481
|
+
switch (object) {
|
|
482
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_UNSPECIFIED:
|
|
483
|
+
return "XTD_CORRIDOR_MODE_UNSPECIFIED";
|
|
484
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_FIXED:
|
|
485
|
+
return "XTD_CORRIDOR_MODE_FIXED";
|
|
486
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_VARIABLE:
|
|
487
|
+
return "XTD_CORRIDOR_MODE_VARIABLE";
|
|
488
|
+
case XtdCorridorMode.UNRECOGNIZED:
|
|
489
|
+
default:
|
|
490
|
+
return "UNRECOGNIZED";
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
exports.xtdCorridorModeToJSON = xtdCorridorModeToJSON;
|
|
435
494
|
/**
|
|
436
495
|
* Whether a route's waypoint list closes back on itself. RTZ 1.2 has no such
|
|
437
496
|
* concept, so producers either repeated the first waypoint (breaking id
|
|
@@ -2219,6 +2278,9 @@ function createBaseLeg() {
|
|
|
2219
2278
|
xtdStarboardM: undefined,
|
|
2220
2279
|
xtdMonitoringPortM: undefined,
|
|
2221
2280
|
xtdMonitoringStarboardM: undefined,
|
|
2281
|
+
xtdCorridorMode: 0,
|
|
2282
|
+
xtdPortBoundary: [],
|
|
2283
|
+
xtdStarboardBoundary: [],
|
|
2222
2284
|
safetyContourM: undefined,
|
|
2223
2285
|
safetyDepthM: undefined,
|
|
2224
2286
|
ukcStaticM: undefined,
|
|
@@ -2256,6 +2318,15 @@ exports.Leg = {
|
|
|
2256
2318
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2257
2319
|
writer.uint32(37).float(message.xtdMonitoringStarboardM);
|
|
2258
2320
|
}
|
|
2321
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2322
|
+
writer.uint32(40).int32(message.xtdCorridorMode);
|
|
2323
|
+
}
|
|
2324
|
+
for (const v of message.xtdPortBoundary) {
|
|
2325
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(50).fork()).join();
|
|
2326
|
+
}
|
|
2327
|
+
for (const v of message.xtdStarboardBoundary) {
|
|
2328
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(58).fork()).join();
|
|
2329
|
+
}
|
|
2259
2330
|
if (message.safetyContourM !== undefined) {
|
|
2260
2331
|
writer.uint32(85).float(message.safetyContourM);
|
|
2261
2332
|
}
|
|
@@ -2356,6 +2427,27 @@ exports.Leg = {
|
|
|
2356
2427
|
message.xtdMonitoringStarboardM = reader.float();
|
|
2357
2428
|
continue;
|
|
2358
2429
|
}
|
|
2430
|
+
case 5: {
|
|
2431
|
+
if (tag !== 40) {
|
|
2432
|
+
break;
|
|
2433
|
+
}
|
|
2434
|
+
message.xtdCorridorMode = reader.int32();
|
|
2435
|
+
continue;
|
|
2436
|
+
}
|
|
2437
|
+
case 6: {
|
|
2438
|
+
if (tag !== 50) {
|
|
2439
|
+
break;
|
|
2440
|
+
}
|
|
2441
|
+
message.xtdPortBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2442
|
+
continue;
|
|
2443
|
+
}
|
|
2444
|
+
case 7: {
|
|
2445
|
+
if (tag !== 58) {
|
|
2446
|
+
break;
|
|
2447
|
+
}
|
|
2448
|
+
message.xtdStarboardBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2449
|
+
continue;
|
|
2450
|
+
}
|
|
2359
2451
|
case 10: {
|
|
2360
2452
|
if (tag !== 85) {
|
|
2361
2453
|
break;
|
|
@@ -2519,6 +2611,13 @@ exports.Leg = {
|
|
|
2519
2611
|
xtdMonitoringStarboardM: isSet(object.xtdMonitoringStarboardM)
|
|
2520
2612
|
? globalThis.Number(object.xtdMonitoringStarboardM)
|
|
2521
2613
|
: undefined,
|
|
2614
|
+
xtdCorridorMode: isSet(object.xtdCorridorMode) ? xtdCorridorModeFromJSON(object.xtdCorridorMode) : 0,
|
|
2615
|
+
xtdPortBoundary: globalThis.Array.isArray(object?.xtdPortBoundary)
|
|
2616
|
+
? object.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2617
|
+
: [],
|
|
2618
|
+
xtdStarboardBoundary: globalThis.Array.isArray(object?.xtdStarboardBoundary)
|
|
2619
|
+
? object.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2620
|
+
: [],
|
|
2522
2621
|
safetyContourM: isSet(object.safetyContourM) ? globalThis.Number(object.safetyContourM) : undefined,
|
|
2523
2622
|
safetyDepthM: isSet(object.safetyDepthM) ? globalThis.Number(object.safetyDepthM) : undefined,
|
|
2524
2623
|
ukcStaticM: isSet(object.ukcStaticM) ? globalThis.Number(object.ukcStaticM) : undefined,
|
|
@@ -2558,6 +2657,15 @@ exports.Leg = {
|
|
|
2558
2657
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2559
2658
|
obj.xtdMonitoringStarboardM = message.xtdMonitoringStarboardM;
|
|
2560
2659
|
}
|
|
2660
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2661
|
+
obj.xtdCorridorMode = xtdCorridorModeToJSON(message.xtdCorridorMode);
|
|
2662
|
+
}
|
|
2663
|
+
if (message.xtdPortBoundary?.length) {
|
|
2664
|
+
obj.xtdPortBoundary = message.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2665
|
+
}
|
|
2666
|
+
if (message.xtdStarboardBoundary?.length) {
|
|
2667
|
+
obj.xtdStarboardBoundary = message.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2668
|
+
}
|
|
2561
2669
|
if (message.safetyContourM !== undefined) {
|
|
2562
2670
|
obj.safetyContourM = message.safetyContourM;
|
|
2563
2671
|
}
|
|
@@ -2632,6 +2740,9 @@ exports.Leg = {
|
|
|
2632
2740
|
message.xtdStarboardM = object.xtdStarboardM ?? undefined;
|
|
2633
2741
|
message.xtdMonitoringPortM = object.xtdMonitoringPortM ?? undefined;
|
|
2634
2742
|
message.xtdMonitoringStarboardM = object.xtdMonitoringStarboardM ?? undefined;
|
|
2743
|
+
message.xtdCorridorMode = object.xtdCorridorMode ?? 0;
|
|
2744
|
+
message.xtdPortBoundary = object.xtdPortBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2745
|
+
message.xtdStarboardBoundary = object.xtdStarboardBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2635
2746
|
message.safetyContourM = object.safetyContourM ?? undefined;
|
|
2636
2747
|
message.safetyDepthM = object.safetyDepthM ?? undefined;
|
|
2637
2748
|
message.ukcStaticM = object.ukcStaticM ?? undefined;
|
|
@@ -2658,6 +2769,106 @@ exports.Leg = {
|
|
|
2658
2769
|
return message;
|
|
2659
2770
|
},
|
|
2660
2771
|
};
|
|
2772
|
+
function createBaseXtdBoundaryPoint() {
|
|
2773
|
+
return { position: undefined, alongTrackFraction: undefined, offsetM: undefined, inTurn: false };
|
|
2774
|
+
}
|
|
2775
|
+
exports.XtdBoundaryPoint = {
|
|
2776
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2777
|
+
if (message.position !== undefined) {
|
|
2778
|
+
Coordinate_1.Coordinate.encode(message.position, writer.uint32(10).fork()).join();
|
|
2779
|
+
}
|
|
2780
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2781
|
+
writer.uint32(17).double(message.alongTrackFraction);
|
|
2782
|
+
}
|
|
2783
|
+
if (message.offsetM !== undefined) {
|
|
2784
|
+
writer.uint32(29).float(message.offsetM);
|
|
2785
|
+
}
|
|
2786
|
+
if (message.inTurn !== false) {
|
|
2787
|
+
writer.uint32(32).bool(message.inTurn);
|
|
2788
|
+
}
|
|
2789
|
+
return writer;
|
|
2790
|
+
},
|
|
2791
|
+
decode(input, length) {
|
|
2792
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2793
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2794
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2795
|
+
while (reader.pos < end) {
|
|
2796
|
+
const tag = reader.uint32();
|
|
2797
|
+
switch (tag >>> 3) {
|
|
2798
|
+
case 1: {
|
|
2799
|
+
if (tag !== 10) {
|
|
2800
|
+
break;
|
|
2801
|
+
}
|
|
2802
|
+
message.position = Coordinate_1.Coordinate.decode(reader, reader.uint32());
|
|
2803
|
+
continue;
|
|
2804
|
+
}
|
|
2805
|
+
case 2: {
|
|
2806
|
+
if (tag !== 17) {
|
|
2807
|
+
break;
|
|
2808
|
+
}
|
|
2809
|
+
message.alongTrackFraction = reader.double();
|
|
2810
|
+
continue;
|
|
2811
|
+
}
|
|
2812
|
+
case 3: {
|
|
2813
|
+
if (tag !== 29) {
|
|
2814
|
+
break;
|
|
2815
|
+
}
|
|
2816
|
+
message.offsetM = reader.float();
|
|
2817
|
+
continue;
|
|
2818
|
+
}
|
|
2819
|
+
case 4: {
|
|
2820
|
+
if (tag !== 32) {
|
|
2821
|
+
break;
|
|
2822
|
+
}
|
|
2823
|
+
message.inTurn = reader.bool();
|
|
2824
|
+
continue;
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2828
|
+
break;
|
|
2829
|
+
}
|
|
2830
|
+
reader.skip(tag & 7);
|
|
2831
|
+
}
|
|
2832
|
+
return message;
|
|
2833
|
+
},
|
|
2834
|
+
fromJSON(object) {
|
|
2835
|
+
return {
|
|
2836
|
+
position: isSet(object.position) ? Coordinate_1.Coordinate.fromJSON(object.position) : undefined,
|
|
2837
|
+
alongTrackFraction: isSet(object.alongTrackFraction) ? globalThis.Number(object.alongTrackFraction) : undefined,
|
|
2838
|
+
offsetM: isSet(object.offsetM) ? globalThis.Number(object.offsetM) : undefined,
|
|
2839
|
+
inTurn: isSet(object.inTurn) ? globalThis.Boolean(object.inTurn) : false,
|
|
2840
|
+
};
|
|
2841
|
+
},
|
|
2842
|
+
toJSON(message) {
|
|
2843
|
+
const obj = {};
|
|
2844
|
+
if (message.position !== undefined) {
|
|
2845
|
+
obj.position = Coordinate_1.Coordinate.toJSON(message.position);
|
|
2846
|
+
}
|
|
2847
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2848
|
+
obj.alongTrackFraction = message.alongTrackFraction;
|
|
2849
|
+
}
|
|
2850
|
+
if (message.offsetM !== undefined) {
|
|
2851
|
+
obj.offsetM = message.offsetM;
|
|
2852
|
+
}
|
|
2853
|
+
if (message.inTurn !== false) {
|
|
2854
|
+
obj.inTurn = message.inTurn;
|
|
2855
|
+
}
|
|
2856
|
+
return obj;
|
|
2857
|
+
},
|
|
2858
|
+
create(base) {
|
|
2859
|
+
return exports.XtdBoundaryPoint.fromPartial(base ?? {});
|
|
2860
|
+
},
|
|
2861
|
+
fromPartial(object) {
|
|
2862
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2863
|
+
message.position = (object.position !== undefined && object.position !== null)
|
|
2864
|
+
? Coordinate_1.Coordinate.fromPartial(object.position)
|
|
2865
|
+
: undefined;
|
|
2866
|
+
message.alongTrackFraction = object.alongTrackFraction ?? undefined;
|
|
2867
|
+
message.offsetM = object.offsetM ?? undefined;
|
|
2868
|
+
message.inTurn = object.inTurn ?? false;
|
|
2869
|
+
return message;
|
|
2870
|
+
},
|
|
2871
|
+
};
|
|
2661
2872
|
function createBaseSchedules() {
|
|
2662
2873
|
return { schedule: [], extensions: undefined };
|
|
2663
2874
|
}
|