@rise-maritime/keelson-js 0.6.0-alpha.255.dev.1 → 0.6.0-alpha.275.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/index.d.ts +83 -8
- package/dist/index.js +23 -1
- package/dist/index.test.js +31 -0
- package/dist/interfaces/AlarmAck.d.ts +2 -2
- package/dist/interfaces/AlarmAck.js +2 -2
- package/dist/interfaces/ContainerControl.d.ts +239 -0
- package/dist/interfaces/ContainerControl.js +1053 -0
- package/dist/interfaces/ContainerHost.d.ts +403 -0
- package/dist/interfaces/ContainerHost.js +1230 -0
- package/dist/interfaces/ErrorResponse.d.ts +7 -2
- package/dist/interfaces/ErrorResponse.js +12 -2
- package/dist/interfaces/Route.d.ts +141 -6
- package/dist/interfaces/Route.js +309 -4
- package/dist/interfaces/RoutePlanner.d.ts +19 -1
- package/dist/interfaces/RoutePlanner.js +23 -1
- package/dist/interfaces/ScenarioControl.d.ts +132 -3
- package/dist/interfaces/ScenarioControl.js +439 -37
- package/dist/interfaces/VehicleNavigation.d.ts +55 -0
- package/dist/interfaces/VehicleNavigation.js +233 -1
- package/dist/interfaces/VehicleSimulatorControl.d.ts +0 -83
- package/dist/interfaces/VehicleSimulatorControl.js +1 -293
- package/dist/interfaces/serviceRegistry.d.ts +84 -8
- package/dist/interfaces/serviceRegistry.js +4 -0
- package/dist/interfaces.json +2 -0
- package/dist/payloads/AdviceDisposition.d.ts +55 -0
- package/dist/payloads/AdviceDisposition.js +242 -0
- package/dist/payloads/ChecklistHandover.d.ts +522 -0
- package/dist/payloads/ChecklistHandover.js +1735 -0
- package/dist/payloads/ContainerHost.d.ts +407 -0
- package/dist/payloads/ContainerHost.js +1245 -0
- package/dist/payloads/Encounter.d.ts +104 -0
- package/dist/payloads/Encounter.js +573 -0
- package/dist/payloads/NavigationAdvice.d.ts +94 -0
- package/dist/payloads/NavigationAdvice.js +596 -0
- package/dist/payloads/NavigationState.d.ts +90 -0
- package/dist/payloads/NavigationState.js +377 -0
- package/dist/payloads/Route.d.ts +142 -6
- package/dist/payloads/Route.js +318 -4
- package/dist/payloads/RouteExecution.d.ts +7 -0
- package/dist/payloads/ScenarioEvent.d.ts +14 -0
- package/dist/payloads/ScenarioEvent.js +16 -0
- package/dist/payloads/index.d.ts +1 -1
- package/dist/payloads/index.js +2 -2
- package/dist/payloads/index.keelson.d.ts +10 -4
- package/dist/payloads/index.keelson.js +10 -4
- package/dist/qos.json +6 -0
- package/dist/subjects.json +20 -1
- package/package.json +1 -1
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 = 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");
|
|
@@ -267,14 +267,25 @@ function hazardZoneTypeToJSON(object) {
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
exports.hazardZoneTypeToJSON = hazardZoneTypeToJSON;
|
|
270
|
-
/**
|
|
270
|
+
/**
|
|
271
|
+
* COLREG encounter situation, from own ship's side. One vocabulary for the plan and the live
|
|
272
|
+
* picture: a Route leg is annotated with 1-4 only; Encounter.situation may also carry 5-6, which
|
|
273
|
+
* describe a live target and never a planned leg.
|
|
274
|
+
*/
|
|
271
275
|
var ColregSituation;
|
|
272
276
|
(function (ColregSituation) {
|
|
273
277
|
ColregSituation[ColregSituation["COLREG_SITUATION_UNSPECIFIED"] = 0] = "COLREG_SITUATION_UNSPECIFIED";
|
|
278
|
+
/** COLREG_SITUATION_OVERTAKING - own ship is overtaking */
|
|
274
279
|
ColregSituation[ColregSituation["COLREG_SITUATION_OVERTAKING"] = 1] = "COLREG_SITUATION_OVERTAKING";
|
|
280
|
+
/** COLREG_SITUATION_CROSSING_STBD - target crossing from own starboard */
|
|
275
281
|
ColregSituation[ColregSituation["COLREG_SITUATION_CROSSING_STBD"] = 2] = "COLREG_SITUATION_CROSSING_STBD";
|
|
282
|
+
/** COLREG_SITUATION_CROSSING_PORT - target crossing from own port */
|
|
276
283
|
ColregSituation[ColregSituation["COLREG_SITUATION_CROSSING_PORT"] = 3] = "COLREG_SITUATION_CROSSING_PORT";
|
|
277
284
|
ColregSituation[ColregSituation["COLREG_SITUATION_HEAD_ON"] = 4] = "COLREG_SITUATION_HEAD_ON";
|
|
285
|
+
/** COLREG_SITUATION_OVERTAKEN - target is overtaking own ship (Encounter only) */
|
|
286
|
+
ColregSituation[ColregSituation["COLREG_SITUATION_OVERTAKEN"] = 5] = "COLREG_SITUATION_OVERTAKEN";
|
|
287
|
+
/** COLREG_SITUATION_NONE - target not under way, or restricted visibility (Encounter only) */
|
|
288
|
+
ColregSituation[ColregSituation["COLREG_SITUATION_NONE"] = 6] = "COLREG_SITUATION_NONE";
|
|
278
289
|
ColregSituation[ColregSituation["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
279
290
|
})(ColregSituation || (exports.ColregSituation = ColregSituation = {}));
|
|
280
291
|
function colregSituationFromJSON(object) {
|
|
@@ -294,6 +305,12 @@ function colregSituationFromJSON(object) {
|
|
|
294
305
|
case 4:
|
|
295
306
|
case "COLREG_SITUATION_HEAD_ON":
|
|
296
307
|
return ColregSituation.COLREG_SITUATION_HEAD_ON;
|
|
308
|
+
case 5:
|
|
309
|
+
case "COLREG_SITUATION_OVERTAKEN":
|
|
310
|
+
return ColregSituation.COLREG_SITUATION_OVERTAKEN;
|
|
311
|
+
case 6:
|
|
312
|
+
case "COLREG_SITUATION_NONE":
|
|
313
|
+
return ColregSituation.COLREG_SITUATION_NONE;
|
|
297
314
|
case -1:
|
|
298
315
|
case "UNRECOGNIZED":
|
|
299
316
|
default:
|
|
@@ -313,6 +330,10 @@ function colregSituationToJSON(object) {
|
|
|
313
330
|
return "COLREG_SITUATION_CROSSING_PORT";
|
|
314
331
|
case ColregSituation.COLREG_SITUATION_HEAD_ON:
|
|
315
332
|
return "COLREG_SITUATION_HEAD_ON";
|
|
333
|
+
case ColregSituation.COLREG_SITUATION_OVERTAKEN:
|
|
334
|
+
return "COLREG_SITUATION_OVERTAKEN";
|
|
335
|
+
case ColregSituation.COLREG_SITUATION_NONE:
|
|
336
|
+
return "COLREG_SITUATION_NONE";
|
|
316
337
|
case ColregSituation.UNRECOGNIZED:
|
|
317
338
|
default:
|
|
318
339
|
return "UNRECOGNIZED";
|
|
@@ -411,6 +432,123 @@ function geometryTypeToJSON(object) {
|
|
|
411
432
|
}
|
|
412
433
|
}
|
|
413
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
|
+
* xtd_port_m / xtd_starboard_m still carry a nominal limit for a monitor
|
|
452
|
+
* that does not evaluate the boundary. That fallback is NOT conservative when
|
|
453
|
+
* the drawn corridor is narrower than the nominal one, which is why such a
|
|
454
|
+
* monitor SHOULD report the leg as monitored at reduced fidelity.
|
|
455
|
+
*/
|
|
456
|
+
XtdCorridorMode[XtdCorridorMode["XTD_CORRIDOR_MODE_VARIABLE"] = 2] = "XTD_CORRIDOR_MODE_VARIABLE";
|
|
457
|
+
XtdCorridorMode[XtdCorridorMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
458
|
+
})(XtdCorridorMode || (exports.XtdCorridorMode = XtdCorridorMode = {}));
|
|
459
|
+
function xtdCorridorModeFromJSON(object) {
|
|
460
|
+
switch (object) {
|
|
461
|
+
case 0:
|
|
462
|
+
case "XTD_CORRIDOR_MODE_UNSPECIFIED":
|
|
463
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_UNSPECIFIED;
|
|
464
|
+
case 1:
|
|
465
|
+
case "XTD_CORRIDOR_MODE_FIXED":
|
|
466
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_FIXED;
|
|
467
|
+
case 2:
|
|
468
|
+
case "XTD_CORRIDOR_MODE_VARIABLE":
|
|
469
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_VARIABLE;
|
|
470
|
+
case -1:
|
|
471
|
+
case "UNRECOGNIZED":
|
|
472
|
+
default:
|
|
473
|
+
return XtdCorridorMode.UNRECOGNIZED;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
exports.xtdCorridorModeFromJSON = xtdCorridorModeFromJSON;
|
|
477
|
+
function xtdCorridorModeToJSON(object) {
|
|
478
|
+
switch (object) {
|
|
479
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_UNSPECIFIED:
|
|
480
|
+
return "XTD_CORRIDOR_MODE_UNSPECIFIED";
|
|
481
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_FIXED:
|
|
482
|
+
return "XTD_CORRIDOR_MODE_FIXED";
|
|
483
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_VARIABLE:
|
|
484
|
+
return "XTD_CORRIDOR_MODE_VARIABLE";
|
|
485
|
+
case XtdCorridorMode.UNRECOGNIZED:
|
|
486
|
+
default:
|
|
487
|
+
return "UNRECOGNIZED";
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
exports.xtdCorridorModeToJSON = xtdCorridorModeToJSON;
|
|
491
|
+
/**
|
|
492
|
+
* Whether a route's waypoint list closes back on itself. RTZ 1.2 has no such
|
|
493
|
+
* concept, so producers either repeated the first waypoint (breaking id
|
|
494
|
+
* uniqueness) or left closing to consumer convention (silently wrong the first
|
|
495
|
+
* time a consumer chooses not to loop). This field makes the author say.
|
|
496
|
+
*
|
|
497
|
+
* An enum rather than a bool, like every other classification in this file:
|
|
498
|
+
* OPEN says closure was considered and declined, and there is room for a
|
|
499
|
+
* third topology (out-and-back). UNSPECIFIED MUST be read as OPEN; that is
|
|
500
|
+
* the fail-safe direction, since sailing a point-to-point route as a circuit
|
|
501
|
+
* takes the vessel over unplanned water. Terminal behaviour (stop, hold, go
|
|
502
|
+
* round again) is execution policy and belongs on keelson.Voyage, not here.
|
|
503
|
+
* See protocol-specification.md §6.2.1.
|
|
504
|
+
*/
|
|
505
|
+
var RouteTopology;
|
|
506
|
+
(function (RouteTopology) {
|
|
507
|
+
RouteTopology[RouteTopology["ROUTE_TOPOLOGY_UNSPECIFIED"] = 0] = "ROUTE_TOPOLOGY_UNSPECIFIED";
|
|
508
|
+
/**
|
|
509
|
+
* ROUTE_TOPOLOGY_OPEN - Runs from the first waypoint to the last and ends there. The last
|
|
510
|
+
* waypoint has no outgoing leg.
|
|
511
|
+
*/
|
|
512
|
+
RouteTopology[RouteTopology["ROUTE_TOPOLOGY_OPEN"] = 1] = "ROUTE_TOPOLOGY_OPEN";
|
|
513
|
+
/**
|
|
514
|
+
* ROUTE_TOPOLOGY_CLOSED - A circuit: the last waypoint's outgoing leg terminates at the first
|
|
515
|
+
* waypoint, which is NOT repeated at the end of the list.
|
|
516
|
+
*/
|
|
517
|
+
RouteTopology[RouteTopology["ROUTE_TOPOLOGY_CLOSED"] = 2] = "ROUTE_TOPOLOGY_CLOSED";
|
|
518
|
+
RouteTopology[RouteTopology["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
519
|
+
})(RouteTopology || (exports.RouteTopology = RouteTopology = {}));
|
|
520
|
+
function routeTopologyFromJSON(object) {
|
|
521
|
+
switch (object) {
|
|
522
|
+
case 0:
|
|
523
|
+
case "ROUTE_TOPOLOGY_UNSPECIFIED":
|
|
524
|
+
return RouteTopology.ROUTE_TOPOLOGY_UNSPECIFIED;
|
|
525
|
+
case 1:
|
|
526
|
+
case "ROUTE_TOPOLOGY_OPEN":
|
|
527
|
+
return RouteTopology.ROUTE_TOPOLOGY_OPEN;
|
|
528
|
+
case 2:
|
|
529
|
+
case "ROUTE_TOPOLOGY_CLOSED":
|
|
530
|
+
return RouteTopology.ROUTE_TOPOLOGY_CLOSED;
|
|
531
|
+
case -1:
|
|
532
|
+
case "UNRECOGNIZED":
|
|
533
|
+
default:
|
|
534
|
+
return RouteTopology.UNRECOGNIZED;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
exports.routeTopologyFromJSON = routeTopologyFromJSON;
|
|
538
|
+
function routeTopologyToJSON(object) {
|
|
539
|
+
switch (object) {
|
|
540
|
+
case RouteTopology.ROUTE_TOPOLOGY_UNSPECIFIED:
|
|
541
|
+
return "ROUTE_TOPOLOGY_UNSPECIFIED";
|
|
542
|
+
case RouteTopology.ROUTE_TOPOLOGY_OPEN:
|
|
543
|
+
return "ROUTE_TOPOLOGY_OPEN";
|
|
544
|
+
case RouteTopology.ROUTE_TOPOLOGY_CLOSED:
|
|
545
|
+
return "ROUTE_TOPOLOGY_CLOSED";
|
|
546
|
+
case RouteTopology.UNRECOGNIZED:
|
|
547
|
+
default:
|
|
548
|
+
return "UNRECOGNIZED";
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
exports.routeTopologyToJSON = routeTopologyToJSON;
|
|
414
552
|
/**
|
|
415
553
|
* Lifecycle status for the route artifact (authoring + quality).
|
|
416
554
|
* Execution-side state (vessel sailing, paused, completed) lives on
|
|
@@ -1696,7 +1834,7 @@ exports.RouteInfo = {
|
|
|
1696
1834
|
},
|
|
1697
1835
|
};
|
|
1698
1836
|
function createBaseWaypoints() {
|
|
1699
|
-
return { defaults: undefined, waypoint: [], extensions: undefined };
|
|
1837
|
+
return { defaults: undefined, waypoint: [], topology: 0, extensions: undefined };
|
|
1700
1838
|
}
|
|
1701
1839
|
exports.Waypoints = {
|
|
1702
1840
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -1706,6 +1844,9 @@ exports.Waypoints = {
|
|
|
1706
1844
|
for (const v of message.waypoint) {
|
|
1707
1845
|
exports.Waypoint.encode(v, writer.uint32(18).fork()).join();
|
|
1708
1846
|
}
|
|
1847
|
+
if (message.topology !== 0) {
|
|
1848
|
+
writer.uint32(24).int32(message.topology);
|
|
1849
|
+
}
|
|
1709
1850
|
if (message.extensions !== undefined) {
|
|
1710
1851
|
exports.Extensions.encode(message.extensions, writer.uint32(794).fork()).join();
|
|
1711
1852
|
}
|
|
@@ -1732,6 +1873,13 @@ exports.Waypoints = {
|
|
|
1732
1873
|
message.waypoint.push(exports.Waypoint.decode(reader, reader.uint32()));
|
|
1733
1874
|
continue;
|
|
1734
1875
|
}
|
|
1876
|
+
case 3: {
|
|
1877
|
+
if (tag !== 24) {
|
|
1878
|
+
break;
|
|
1879
|
+
}
|
|
1880
|
+
message.topology = reader.int32();
|
|
1881
|
+
continue;
|
|
1882
|
+
}
|
|
1735
1883
|
case 99: {
|
|
1736
1884
|
if (tag !== 794) {
|
|
1737
1885
|
break;
|
|
@@ -1751,6 +1899,7 @@ exports.Waypoints = {
|
|
|
1751
1899
|
return {
|
|
1752
1900
|
defaults: isSet(object.defaults) ? exports.DefaultWaypoint.fromJSON(object.defaults) : undefined,
|
|
1753
1901
|
waypoint: globalThis.Array.isArray(object?.waypoint) ? object.waypoint.map((e) => exports.Waypoint.fromJSON(e)) : [],
|
|
1902
|
+
topology: isSet(object.topology) ? routeTopologyFromJSON(object.topology) : 0,
|
|
1754
1903
|
extensions: isSet(object.extensions) ? exports.Extensions.fromJSON(object.extensions) : undefined,
|
|
1755
1904
|
};
|
|
1756
1905
|
},
|
|
@@ -1762,6 +1911,9 @@ exports.Waypoints = {
|
|
|
1762
1911
|
if (message.waypoint?.length) {
|
|
1763
1912
|
obj.waypoint = message.waypoint.map((e) => exports.Waypoint.toJSON(e));
|
|
1764
1913
|
}
|
|
1914
|
+
if (message.topology !== 0) {
|
|
1915
|
+
obj.topology = routeTopologyToJSON(message.topology);
|
|
1916
|
+
}
|
|
1765
1917
|
if (message.extensions !== undefined) {
|
|
1766
1918
|
obj.extensions = exports.Extensions.toJSON(message.extensions);
|
|
1767
1919
|
}
|
|
@@ -1776,6 +1928,7 @@ exports.Waypoints = {
|
|
|
1776
1928
|
? exports.DefaultWaypoint.fromPartial(object.defaults)
|
|
1777
1929
|
: undefined;
|
|
1778
1930
|
message.waypoint = object.waypoint?.map((e) => exports.Waypoint.fromPartial(e)) || [];
|
|
1931
|
+
message.topology = object.topology ?? 0;
|
|
1779
1932
|
message.extensions = (object.extensions !== undefined && object.extensions !== null)
|
|
1780
1933
|
? exports.Extensions.fromPartial(object.extensions)
|
|
1781
1934
|
: undefined;
|
|
@@ -2122,6 +2275,9 @@ function createBaseLeg() {
|
|
|
2122
2275
|
xtdStarboardM: undefined,
|
|
2123
2276
|
xtdMonitoringPortM: undefined,
|
|
2124
2277
|
xtdMonitoringStarboardM: undefined,
|
|
2278
|
+
xtdCorridorMode: 0,
|
|
2279
|
+
xtdPortBoundary: [],
|
|
2280
|
+
xtdStarboardBoundary: [],
|
|
2125
2281
|
safetyContourM: undefined,
|
|
2126
2282
|
safetyDepthM: undefined,
|
|
2127
2283
|
ukcStaticM: undefined,
|
|
@@ -2159,6 +2315,15 @@ exports.Leg = {
|
|
|
2159
2315
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2160
2316
|
writer.uint32(37).float(message.xtdMonitoringStarboardM);
|
|
2161
2317
|
}
|
|
2318
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2319
|
+
writer.uint32(40).int32(message.xtdCorridorMode);
|
|
2320
|
+
}
|
|
2321
|
+
for (const v of message.xtdPortBoundary) {
|
|
2322
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(50).fork()).join();
|
|
2323
|
+
}
|
|
2324
|
+
for (const v of message.xtdStarboardBoundary) {
|
|
2325
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(58).fork()).join();
|
|
2326
|
+
}
|
|
2162
2327
|
if (message.safetyContourM !== undefined) {
|
|
2163
2328
|
writer.uint32(85).float(message.safetyContourM);
|
|
2164
2329
|
}
|
|
@@ -2259,6 +2424,27 @@ exports.Leg = {
|
|
|
2259
2424
|
message.xtdMonitoringStarboardM = reader.float();
|
|
2260
2425
|
continue;
|
|
2261
2426
|
}
|
|
2427
|
+
case 5: {
|
|
2428
|
+
if (tag !== 40) {
|
|
2429
|
+
break;
|
|
2430
|
+
}
|
|
2431
|
+
message.xtdCorridorMode = reader.int32();
|
|
2432
|
+
continue;
|
|
2433
|
+
}
|
|
2434
|
+
case 6: {
|
|
2435
|
+
if (tag !== 50) {
|
|
2436
|
+
break;
|
|
2437
|
+
}
|
|
2438
|
+
message.xtdPortBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2439
|
+
continue;
|
|
2440
|
+
}
|
|
2441
|
+
case 7: {
|
|
2442
|
+
if (tag !== 58) {
|
|
2443
|
+
break;
|
|
2444
|
+
}
|
|
2445
|
+
message.xtdStarboardBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2446
|
+
continue;
|
|
2447
|
+
}
|
|
2262
2448
|
case 10: {
|
|
2263
2449
|
if (tag !== 85) {
|
|
2264
2450
|
break;
|
|
@@ -2422,6 +2608,13 @@ exports.Leg = {
|
|
|
2422
2608
|
xtdMonitoringStarboardM: isSet(object.xtdMonitoringStarboardM)
|
|
2423
2609
|
? globalThis.Number(object.xtdMonitoringStarboardM)
|
|
2424
2610
|
: undefined,
|
|
2611
|
+
xtdCorridorMode: isSet(object.xtdCorridorMode) ? xtdCorridorModeFromJSON(object.xtdCorridorMode) : 0,
|
|
2612
|
+
xtdPortBoundary: globalThis.Array.isArray(object?.xtdPortBoundary)
|
|
2613
|
+
? object.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2614
|
+
: [],
|
|
2615
|
+
xtdStarboardBoundary: globalThis.Array.isArray(object?.xtdStarboardBoundary)
|
|
2616
|
+
? object.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2617
|
+
: [],
|
|
2425
2618
|
safetyContourM: isSet(object.safetyContourM) ? globalThis.Number(object.safetyContourM) : undefined,
|
|
2426
2619
|
safetyDepthM: isSet(object.safetyDepthM) ? globalThis.Number(object.safetyDepthM) : undefined,
|
|
2427
2620
|
ukcStaticM: isSet(object.ukcStaticM) ? globalThis.Number(object.ukcStaticM) : undefined,
|
|
@@ -2461,6 +2654,15 @@ exports.Leg = {
|
|
|
2461
2654
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2462
2655
|
obj.xtdMonitoringStarboardM = message.xtdMonitoringStarboardM;
|
|
2463
2656
|
}
|
|
2657
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2658
|
+
obj.xtdCorridorMode = xtdCorridorModeToJSON(message.xtdCorridorMode);
|
|
2659
|
+
}
|
|
2660
|
+
if (message.xtdPortBoundary?.length) {
|
|
2661
|
+
obj.xtdPortBoundary = message.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2662
|
+
}
|
|
2663
|
+
if (message.xtdStarboardBoundary?.length) {
|
|
2664
|
+
obj.xtdStarboardBoundary = message.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2665
|
+
}
|
|
2464
2666
|
if (message.safetyContourM !== undefined) {
|
|
2465
2667
|
obj.safetyContourM = message.safetyContourM;
|
|
2466
2668
|
}
|
|
@@ -2535,6 +2737,9 @@ exports.Leg = {
|
|
|
2535
2737
|
message.xtdStarboardM = object.xtdStarboardM ?? undefined;
|
|
2536
2738
|
message.xtdMonitoringPortM = object.xtdMonitoringPortM ?? undefined;
|
|
2537
2739
|
message.xtdMonitoringStarboardM = object.xtdMonitoringStarboardM ?? undefined;
|
|
2740
|
+
message.xtdCorridorMode = object.xtdCorridorMode ?? 0;
|
|
2741
|
+
message.xtdPortBoundary = object.xtdPortBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2742
|
+
message.xtdStarboardBoundary = object.xtdStarboardBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2538
2743
|
message.safetyContourM = object.safetyContourM ?? undefined;
|
|
2539
2744
|
message.safetyDepthM = object.safetyDepthM ?? undefined;
|
|
2540
2745
|
message.ukcStaticM = object.ukcStaticM ?? undefined;
|
|
@@ -2561,6 +2766,106 @@ exports.Leg = {
|
|
|
2561
2766
|
return message;
|
|
2562
2767
|
},
|
|
2563
2768
|
};
|
|
2769
|
+
function createBaseXtdBoundaryPoint() {
|
|
2770
|
+
return { position: undefined, alongTrackFraction: undefined, offsetM: undefined, inTurn: false };
|
|
2771
|
+
}
|
|
2772
|
+
exports.XtdBoundaryPoint = {
|
|
2773
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2774
|
+
if (message.position !== undefined) {
|
|
2775
|
+
Coordinate_1.Coordinate.encode(message.position, writer.uint32(10).fork()).join();
|
|
2776
|
+
}
|
|
2777
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2778
|
+
writer.uint32(17).double(message.alongTrackFraction);
|
|
2779
|
+
}
|
|
2780
|
+
if (message.offsetM !== undefined) {
|
|
2781
|
+
writer.uint32(29).float(message.offsetM);
|
|
2782
|
+
}
|
|
2783
|
+
if (message.inTurn !== false) {
|
|
2784
|
+
writer.uint32(32).bool(message.inTurn);
|
|
2785
|
+
}
|
|
2786
|
+
return writer;
|
|
2787
|
+
},
|
|
2788
|
+
decode(input, length) {
|
|
2789
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2790
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2791
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2792
|
+
while (reader.pos < end) {
|
|
2793
|
+
const tag = reader.uint32();
|
|
2794
|
+
switch (tag >>> 3) {
|
|
2795
|
+
case 1: {
|
|
2796
|
+
if (tag !== 10) {
|
|
2797
|
+
break;
|
|
2798
|
+
}
|
|
2799
|
+
message.position = Coordinate_1.Coordinate.decode(reader, reader.uint32());
|
|
2800
|
+
continue;
|
|
2801
|
+
}
|
|
2802
|
+
case 2: {
|
|
2803
|
+
if (tag !== 17) {
|
|
2804
|
+
break;
|
|
2805
|
+
}
|
|
2806
|
+
message.alongTrackFraction = reader.double();
|
|
2807
|
+
continue;
|
|
2808
|
+
}
|
|
2809
|
+
case 3: {
|
|
2810
|
+
if (tag !== 29) {
|
|
2811
|
+
break;
|
|
2812
|
+
}
|
|
2813
|
+
message.offsetM = reader.float();
|
|
2814
|
+
continue;
|
|
2815
|
+
}
|
|
2816
|
+
case 4: {
|
|
2817
|
+
if (tag !== 32) {
|
|
2818
|
+
break;
|
|
2819
|
+
}
|
|
2820
|
+
message.inTurn = reader.bool();
|
|
2821
|
+
continue;
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2825
|
+
break;
|
|
2826
|
+
}
|
|
2827
|
+
reader.skip(tag & 7);
|
|
2828
|
+
}
|
|
2829
|
+
return message;
|
|
2830
|
+
},
|
|
2831
|
+
fromJSON(object) {
|
|
2832
|
+
return {
|
|
2833
|
+
position: isSet(object.position) ? Coordinate_1.Coordinate.fromJSON(object.position) : undefined,
|
|
2834
|
+
alongTrackFraction: isSet(object.alongTrackFraction) ? globalThis.Number(object.alongTrackFraction) : undefined,
|
|
2835
|
+
offsetM: isSet(object.offsetM) ? globalThis.Number(object.offsetM) : undefined,
|
|
2836
|
+
inTurn: isSet(object.inTurn) ? globalThis.Boolean(object.inTurn) : false,
|
|
2837
|
+
};
|
|
2838
|
+
},
|
|
2839
|
+
toJSON(message) {
|
|
2840
|
+
const obj = {};
|
|
2841
|
+
if (message.position !== undefined) {
|
|
2842
|
+
obj.position = Coordinate_1.Coordinate.toJSON(message.position);
|
|
2843
|
+
}
|
|
2844
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2845
|
+
obj.alongTrackFraction = message.alongTrackFraction;
|
|
2846
|
+
}
|
|
2847
|
+
if (message.offsetM !== undefined) {
|
|
2848
|
+
obj.offsetM = message.offsetM;
|
|
2849
|
+
}
|
|
2850
|
+
if (message.inTurn !== false) {
|
|
2851
|
+
obj.inTurn = message.inTurn;
|
|
2852
|
+
}
|
|
2853
|
+
return obj;
|
|
2854
|
+
},
|
|
2855
|
+
create(base) {
|
|
2856
|
+
return exports.XtdBoundaryPoint.fromPartial(base ?? {});
|
|
2857
|
+
},
|
|
2858
|
+
fromPartial(object) {
|
|
2859
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2860
|
+
message.position = (object.position !== undefined && object.position !== null)
|
|
2861
|
+
? Coordinate_1.Coordinate.fromPartial(object.position)
|
|
2862
|
+
: undefined;
|
|
2863
|
+
message.alongTrackFraction = object.alongTrackFraction ?? undefined;
|
|
2864
|
+
message.offsetM = object.offsetM ?? undefined;
|
|
2865
|
+
message.inTurn = object.inTurn ?? false;
|
|
2866
|
+
return message;
|
|
2867
|
+
},
|
|
2868
|
+
};
|
|
2564
2869
|
function createBaseSchedules() {
|
|
2565
2870
|
return { schedule: [], extensions: undefined };
|
|
2566
2871
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { Coordinate } from "./Coordinate";
|
|
3
|
-
import { Extensions, Route, RouteInfo, RouteRef } from "./Route";
|
|
3
|
+
import { Extensions, Route, RouteInfo, RouteRef, RouteTopology } from "./Route";
|
|
4
4
|
export declare const protobufPackage = "keelson.interfaces.route_planner";
|
|
5
5
|
/**
|
|
6
6
|
* What the planner should optimise for. A closed set, not the free-form
|
|
@@ -46,6 +46,8 @@ export interface PlanRouteRequest {
|
|
|
46
46
|
* `Coordinate`, not `Waypoint` — these are the positions the route must
|
|
47
47
|
* touch, not planned waypoints with turn radii and speeds. Those are the
|
|
48
48
|
* planner's output, not its input.
|
|
49
|
+
* Under `topology = CLOSED` this list is the circuit's via-points: the first
|
|
50
|
+
* is both departure and final arrival, and it is NOT repeated at the end.
|
|
49
51
|
*/
|
|
50
52
|
waypoints: Coordinate[];
|
|
51
53
|
/**
|
|
@@ -64,6 +66,15 @@ export interface PlanRouteRequest {
|
|
|
64
66
|
* reply with more.
|
|
65
67
|
*/
|
|
66
68
|
maxAlternatives: number;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the caller wants a point-to-point route or a circuit. Without it
|
|
71
|
+
* a circuit is unrequestable and the planner's own convention becomes the
|
|
72
|
+
* new implicit rule, one layer up from where it was just removed. Under
|
|
73
|
+
* CLOSED the planner MUST set `Waypoints.topology` on every alternative and
|
|
74
|
+
* close it with a leg on the last waypoint, never by appending a copy of
|
|
75
|
+
* `waypoints[0]`. See protocol-specification.md §6.2.1.
|
|
76
|
+
*/
|
|
77
|
+
topology: RouteTopology;
|
|
67
78
|
/**
|
|
68
79
|
* Vendor-specific planning inputs — deployment tunings, experimental cost
|
|
69
80
|
* profiles. Anything that becomes generally useful should graduate to a
|
|
@@ -94,6 +105,13 @@ export declare const RoutePlannerDefinition: {
|
|
|
94
105
|
* Re-run navigability and validation against a (possibly hand-edited)
|
|
95
106
|
* route, replying it annotated with `challenges`, `issues` and `status`.
|
|
96
107
|
* Takes a whole `keelson.Route` because that is genuinely the input.
|
|
108
|
+
*
|
|
109
|
+
* The closure invariants of §6.2.1 are part of what is validated, and a
|
|
110
|
+
* breach is a `RouteIssue`: the last waypoint carries a `leg` if and only if
|
|
111
|
+
* the topology is CLOSED, the first waypoint is not repeated at the end,
|
|
112
|
+
* waypoint ids are unique, and a CLOSED route has at least two waypoints.
|
|
113
|
+
* Exactly two is legal but coincident out-and-back geometry — a
|
|
114
|
+
* `RouteChallenge`, not an error.
|
|
97
115
|
*/
|
|
98
116
|
readonly validate_route: {
|
|
99
117
|
readonly name: "validate_route";
|
|
@@ -87,7 +87,7 @@ function optimizationGoalToJSON(object) {
|
|
|
87
87
|
}
|
|
88
88
|
exports.optimizationGoalToJSON = optimizationGoalToJSON;
|
|
89
89
|
function createBasePlanRouteRequest() {
|
|
90
|
-
return { waypoints: [], constraints: undefined, goal: 0, maxAlternatives: 0, extensions: undefined };
|
|
90
|
+
return { waypoints: [], constraints: undefined, goal: 0, maxAlternatives: 0, topology: 0, extensions: undefined };
|
|
91
91
|
}
|
|
92
92
|
exports.PlanRouteRequest = {
|
|
93
93
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -103,6 +103,9 @@ exports.PlanRouteRequest = {
|
|
|
103
103
|
if (message.maxAlternatives !== 0) {
|
|
104
104
|
writer.uint32(32).uint32(message.maxAlternatives);
|
|
105
105
|
}
|
|
106
|
+
if (message.topology !== 0) {
|
|
107
|
+
writer.uint32(40).int32(message.topology);
|
|
108
|
+
}
|
|
106
109
|
if (message.extensions !== undefined) {
|
|
107
110
|
Route_1.Extensions.encode(message.extensions, writer.uint32(794).fork()).join();
|
|
108
111
|
}
|
|
@@ -143,6 +146,13 @@ exports.PlanRouteRequest = {
|
|
|
143
146
|
message.maxAlternatives = reader.uint32();
|
|
144
147
|
continue;
|
|
145
148
|
}
|
|
149
|
+
case 5: {
|
|
150
|
+
if (tag !== 40) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
message.topology = reader.int32();
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
146
156
|
case 99: {
|
|
147
157
|
if (tag !== 794) {
|
|
148
158
|
break;
|
|
@@ -166,6 +176,7 @@ exports.PlanRouteRequest = {
|
|
|
166
176
|
constraints: isSet(object.constraints) ? Route_1.RouteInfo.fromJSON(object.constraints) : undefined,
|
|
167
177
|
goal: isSet(object.goal) ? optimizationGoalFromJSON(object.goal) : 0,
|
|
168
178
|
maxAlternatives: isSet(object.maxAlternatives) ? globalThis.Number(object.maxAlternatives) : 0,
|
|
179
|
+
topology: isSet(object.topology) ? (0, Route_1.routeTopologyFromJSON)(object.topology) : 0,
|
|
169
180
|
extensions: isSet(object.extensions) ? Route_1.Extensions.fromJSON(object.extensions) : undefined,
|
|
170
181
|
};
|
|
171
182
|
},
|
|
@@ -183,6 +194,9 @@ exports.PlanRouteRequest = {
|
|
|
183
194
|
if (message.maxAlternatives !== 0) {
|
|
184
195
|
obj.maxAlternatives = Math.round(message.maxAlternatives);
|
|
185
196
|
}
|
|
197
|
+
if (message.topology !== 0) {
|
|
198
|
+
obj.topology = (0, Route_1.routeTopologyToJSON)(message.topology);
|
|
199
|
+
}
|
|
186
200
|
if (message.extensions !== undefined) {
|
|
187
201
|
obj.extensions = Route_1.Extensions.toJSON(message.extensions);
|
|
188
202
|
}
|
|
@@ -199,6 +213,7 @@ exports.PlanRouteRequest = {
|
|
|
199
213
|
: undefined;
|
|
200
214
|
message.goal = object.goal ?? 0;
|
|
201
215
|
message.maxAlternatives = object.maxAlternatives ?? 0;
|
|
216
|
+
message.topology = object.topology ?? 0;
|
|
202
217
|
message.extensions = (object.extensions !== undefined && object.extensions !== null)
|
|
203
218
|
? Route_1.Extensions.fromPartial(object.extensions)
|
|
204
219
|
: undefined;
|
|
@@ -226,6 +241,13 @@ exports.RoutePlannerDefinition = {
|
|
|
226
241
|
* Re-run navigability and validation against a (possibly hand-edited)
|
|
227
242
|
* route, replying it annotated with `challenges`, `issues` and `status`.
|
|
228
243
|
* Takes a whole `keelson.Route` because that is genuinely the input.
|
|
244
|
+
*
|
|
245
|
+
* The closure invariants of §6.2.1 are part of what is validated, and a
|
|
246
|
+
* breach is a `RouteIssue`: the last waypoint carries a `leg` if and only if
|
|
247
|
+
* the topology is CLOSED, the first waypoint is not repeated at the end,
|
|
248
|
+
* waypoint ids are unique, and a CLOSED route has at least two waypoints.
|
|
249
|
+
* Exactly two is legal but coincident out-and-back geometry — a
|
|
250
|
+
* `RouteChallenge`, not an error.
|
|
229
251
|
*/
|
|
230
252
|
validate_route: {
|
|
231
253
|
name: "validate_route",
|