@rise-maritime/keelson-js 0.6.0-alpha.255.dev.1 → 0.6.0-alpha.275.dev.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 +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 +138 -6
- package/dist/interfaces/Route.js +306 -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 +139 -6
- package/dist/payloads/Route.js +315 -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,120 @@ function geometryTypeToJSON(object) {
|
|
|
411
432
|
}
|
|
412
433
|
}
|
|
413
434
|
exports.geometryTypeToJSON = geometryTypeToJSON;
|
|
435
|
+
/**
|
|
436
|
+
* How a leg's XTD corridor boundary is defined. UNSPECIFIED MUST be read as
|
|
437
|
+
* OFFSET: every leg published before this field existed is a constant-offset
|
|
438
|
+
* corridor, and 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
|
+
/** XTD_CORRIDOR_MODE_OFFSET - Parallel lines at xtd_port_m / xtd_starboard_m either side of track. */
|
|
444
|
+
XtdCorridorMode[XtdCorridorMode["XTD_CORRIDOR_MODE_OFFSET"] = 1] = "XTD_CORRIDOR_MODE_OFFSET";
|
|
445
|
+
/**
|
|
446
|
+
* XTD_CORRIDOR_MODE_POLYLINE - A boundary drawn by the planner (Leg.xtd_port_boundary /
|
|
447
|
+
* xtd_starboard_boundary), e.g. a corridor that narrows past a shoal.
|
|
448
|
+
* xtd_port_m / xtd_starboard_m still carry a nominal limit for a monitor
|
|
449
|
+
* that does not evaluate polylines. That fallback is NOT conservative when
|
|
450
|
+
* the drawn corridor is narrower than the nominal one, which is why such a
|
|
451
|
+
* monitor SHOULD report the leg as monitored at reduced fidelity.
|
|
452
|
+
*/
|
|
453
|
+
XtdCorridorMode[XtdCorridorMode["XTD_CORRIDOR_MODE_POLYLINE"] = 2] = "XTD_CORRIDOR_MODE_POLYLINE";
|
|
454
|
+
XtdCorridorMode[XtdCorridorMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
455
|
+
})(XtdCorridorMode || (exports.XtdCorridorMode = XtdCorridorMode = {}));
|
|
456
|
+
function xtdCorridorModeFromJSON(object) {
|
|
457
|
+
switch (object) {
|
|
458
|
+
case 0:
|
|
459
|
+
case "XTD_CORRIDOR_MODE_UNSPECIFIED":
|
|
460
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_UNSPECIFIED;
|
|
461
|
+
case 1:
|
|
462
|
+
case "XTD_CORRIDOR_MODE_OFFSET":
|
|
463
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_OFFSET;
|
|
464
|
+
case 2:
|
|
465
|
+
case "XTD_CORRIDOR_MODE_POLYLINE":
|
|
466
|
+
return XtdCorridorMode.XTD_CORRIDOR_MODE_POLYLINE;
|
|
467
|
+
case -1:
|
|
468
|
+
case "UNRECOGNIZED":
|
|
469
|
+
default:
|
|
470
|
+
return XtdCorridorMode.UNRECOGNIZED;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
exports.xtdCorridorModeFromJSON = xtdCorridorModeFromJSON;
|
|
474
|
+
function xtdCorridorModeToJSON(object) {
|
|
475
|
+
switch (object) {
|
|
476
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_UNSPECIFIED:
|
|
477
|
+
return "XTD_CORRIDOR_MODE_UNSPECIFIED";
|
|
478
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_OFFSET:
|
|
479
|
+
return "XTD_CORRIDOR_MODE_OFFSET";
|
|
480
|
+
case XtdCorridorMode.XTD_CORRIDOR_MODE_POLYLINE:
|
|
481
|
+
return "XTD_CORRIDOR_MODE_POLYLINE";
|
|
482
|
+
case XtdCorridorMode.UNRECOGNIZED:
|
|
483
|
+
default:
|
|
484
|
+
return "UNRECOGNIZED";
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
exports.xtdCorridorModeToJSON = xtdCorridorModeToJSON;
|
|
488
|
+
/**
|
|
489
|
+
* Whether a route's waypoint list closes back on itself. RTZ 1.2 has no such
|
|
490
|
+
* concept, so producers either repeated the first waypoint (breaking id
|
|
491
|
+
* uniqueness) or left closing to consumer convention (silently wrong the first
|
|
492
|
+
* time a consumer chooses not to loop). This field makes the author say.
|
|
493
|
+
*
|
|
494
|
+
* An enum rather than a bool, like every other classification in this file:
|
|
495
|
+
* OPEN says closure was considered and declined, and there is room for a
|
|
496
|
+
* third topology (out-and-back). UNSPECIFIED MUST be read as OPEN; that is
|
|
497
|
+
* the fail-safe direction, since sailing a point-to-point route as a circuit
|
|
498
|
+
* takes the vessel over unplanned water. Terminal behaviour (stop, hold, go
|
|
499
|
+
* round again) is execution policy and belongs on keelson.Voyage, not here.
|
|
500
|
+
* See protocol-specification.md §6.2.1.
|
|
501
|
+
*/
|
|
502
|
+
var RouteTopology;
|
|
503
|
+
(function (RouteTopology) {
|
|
504
|
+
RouteTopology[RouteTopology["ROUTE_TOPOLOGY_UNSPECIFIED"] = 0] = "ROUTE_TOPOLOGY_UNSPECIFIED";
|
|
505
|
+
/**
|
|
506
|
+
* ROUTE_TOPOLOGY_OPEN - Runs from the first waypoint to the last and ends there. The last
|
|
507
|
+
* waypoint has no outgoing leg.
|
|
508
|
+
*/
|
|
509
|
+
RouteTopology[RouteTopology["ROUTE_TOPOLOGY_OPEN"] = 1] = "ROUTE_TOPOLOGY_OPEN";
|
|
510
|
+
/**
|
|
511
|
+
* ROUTE_TOPOLOGY_CLOSED - A circuit: the last waypoint's outgoing leg terminates at the first
|
|
512
|
+
* waypoint, which is NOT repeated at the end of the list.
|
|
513
|
+
*/
|
|
514
|
+
RouteTopology[RouteTopology["ROUTE_TOPOLOGY_CLOSED"] = 2] = "ROUTE_TOPOLOGY_CLOSED";
|
|
515
|
+
RouteTopology[RouteTopology["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
516
|
+
})(RouteTopology || (exports.RouteTopology = RouteTopology = {}));
|
|
517
|
+
function routeTopologyFromJSON(object) {
|
|
518
|
+
switch (object) {
|
|
519
|
+
case 0:
|
|
520
|
+
case "ROUTE_TOPOLOGY_UNSPECIFIED":
|
|
521
|
+
return RouteTopology.ROUTE_TOPOLOGY_UNSPECIFIED;
|
|
522
|
+
case 1:
|
|
523
|
+
case "ROUTE_TOPOLOGY_OPEN":
|
|
524
|
+
return RouteTopology.ROUTE_TOPOLOGY_OPEN;
|
|
525
|
+
case 2:
|
|
526
|
+
case "ROUTE_TOPOLOGY_CLOSED":
|
|
527
|
+
return RouteTopology.ROUTE_TOPOLOGY_CLOSED;
|
|
528
|
+
case -1:
|
|
529
|
+
case "UNRECOGNIZED":
|
|
530
|
+
default:
|
|
531
|
+
return RouteTopology.UNRECOGNIZED;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
exports.routeTopologyFromJSON = routeTopologyFromJSON;
|
|
535
|
+
function routeTopologyToJSON(object) {
|
|
536
|
+
switch (object) {
|
|
537
|
+
case RouteTopology.ROUTE_TOPOLOGY_UNSPECIFIED:
|
|
538
|
+
return "ROUTE_TOPOLOGY_UNSPECIFIED";
|
|
539
|
+
case RouteTopology.ROUTE_TOPOLOGY_OPEN:
|
|
540
|
+
return "ROUTE_TOPOLOGY_OPEN";
|
|
541
|
+
case RouteTopology.ROUTE_TOPOLOGY_CLOSED:
|
|
542
|
+
return "ROUTE_TOPOLOGY_CLOSED";
|
|
543
|
+
case RouteTopology.UNRECOGNIZED:
|
|
544
|
+
default:
|
|
545
|
+
return "UNRECOGNIZED";
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
exports.routeTopologyToJSON = routeTopologyToJSON;
|
|
414
549
|
/**
|
|
415
550
|
* Lifecycle status for the route artifact (authoring + quality).
|
|
416
551
|
* Execution-side state (vessel sailing, paused, completed) lives on
|
|
@@ -1696,7 +1831,7 @@ exports.RouteInfo = {
|
|
|
1696
1831
|
},
|
|
1697
1832
|
};
|
|
1698
1833
|
function createBaseWaypoints() {
|
|
1699
|
-
return { defaults: undefined, waypoint: [], extensions: undefined };
|
|
1834
|
+
return { defaults: undefined, waypoint: [], topology: 0, extensions: undefined };
|
|
1700
1835
|
}
|
|
1701
1836
|
exports.Waypoints = {
|
|
1702
1837
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -1706,6 +1841,9 @@ exports.Waypoints = {
|
|
|
1706
1841
|
for (const v of message.waypoint) {
|
|
1707
1842
|
exports.Waypoint.encode(v, writer.uint32(18).fork()).join();
|
|
1708
1843
|
}
|
|
1844
|
+
if (message.topology !== 0) {
|
|
1845
|
+
writer.uint32(24).int32(message.topology);
|
|
1846
|
+
}
|
|
1709
1847
|
if (message.extensions !== undefined) {
|
|
1710
1848
|
exports.Extensions.encode(message.extensions, writer.uint32(794).fork()).join();
|
|
1711
1849
|
}
|
|
@@ -1732,6 +1870,13 @@ exports.Waypoints = {
|
|
|
1732
1870
|
message.waypoint.push(exports.Waypoint.decode(reader, reader.uint32()));
|
|
1733
1871
|
continue;
|
|
1734
1872
|
}
|
|
1873
|
+
case 3: {
|
|
1874
|
+
if (tag !== 24) {
|
|
1875
|
+
break;
|
|
1876
|
+
}
|
|
1877
|
+
message.topology = reader.int32();
|
|
1878
|
+
continue;
|
|
1879
|
+
}
|
|
1735
1880
|
case 99: {
|
|
1736
1881
|
if (tag !== 794) {
|
|
1737
1882
|
break;
|
|
@@ -1751,6 +1896,7 @@ exports.Waypoints = {
|
|
|
1751
1896
|
return {
|
|
1752
1897
|
defaults: isSet(object.defaults) ? exports.DefaultWaypoint.fromJSON(object.defaults) : undefined,
|
|
1753
1898
|
waypoint: globalThis.Array.isArray(object?.waypoint) ? object.waypoint.map((e) => exports.Waypoint.fromJSON(e)) : [],
|
|
1899
|
+
topology: isSet(object.topology) ? routeTopologyFromJSON(object.topology) : 0,
|
|
1754
1900
|
extensions: isSet(object.extensions) ? exports.Extensions.fromJSON(object.extensions) : undefined,
|
|
1755
1901
|
};
|
|
1756
1902
|
},
|
|
@@ -1762,6 +1908,9 @@ exports.Waypoints = {
|
|
|
1762
1908
|
if (message.waypoint?.length) {
|
|
1763
1909
|
obj.waypoint = message.waypoint.map((e) => exports.Waypoint.toJSON(e));
|
|
1764
1910
|
}
|
|
1911
|
+
if (message.topology !== 0) {
|
|
1912
|
+
obj.topology = routeTopologyToJSON(message.topology);
|
|
1913
|
+
}
|
|
1765
1914
|
if (message.extensions !== undefined) {
|
|
1766
1915
|
obj.extensions = exports.Extensions.toJSON(message.extensions);
|
|
1767
1916
|
}
|
|
@@ -1776,6 +1925,7 @@ exports.Waypoints = {
|
|
|
1776
1925
|
? exports.DefaultWaypoint.fromPartial(object.defaults)
|
|
1777
1926
|
: undefined;
|
|
1778
1927
|
message.waypoint = object.waypoint?.map((e) => exports.Waypoint.fromPartial(e)) || [];
|
|
1928
|
+
message.topology = object.topology ?? 0;
|
|
1779
1929
|
message.extensions = (object.extensions !== undefined && object.extensions !== null)
|
|
1780
1930
|
? exports.Extensions.fromPartial(object.extensions)
|
|
1781
1931
|
: undefined;
|
|
@@ -2122,6 +2272,9 @@ function createBaseLeg() {
|
|
|
2122
2272
|
xtdStarboardM: undefined,
|
|
2123
2273
|
xtdMonitoringPortM: undefined,
|
|
2124
2274
|
xtdMonitoringStarboardM: undefined,
|
|
2275
|
+
xtdCorridorMode: 0,
|
|
2276
|
+
xtdPortBoundary: [],
|
|
2277
|
+
xtdStarboardBoundary: [],
|
|
2125
2278
|
safetyContourM: undefined,
|
|
2126
2279
|
safetyDepthM: undefined,
|
|
2127
2280
|
ukcStaticM: undefined,
|
|
@@ -2159,6 +2312,15 @@ exports.Leg = {
|
|
|
2159
2312
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2160
2313
|
writer.uint32(37).float(message.xtdMonitoringStarboardM);
|
|
2161
2314
|
}
|
|
2315
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2316
|
+
writer.uint32(40).int32(message.xtdCorridorMode);
|
|
2317
|
+
}
|
|
2318
|
+
for (const v of message.xtdPortBoundary) {
|
|
2319
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(50).fork()).join();
|
|
2320
|
+
}
|
|
2321
|
+
for (const v of message.xtdStarboardBoundary) {
|
|
2322
|
+
exports.XtdBoundaryPoint.encode(v, writer.uint32(58).fork()).join();
|
|
2323
|
+
}
|
|
2162
2324
|
if (message.safetyContourM !== undefined) {
|
|
2163
2325
|
writer.uint32(85).float(message.safetyContourM);
|
|
2164
2326
|
}
|
|
@@ -2259,6 +2421,27 @@ exports.Leg = {
|
|
|
2259
2421
|
message.xtdMonitoringStarboardM = reader.float();
|
|
2260
2422
|
continue;
|
|
2261
2423
|
}
|
|
2424
|
+
case 5: {
|
|
2425
|
+
if (tag !== 40) {
|
|
2426
|
+
break;
|
|
2427
|
+
}
|
|
2428
|
+
message.xtdCorridorMode = reader.int32();
|
|
2429
|
+
continue;
|
|
2430
|
+
}
|
|
2431
|
+
case 6: {
|
|
2432
|
+
if (tag !== 50) {
|
|
2433
|
+
break;
|
|
2434
|
+
}
|
|
2435
|
+
message.xtdPortBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2436
|
+
continue;
|
|
2437
|
+
}
|
|
2438
|
+
case 7: {
|
|
2439
|
+
if (tag !== 58) {
|
|
2440
|
+
break;
|
|
2441
|
+
}
|
|
2442
|
+
message.xtdStarboardBoundary.push(exports.XtdBoundaryPoint.decode(reader, reader.uint32()));
|
|
2443
|
+
continue;
|
|
2444
|
+
}
|
|
2262
2445
|
case 10: {
|
|
2263
2446
|
if (tag !== 85) {
|
|
2264
2447
|
break;
|
|
@@ -2422,6 +2605,13 @@ exports.Leg = {
|
|
|
2422
2605
|
xtdMonitoringStarboardM: isSet(object.xtdMonitoringStarboardM)
|
|
2423
2606
|
? globalThis.Number(object.xtdMonitoringStarboardM)
|
|
2424
2607
|
: undefined,
|
|
2608
|
+
xtdCorridorMode: isSet(object.xtdCorridorMode) ? xtdCorridorModeFromJSON(object.xtdCorridorMode) : 0,
|
|
2609
|
+
xtdPortBoundary: globalThis.Array.isArray(object?.xtdPortBoundary)
|
|
2610
|
+
? object.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2611
|
+
: [],
|
|
2612
|
+
xtdStarboardBoundary: globalThis.Array.isArray(object?.xtdStarboardBoundary)
|
|
2613
|
+
? object.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.fromJSON(e))
|
|
2614
|
+
: [],
|
|
2425
2615
|
safetyContourM: isSet(object.safetyContourM) ? globalThis.Number(object.safetyContourM) : undefined,
|
|
2426
2616
|
safetyDepthM: isSet(object.safetyDepthM) ? globalThis.Number(object.safetyDepthM) : undefined,
|
|
2427
2617
|
ukcStaticM: isSet(object.ukcStaticM) ? globalThis.Number(object.ukcStaticM) : undefined,
|
|
@@ -2461,6 +2651,15 @@ exports.Leg = {
|
|
|
2461
2651
|
if (message.xtdMonitoringStarboardM !== undefined) {
|
|
2462
2652
|
obj.xtdMonitoringStarboardM = message.xtdMonitoringStarboardM;
|
|
2463
2653
|
}
|
|
2654
|
+
if (message.xtdCorridorMode !== 0) {
|
|
2655
|
+
obj.xtdCorridorMode = xtdCorridorModeToJSON(message.xtdCorridorMode);
|
|
2656
|
+
}
|
|
2657
|
+
if (message.xtdPortBoundary?.length) {
|
|
2658
|
+
obj.xtdPortBoundary = message.xtdPortBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2659
|
+
}
|
|
2660
|
+
if (message.xtdStarboardBoundary?.length) {
|
|
2661
|
+
obj.xtdStarboardBoundary = message.xtdStarboardBoundary.map((e) => exports.XtdBoundaryPoint.toJSON(e));
|
|
2662
|
+
}
|
|
2464
2663
|
if (message.safetyContourM !== undefined) {
|
|
2465
2664
|
obj.safetyContourM = message.safetyContourM;
|
|
2466
2665
|
}
|
|
@@ -2535,6 +2734,9 @@ exports.Leg = {
|
|
|
2535
2734
|
message.xtdStarboardM = object.xtdStarboardM ?? undefined;
|
|
2536
2735
|
message.xtdMonitoringPortM = object.xtdMonitoringPortM ?? undefined;
|
|
2537
2736
|
message.xtdMonitoringStarboardM = object.xtdMonitoringStarboardM ?? undefined;
|
|
2737
|
+
message.xtdCorridorMode = object.xtdCorridorMode ?? 0;
|
|
2738
|
+
message.xtdPortBoundary = object.xtdPortBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2739
|
+
message.xtdStarboardBoundary = object.xtdStarboardBoundary?.map((e) => exports.XtdBoundaryPoint.fromPartial(e)) || [];
|
|
2538
2740
|
message.safetyContourM = object.safetyContourM ?? undefined;
|
|
2539
2741
|
message.safetyDepthM = object.safetyDepthM ?? undefined;
|
|
2540
2742
|
message.ukcStaticM = object.ukcStaticM ?? undefined;
|
|
@@ -2561,6 +2763,106 @@ exports.Leg = {
|
|
|
2561
2763
|
return message;
|
|
2562
2764
|
},
|
|
2563
2765
|
};
|
|
2766
|
+
function createBaseXtdBoundaryPoint() {
|
|
2767
|
+
return { position: undefined, alongTrackFraction: undefined, offsetM: undefined, inTurn: false };
|
|
2768
|
+
}
|
|
2769
|
+
exports.XtdBoundaryPoint = {
|
|
2770
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2771
|
+
if (message.position !== undefined) {
|
|
2772
|
+
Coordinate_1.Coordinate.encode(message.position, writer.uint32(10).fork()).join();
|
|
2773
|
+
}
|
|
2774
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2775
|
+
writer.uint32(17).double(message.alongTrackFraction);
|
|
2776
|
+
}
|
|
2777
|
+
if (message.offsetM !== undefined) {
|
|
2778
|
+
writer.uint32(29).float(message.offsetM);
|
|
2779
|
+
}
|
|
2780
|
+
if (message.inTurn !== false) {
|
|
2781
|
+
writer.uint32(32).bool(message.inTurn);
|
|
2782
|
+
}
|
|
2783
|
+
return writer;
|
|
2784
|
+
},
|
|
2785
|
+
decode(input, length) {
|
|
2786
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2787
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2788
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2789
|
+
while (reader.pos < end) {
|
|
2790
|
+
const tag = reader.uint32();
|
|
2791
|
+
switch (tag >>> 3) {
|
|
2792
|
+
case 1: {
|
|
2793
|
+
if (tag !== 10) {
|
|
2794
|
+
break;
|
|
2795
|
+
}
|
|
2796
|
+
message.position = Coordinate_1.Coordinate.decode(reader, reader.uint32());
|
|
2797
|
+
continue;
|
|
2798
|
+
}
|
|
2799
|
+
case 2: {
|
|
2800
|
+
if (tag !== 17) {
|
|
2801
|
+
break;
|
|
2802
|
+
}
|
|
2803
|
+
message.alongTrackFraction = reader.double();
|
|
2804
|
+
continue;
|
|
2805
|
+
}
|
|
2806
|
+
case 3: {
|
|
2807
|
+
if (tag !== 29) {
|
|
2808
|
+
break;
|
|
2809
|
+
}
|
|
2810
|
+
message.offsetM = reader.float();
|
|
2811
|
+
continue;
|
|
2812
|
+
}
|
|
2813
|
+
case 4: {
|
|
2814
|
+
if (tag !== 32) {
|
|
2815
|
+
break;
|
|
2816
|
+
}
|
|
2817
|
+
message.inTurn = reader.bool();
|
|
2818
|
+
continue;
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2822
|
+
break;
|
|
2823
|
+
}
|
|
2824
|
+
reader.skip(tag & 7);
|
|
2825
|
+
}
|
|
2826
|
+
return message;
|
|
2827
|
+
},
|
|
2828
|
+
fromJSON(object) {
|
|
2829
|
+
return {
|
|
2830
|
+
position: isSet(object.position) ? Coordinate_1.Coordinate.fromJSON(object.position) : undefined,
|
|
2831
|
+
alongTrackFraction: isSet(object.alongTrackFraction) ? globalThis.Number(object.alongTrackFraction) : undefined,
|
|
2832
|
+
offsetM: isSet(object.offsetM) ? globalThis.Number(object.offsetM) : undefined,
|
|
2833
|
+
inTurn: isSet(object.inTurn) ? globalThis.Boolean(object.inTurn) : false,
|
|
2834
|
+
};
|
|
2835
|
+
},
|
|
2836
|
+
toJSON(message) {
|
|
2837
|
+
const obj = {};
|
|
2838
|
+
if (message.position !== undefined) {
|
|
2839
|
+
obj.position = Coordinate_1.Coordinate.toJSON(message.position);
|
|
2840
|
+
}
|
|
2841
|
+
if (message.alongTrackFraction !== undefined) {
|
|
2842
|
+
obj.alongTrackFraction = message.alongTrackFraction;
|
|
2843
|
+
}
|
|
2844
|
+
if (message.offsetM !== undefined) {
|
|
2845
|
+
obj.offsetM = message.offsetM;
|
|
2846
|
+
}
|
|
2847
|
+
if (message.inTurn !== false) {
|
|
2848
|
+
obj.inTurn = message.inTurn;
|
|
2849
|
+
}
|
|
2850
|
+
return obj;
|
|
2851
|
+
},
|
|
2852
|
+
create(base) {
|
|
2853
|
+
return exports.XtdBoundaryPoint.fromPartial(base ?? {});
|
|
2854
|
+
},
|
|
2855
|
+
fromPartial(object) {
|
|
2856
|
+
const message = createBaseXtdBoundaryPoint();
|
|
2857
|
+
message.position = (object.position !== undefined && object.position !== null)
|
|
2858
|
+
? Coordinate_1.Coordinate.fromPartial(object.position)
|
|
2859
|
+
: undefined;
|
|
2860
|
+
message.alongTrackFraction = object.alongTrackFraction ?? undefined;
|
|
2861
|
+
message.offsetM = object.offsetM ?? undefined;
|
|
2862
|
+
message.inTurn = object.inTurn ?? false;
|
|
2863
|
+
return message;
|
|
2864
|
+
},
|
|
2865
|
+
};
|
|
2564
2866
|
function createBaseSchedules() {
|
|
2565
2867
|
return { schedule: [], extensions: undefined };
|
|
2566
2868
|
}
|
|
@@ -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",
|