@rise-maritime/keelson-js 0.6.0-alpha.282.dev.1 → 0.6.0-alpha.282.dev.2
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/interfaces/Route.d.ts +77 -1
- package/dist/interfaces/Route.js +213 -2
- package/dist/payloads/Route.d.ts +78 -1
- package/dist/payloads/Route.js +222 -2
- package/package.json +1 -1
|
@@ -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
|
}
|
package/dist/payloads/Route.d.ts
CHANGED
|
@@ -98,6 +98,34 @@ export declare enum GeometryType {
|
|
|
98
98
|
}
|
|
99
99
|
export declare function geometryTypeFromJSON(object: any): GeometryType;
|
|
100
100
|
export declare function geometryTypeToJSON(object: GeometryType): string;
|
|
101
|
+
/**
|
|
102
|
+
* How a leg's XTD corridor is shaped. UNSPECIFIED MUST be read as FIXED:
|
|
103
|
+
* every leg published before this field existed is a fixed-width corridor, and
|
|
104
|
+
* reading it any other way would change routes nobody edited.
|
|
105
|
+
*/
|
|
106
|
+
export declare enum XtdCorridorMode {
|
|
107
|
+
XTD_CORRIDOR_MODE_UNSPECIFIED = 0,
|
|
108
|
+
/**
|
|
109
|
+
* XTD_CORRIDOR_MODE_FIXED - Fixed width: parallel lines at xtd_port_m / xtd_starboard_m either side of
|
|
110
|
+
* track.
|
|
111
|
+
*/
|
|
112
|
+
XTD_CORRIDOR_MODE_FIXED = 1,
|
|
113
|
+
/**
|
|
114
|
+
* XTD_CORRIDOR_MODE_VARIABLE - Variable width: a boundary drawn by the planner (Leg.xtd_port_boundary /
|
|
115
|
+
* xtd_starboard_boundary), e.g. a corridor that narrows past a shoal.
|
|
116
|
+
* The metre fields (xtd_port_m / xtd_starboard_m and the monitoring pair)
|
|
117
|
+
* MUST NOT exceed the closest approach to track of that side's drawn
|
|
118
|
+
* boundary: they are the INSCRIBED fixed corridor. A monitor that does not
|
|
119
|
+
* evaluate the boundary then alarms early on a wide stretch and never late at
|
|
120
|
+
* the narrow one, which is the direction an XTD limit has to fail. Such a
|
|
121
|
+
* monitor SHOULD report the leg as monitored at reduced fidelity, which is
|
|
122
|
+
* why its alarm may come early.
|
|
123
|
+
*/
|
|
124
|
+
XTD_CORRIDOR_MODE_VARIABLE = 2,
|
|
125
|
+
UNRECOGNIZED = -1
|
|
126
|
+
}
|
|
127
|
+
export declare function xtdCorridorModeFromJSON(object: any): XtdCorridorMode;
|
|
128
|
+
export declare function xtdCorridorModeToJSON(object: XtdCorridorMode): string;
|
|
101
129
|
/**
|
|
102
130
|
* Whether a route's waypoint list closes back on itself. RTZ 1.2 has no such
|
|
103
131
|
* concept, so producers either repeated the first waypoint (breaking id
|
|
@@ -470,12 +498,29 @@ export interface Leg {
|
|
|
470
498
|
/**
|
|
471
499
|
* Cross-track distance (XTD) limits and monitoring thresholds, in metres.
|
|
472
500
|
* `optional` so producers can distinguish "no XTD limit" (unset) from
|
|
473
|
-
* "zero XTD limit" (set to 0).
|
|
501
|
+
* "zero XTD limit" (set to 0). Under XTD_CORRIDOR_MODE_VARIABLE all four are
|
|
502
|
+
* the inscribed corridor (protocol-specification.md §6.2.2).
|
|
474
503
|
*/
|
|
475
504
|
xtdPortM?: number | undefined;
|
|
476
505
|
xtdStarboardM?: number | undefined;
|
|
477
506
|
xtdMonitoringPortM?: number | undefined;
|
|
478
507
|
xtdMonitoringStarboardM?: number | undefined;
|
|
508
|
+
/**
|
|
509
|
+
* Whether this leg's XTD corridor is fixed or variable width. See XtdCorridorMode and
|
|
510
|
+
* protocol-specification.md §6.2.2.
|
|
511
|
+
*/
|
|
512
|
+
xtdCorridorMode: XtdCorridorMode;
|
|
513
|
+
/**
|
|
514
|
+
* VARIABLE only: the drawn corridor boundary on each side, vertices in
|
|
515
|
+
* along-track order, covering this leg and the turn at the waypoint it
|
|
516
|
+
* arrives at. A consumer MUST ignore both lists unless the mode is VARIABLE,
|
|
517
|
+
* so a stale shape left behind by a switch back to FIXED is never sailed.
|
|
518
|
+
* Where the next leg is VARIABLE too, the last vertex on a side SHOULD
|
|
519
|
+
* coincide with the first vertex of waypoint[i+1].leg's list on that side, so
|
|
520
|
+
* a monitor meets neither a gap nor an overlap at the junction.
|
|
521
|
+
*/
|
|
522
|
+
xtdPortBoundary: XtdBoundaryPoint[];
|
|
523
|
+
xtdStarboardBoundary: XtdBoundaryPoint[];
|
|
479
524
|
/**
|
|
480
525
|
* Safety contour (depth in metres below chart datum) below which the route
|
|
481
526
|
* is considered unsafe.
|
|
@@ -524,6 +569,37 @@ export interface Leg {
|
|
|
524
569
|
colregTrafficIntensity: ColregTrafficIntensity;
|
|
525
570
|
extensions: Extensions | undefined;
|
|
526
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
* One vertex of a variable-width XTD corridor boundary (Leg.xtd_port_boundary /
|
|
574
|
+
* Leg.xtd_starboard_boundary).
|
|
575
|
+
*/
|
|
576
|
+
export interface XtdBoundaryPoint {
|
|
577
|
+
$type: "keelson.XtdBoundaryPoint";
|
|
578
|
+
/**
|
|
579
|
+
* WGS-84 vertex. Authoritative: this is the boundary a monitor checks
|
|
580
|
+
* against, whatever the anchor below says.
|
|
581
|
+
*/
|
|
582
|
+
position: Coordinate | undefined;
|
|
583
|
+
/**
|
|
584
|
+
* Editor anchor — where along the leg's straight the vertex was placed,
|
|
585
|
+
* 0 at the leg's start and 1 at its end, and how far off track. Lets an
|
|
586
|
+
* editor keep the vertex attached to the leg when a waypoint moves, instead
|
|
587
|
+
* of leaving it stranded at its old position. `optional` because a vertex
|
|
588
|
+
* placed freely (at a leg end or inside a turn) has no such anchor, and 0
|
|
589
|
+
* is a real fraction.
|
|
590
|
+
*/
|
|
591
|
+
alongTrackFraction?: number | undefined;
|
|
592
|
+
/**
|
|
593
|
+
* Perpendicular distance from track for that anchor, metres, always
|
|
594
|
+
* positive: the side is given by which boundary list holds the vertex.
|
|
595
|
+
*/
|
|
596
|
+
offsetM?: number | undefined;
|
|
597
|
+
/**
|
|
598
|
+
* True when the vertex lies on the turn at the leg's end rather than on the
|
|
599
|
+
* straight.
|
|
600
|
+
*/
|
|
601
|
+
inTurn: boolean;
|
|
602
|
+
}
|
|
527
603
|
export interface Schedules {
|
|
528
604
|
$type: "keelson.Schedules";
|
|
529
605
|
/** Multiple schedules can coexist (e.g. "manual", "weather-optimized"). */
|
|
@@ -719,6 +795,7 @@ export declare const Waypoints: MessageFns<Waypoints, "keelson.Waypoints">;
|
|
|
719
795
|
export declare const DefaultWaypoint: MessageFns<DefaultWaypoint, "keelson.DefaultWaypoint">;
|
|
720
796
|
export declare const Waypoint: MessageFns<Waypoint, "keelson.Waypoint">;
|
|
721
797
|
export declare const Leg: MessageFns<Leg, "keelson.Leg">;
|
|
798
|
+
export declare const XtdBoundaryPoint: MessageFns<XtdBoundaryPoint, "keelson.XtdBoundaryPoint">;
|
|
722
799
|
export declare const Schedules: MessageFns<Schedules, "keelson.Schedules">;
|
|
723
800
|
export declare const Schedule: MessageFns<Schedule, "keelson.Schedule">;
|
|
724
801
|
export declare const ScheduleElement: MessageFns<ScheduleElement, "keelson.ScheduleElement">;
|
package/dist/payloads/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 = void 0;
|
|
8
|
+
exports.Leg = 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 = 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 = 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
|
|
@@ -2264,6 +2323,9 @@ function createBaseLeg() {
|
|
|
2264
2323
|
xtdStarboardM: undefined,
|
|
2265
2324
|
xtdMonitoringPortM: undefined,
|
|
2266
2325
|
xtdMonitoringStarboardM: undefined,
|
|
2326
|
+
xtdCorridorMode: 0,
|
|
2327
|
+
xtdPortBoundary: [],
|
|
2328
|
+
xtdStarboardBoundary: [],
|
|
2267
2329
|
safetyContourM: undefined,
|
|
2268
2330
|
safetyDepthM: undefined,
|
|
2269
2331
|
ukcStaticM: undefined,
|
|
@@ -2302,6 +2364,15 @@ exports.Leg = {
|
|
|
2302
2364
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2303
2365
|
writer.uint32(37).float(message.xtdMonitoringStarboardM);
|
|
2304
2366
|
}
|
|
2367
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2368
|
+
writer.uint32(40).int32(message.xtdCorridorMode);
|
|
2369
|
+
}
|
|
2370
|
+
for (const v of message.xtdPortBoundary) {
|
|
2371
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(50).fork()).join();
|
|
2372
|
+
}
|
|
2373
|
+
for (const v of message.xtdStarboardBoundary) {
|
|
2374
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(58).fork()).join();
|
|
2375
|
+
}
|
|
2305
2376
|
if (message.safetyContourM !== undefined) {
|
|
2306
2377
|
writer.uint32(85).float(message.safetyContourM);
|
|
2307
2378
|
}
|
|
@@ -2402,6 +2473,27 @@ exports.Leg = {
|
|
|
2402
2473
|
message.xtdMonitoringStarboardM = reader.float();
|
|
2403
2474
|
continue;
|
|
2404
2475
|
}
|
|
2476
|
+
case 5: {
|
|
2477
|
+
if (tag !== 40) {
|
|
2478
|
+
break;
|
|
2479
|
+
}
|
|
2480
|
+
message.xtdCorridorMode = reader.int32();
|
|
2481
|
+
continue;
|
|
2482
|
+
}
|
|
2483
|
+
case 6: {
|
|
2484
|
+
if (tag !== 50) {
|
|
2485
|
+
break;
|
|
2486
|
+
}
|
|
2487
|
+
message.xtdPortBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2488
|
+
continue;
|
|
2489
|
+
}
|
|
2490
|
+
case 7: {
|
|
2491
|
+
if (tag !== 58) {
|
|
2492
|
+
break;
|
|
2493
|
+
}
|
|
2494
|
+
message.xtdStarboardBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2495
|
+
continue;
|
|
2496
|
+
}
|
|
2405
2497
|
case 10: {
|
|
2406
2498
|
if (tag !== 85) {
|
|
2407
2499
|
break;
|
|
@@ -2566,6 +2658,13 @@ exports.Leg = {
|
|
|
2566
2658
|
xtdMonitoringStarboardM: isSet(object.xtdMonitoringStarboardM)
|
|
2567
2659
|
? globalThis.Number(object.xtdMonitoringStarboardM)
|
|
2568
2660
|
: undefined,
|
|
2661
|
+
xtdCorridorMode: isSet(object.xtdCorridorMode) ? xtdCorridorModeFromJSON(object.xtdCorridorMode) : 0,
|
|
2662
|
+
xtdPortBoundary: globalThis.Array.isArray(object?.xtdPortBoundary)
|
|
2663
|
+
? object.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2664
|
+
: [],
|
|
2665
|
+
xtdStarboardBoundary: globalThis.Array.isArray(object?.xtdStarboardBoundary)
|
|
2666
|
+
? object.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2667
|
+
: [],
|
|
2569
2668
|
safetyContourM: isSet(object.safetyContourM) ? globalThis.Number(object.safetyContourM) : undefined,
|
|
2570
2669
|
safetyDepthM: isSet(object.safetyDepthM) ? globalThis.Number(object.safetyDepthM) : undefined,
|
|
2571
2670
|
ukcStaticM: isSet(object.ukcStaticM) ? globalThis.Number(object.ukcStaticM) : undefined,
|
|
@@ -2605,6 +2704,15 @@ exports.Leg = {
|
|
|
2605
2704
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2606
2705
|
obj.xtdMonitoringStarboardM = message.xtdMonitoringStarboardM;
|
|
2607
2706
|
}
|
|
2707
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2708
|
+
obj.xtdCorridorMode = xtdCorridorModeToJSON(message.xtdCorridorMode);
|
|
2709
|
+
}
|
|
2710
|
+
if (message.xtdPortBoundary?.length) {
|
|
2711
|
+
obj.xtdPortBoundary = message.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2712
|
+
}
|
|
2713
|
+
if (message.xtdStarboardBoundary?.length) {
|
|
2714
|
+
obj.xtdStarboardBoundary = message.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2715
|
+
}
|
|
2608
2716
|
if (message.safetyContourM !== undefined) {
|
|
2609
2717
|
obj.safetyContourM = message.safetyContourM;
|
|
2610
2718
|
}
|
|
@@ -2679,6 +2787,9 @@ exports.Leg = {
|
|
|
2679
2787
|
message.xtdStarboardM = object.xtdStarboardM ?? undefined;
|
|
2680
2788
|
message.xtdMonitoringPortM = object.xtdMonitoringPortM ?? undefined;
|
|
2681
2789
|
message.xtdMonitoringStarboardM = object.xtdMonitoringStarboardM ?? undefined;
|
|
2790
|
+
message.xtdCorridorMode = object.xtdCorridorMode ?? 0;
|
|
2791
|
+
message.xtdPortBoundary = object.xtdPortBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2792
|
+
message.xtdStarboardBoundary = object.xtdStarboardBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2682
2793
|
message.safetyContourM = object.safetyContourM ?? undefined;
|
|
2683
2794
|
message.safetyDepthM = object.safetyDepthM ?? undefined;
|
|
2684
2795
|
message.ukcStaticM = object.ukcStaticM ?? undefined;
|
|
@@ -2706,6 +2817,115 @@ exports.Leg = {
|
|
|
2706
2817
|
},
|
|
2707
2818
|
};
|
|
2708
2819
|
typeRegistry_1.messageTypeRegistry.set(exports.Leg.$type, exports.Leg);
|
|
2820
|
+
function createBaseXtdBoundaryPoint() {
|
|
2821
|
+
return {
|
|
2822
|
+
$type: "keelson.XtdBoundaryPoint",
|
|
2823
|
+
position: undefined,
|
|
2824
|
+
alongTrackFraction: undefined,
|
|
2825
|
+
offsetM: undefined,
|
|
2826
|
+
inTurn: false,
|
|
2827
|
+
};
|
|
2828
|
+
}
|
|
2829
|
+
exports.XtdBoundaryPoint = {
|
|
2830
|
+
$type: "keelson.XtdBoundaryPoint",
|
|
2831
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2832
|
+
if (message.position !== undefined) {
|
|
2833
|
+
Coordinate_1.Coordinate.encode(message.position, writer.uint32(10).fork()).join();
|
|
2834
|
+
}
|
|
2835
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2836
|
+
writer.uint32(17).double(message.alongTrackFraction);
|
|
2837
|
+
}
|
|
2838
|
+
if (message.offsetM !== undefined) {
|
|
2839
|
+
writer.uint32(29).float(message.offsetM);
|
|
2840
|
+
}
|
|
2841
|
+
if (message.inTurn !== false) {
|
|
2842
|
+
writer.uint32(32).bool(message.inTurn);
|
|
2843
|
+
}
|
|
2844
|
+
return writer;
|
|
2845
|
+
},
|
|
2846
|
+
decode(input, length) {
|
|
2847
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2848
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2849
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2850
|
+
while (reader.pos < end) {
|
|
2851
|
+
const tag = reader.uint32();
|
|
2852
|
+
switch (tag >>> 3) {
|
|
2853
|
+
case 1: {
|
|
2854
|
+
if (tag !== 10) {
|
|
2855
|
+
break;
|
|
2856
|
+
}
|
|
2857
|
+
message.position = Coordinate_1.Coordinate.decode(reader, reader.uint32());
|
|
2858
|
+
continue;
|
|
2859
|
+
}
|
|
2860
|
+
case 2: {
|
|
2861
|
+
if (tag !== 17) {
|
|
2862
|
+
break;
|
|
2863
|
+
}
|
|
2864
|
+
message.alongTrackFraction = reader.double();
|
|
2865
|
+
continue;
|
|
2866
|
+
}
|
|
2867
|
+
case 3: {
|
|
2868
|
+
if (tag !== 29) {
|
|
2869
|
+
break;
|
|
2870
|
+
}
|
|
2871
|
+
message.offsetM = reader.float();
|
|
2872
|
+
continue;
|
|
2873
|
+
}
|
|
2874
|
+
case 4: {
|
|
2875
|
+
if (tag !== 32) {
|
|
2876
|
+
break;
|
|
2877
|
+
}
|
|
2878
|
+
message.inTurn = reader.bool();
|
|
2879
|
+
continue;
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2883
|
+
break;
|
|
2884
|
+
}
|
|
2885
|
+
reader.skip(tag & 7);
|
|
2886
|
+
}
|
|
2887
|
+
return message;
|
|
2888
|
+
},
|
|
2889
|
+
fromJSON(object) {
|
|
2890
|
+
return {
|
|
2891
|
+
$type: exports.XtdBoundaryPoint.$type,
|
|
2892
|
+
position: isSet(object.position) ? Coordinate_1.Coordinate.fromJSON(object.position) : undefined,
|
|
2893
|
+
alongTrackFraction: isSet(object.alongTrackFraction) ? globalThis.Number(object.alongTrackFraction) : undefined,
|
|
2894
|
+
offsetM: isSet(object.offsetM) ? globalThis.Number(object.offsetM) : undefined,
|
|
2895
|
+
inTurn: isSet(object.inTurn) ? globalThis.Boolean(object.inTurn) : false,
|
|
2896
|
+
};
|
|
2897
|
+
},
|
|
2898
|
+
toJSON(message) {
|
|
2899
|
+
const obj = {};
|
|
2900
|
+
if (message.position !== undefined) {
|
|
2901
|
+
obj.position = Coordinate_1.Coordinate.toJSON(message.position);
|
|
2902
|
+
}
|
|
2903
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2904
|
+
obj.alongTrackFraction = message.alongTrackFraction;
|
|
2905
|
+
}
|
|
2906
|
+
if (message.offsetM !== undefined) {
|
|
2907
|
+
obj.offsetM = message.offsetM;
|
|
2908
|
+
}
|
|
2909
|
+
if (message.inTurn !== false) {
|
|
2910
|
+
obj.inTurn = message.inTurn;
|
|
2911
|
+
}
|
|
2912
|
+
return obj;
|
|
2913
|
+
},
|
|
2914
|
+
create(base) {
|
|
2915
|
+
return exports.XtdBoundaryPoint.fromPartial(base ?? {});
|
|
2916
|
+
},
|
|
2917
|
+
fromPartial(object) {
|
|
2918
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2919
|
+
message.position = (object.position !== undefined && object.position !== null)
|
|
2920
|
+
? Coordinate_1.Coordinate.fromPartial(object.position)
|
|
2921
|
+
: undefined;
|
|
2922
|
+
message.alongTrackFraction = object.alongTrackFraction ?? undefined;
|
|
2923
|
+
message.offsetM = object.offsetM ?? undefined;
|
|
2924
|
+
message.inTurn = object.inTurn ?? false;
|
|
2925
|
+
return message;
|
|
2926
|
+
},
|
|
2927
|
+
};
|
|
2928
|
+
typeRegistry_1.messageTypeRegistry.set(exports.XtdBoundaryPoint.$type, exports.XtdBoundaryPoint);
|
|
2709
2929
|
function createBaseSchedules() {
|
|
2710
2930
|
return { $type: "keelson.Schedules", schedule: [], extensions: undefined };
|
|
2711
2931
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rise-maritime/keelson-js",
|
|
3
3
|
"//version": "NOT the published version. The release workflow overwrites it from the release tag (npm version --no-git-tag-version), so tag and artifact cannot disagree. Only matters for local installs; do not hand-bump before tagging — that manual step is what broke release 0.5.4.",
|
|
4
|
-
"version": "0.6.0-alpha.282.dev.
|
|
4
|
+
"version": "0.6.0-alpha.282.dev.2",
|
|
5
5
|
"description": "Keelson JavaScript SDK with Node-RED nodes",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|