@rise-maritime/keelson-js 0.6.0-alpha.307.dev.2 → 0.6.0-alpha.307.dev.3

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.
@@ -1,4 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Coordinate } from "./Coordinate";
2
3
  /**
3
4
  * One navigation risk assessment of own ship, at one instant.
4
5
  *
@@ -19,6 +20,12 @@ export interface NavigationRisk {
19
20
  dimensions: NavigationRisk_DimensionRisk[];
20
21
  targets: NavigationRisk_TargetRisk[];
21
22
  inputs: NavigationRisk_Inputs | undefined;
23
+ /**
24
+ * Where the own ship was at the instant assessed, as the producer's frame had it. A consumer
25
+ * drawing the assessment draws THIS, not a position from another source that may disagree.
26
+ * Absent in a LEVEL_NOT_ASSESSED record.
27
+ */
28
+ ownShip: NavigationRisk_Kinematics | undefined;
22
29
  }
23
30
  /** NOT ordinal: LEVEL_NOT_ASSESSED sorts after LEVEL_HIGH. Compare by name, never with < or >. */
24
31
  export declare enum NavigationRisk_Level {
@@ -113,6 +120,14 @@ export declare enum NavigationRisk_ChartState {
113
120
  }
114
121
  export declare function navigationRisk_ChartStateFromJSON(object: any): NavigationRisk_ChartState;
115
122
  export declare function navigationRisk_ChartStateToJSON(object: NavigationRisk_ChartState): string;
123
+ /** A vessel's state at the instant assessed. Absent fields are unknown, never zero. */
124
+ export interface NavigationRisk_Kinematics {
125
+ $type: "keelson.NavigationRisk.Kinematics";
126
+ position: Coordinate | undefined;
127
+ headingDeg?: number | undefined;
128
+ courseOverGroundDeg?: number | undefined;
129
+ speedOverGroundKnots?: number | undefined;
130
+ }
116
131
  export interface NavigationRisk_Model {
117
132
  $type: "keelson.NavigationRisk.Model";
118
133
  /** e.g. "navrisk" */
@@ -190,6 +205,8 @@ export interface NavigationRisk_TargetRisk {
190
205
  * when not measurable. The producer owns the banding, so no consumer invents thresholds.
191
206
  */
192
207
  level?: NavigationRisk_Level | undefined;
208
+ /** Where the target was at the instant assessed, from the report this assessment used. */
209
+ kinematics: NavigationRisk_Kinematics | undefined;
193
210
  }
194
211
  /**
195
212
  * Present geometry is independent of TargetRisk.measurable (future CPA).
@@ -307,6 +324,7 @@ export interface NavigationRisk_FeedHealth {
307
324
  lastMessageAgeS?: number | undefined;
308
325
  }
309
326
  export declare const NavigationRisk: MessageFns<NavigationRisk, "keelson.NavigationRisk">;
327
+ export declare const NavigationRisk_Kinematics: MessageFns<NavigationRisk_Kinematics, "keelson.NavigationRisk.Kinematics">;
310
328
  export declare const NavigationRisk_Model: MessageFns<NavigationRisk_Model, "keelson.NavigationRisk.Model">;
311
329
  export declare const NavigationRisk_CombinedRisk: MessageFns<NavigationRisk_CombinedRisk, "keelson.NavigationRisk.CombinedRisk">;
312
330
  export declare const NavigationRisk_Gates: MessageFns<NavigationRisk_Gates, "keelson.NavigationRisk.Gates">;
@@ -5,9 +5,10 @@
5
5
  // protoc v6.30.2
6
6
  // source: NavigationRisk.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.NavigationRisk_FeedHealth = exports.NavigationRisk_Surveillance = exports.NavigationRisk_OmittedTarget = exports.NavigationRisk_Inputs = exports.NavigationRisk_ChartedSetting = exports.NavigationRisk_EncounterContext = exports.NavigationRisk_PresentSeparation = exports.NavigationRisk_TargetRisk = exports.NavigationRisk_DimensionRisk = exports.NavigationRisk_Gates = exports.NavigationRisk_CombinedRisk = exports.NavigationRisk_Model = exports.NavigationRisk = exports.navigationRisk_ChartStateToJSON = exports.navigationRisk_ChartStateFromJSON = exports.NavigationRisk_ChartState = exports.navigationRisk_FeedStateToJSON = exports.navigationRisk_FeedStateFromJSON = exports.NavigationRisk_FeedState = exports.navigationRisk_FeedHealthStateToJSON = exports.navigationRisk_FeedHealthStateFromJSON = exports.NavigationRisk_FeedHealthState = exports.navigationRisk_SurveillanceStateToJSON = exports.navigationRisk_SurveillanceStateFromJSON = exports.NavigationRisk_SurveillanceState = exports.navigationRisk_OmissionReasonToJSON = exports.navigationRisk_OmissionReasonFromJSON = exports.NavigationRisk_OmissionReason = exports.navigationRisk_ProvenanceToJSON = exports.navigationRisk_ProvenanceFromJSON = exports.NavigationRisk_Provenance = exports.navigationRisk_DimensionToJSON = exports.navigationRisk_DimensionFromJSON = exports.NavigationRisk_Dimension = exports.navigationRisk_LevelToJSON = exports.navigationRisk_LevelFromJSON = exports.NavigationRisk_Level = void 0;
8
+ exports.NavigationRisk_FeedHealth = exports.NavigationRisk_Surveillance = exports.NavigationRisk_OmittedTarget = exports.NavigationRisk_Inputs = exports.NavigationRisk_ChartedSetting = exports.NavigationRisk_EncounterContext = exports.NavigationRisk_PresentSeparation = exports.NavigationRisk_TargetRisk = exports.NavigationRisk_DimensionRisk = exports.NavigationRisk_Gates = exports.NavigationRisk_CombinedRisk = exports.NavigationRisk_Model = exports.NavigationRisk_Kinematics = exports.NavigationRisk = exports.navigationRisk_ChartStateToJSON = exports.navigationRisk_ChartStateFromJSON = exports.NavigationRisk_ChartState = exports.navigationRisk_FeedStateToJSON = exports.navigationRisk_FeedStateFromJSON = exports.NavigationRisk_FeedState = exports.navigationRisk_FeedHealthStateToJSON = exports.navigationRisk_FeedHealthStateFromJSON = exports.NavigationRisk_FeedHealthState = exports.navigationRisk_SurveillanceStateToJSON = exports.navigationRisk_SurveillanceStateFromJSON = exports.NavigationRisk_SurveillanceState = exports.navigationRisk_OmissionReasonToJSON = exports.navigationRisk_OmissionReasonFromJSON = exports.NavigationRisk_OmissionReason = exports.navigationRisk_ProvenanceToJSON = exports.navigationRisk_ProvenanceFromJSON = exports.NavigationRisk_Provenance = exports.navigationRisk_DimensionToJSON = exports.navigationRisk_DimensionFromJSON = exports.NavigationRisk_Dimension = exports.navigationRisk_LevelToJSON = exports.navigationRisk_LevelFromJSON = exports.NavigationRisk_Level = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const Coordinate_1 = require("./Coordinate");
11
12
  const timestamp_1 = require("./google/protobuf/timestamp");
12
13
  const typeRegistry_1 = require("./typeRegistry");
13
14
  /** NOT ordinal: LEVEL_NOT_ASSESSED sorts after LEVEL_HIGH. Compare by name, never with < or >. */
@@ -442,6 +443,7 @@ function createBaseNavigationRisk() {
442
443
  dimensions: [],
443
444
  targets: [],
444
445
  inputs: undefined,
446
+ ownShip: undefined,
445
447
  };
446
448
  }
447
449
  exports.NavigationRisk = {
@@ -471,6 +473,9 @@ exports.NavigationRisk = {
471
473
  if (message.inputs !== undefined) {
472
474
  exports.NavigationRisk_Inputs.encode(message.inputs, writer.uint32(66).fork()).join();
473
475
  }
476
+ if (message.ownShip !== undefined) {
477
+ exports.NavigationRisk_Kinematics.encode(message.ownShip, writer.uint32(74).fork()).join();
478
+ }
474
479
  return writer;
475
480
  },
476
481
  decode(input, length) {
@@ -536,6 +541,13 @@ exports.NavigationRisk = {
536
541
  message.inputs = exports.NavigationRisk_Inputs.decode(reader, reader.uint32());
537
542
  continue;
538
543
  }
544
+ case 9: {
545
+ if (tag !== 74) {
546
+ break;
547
+ }
548
+ message.ownShip = exports.NavigationRisk_Kinematics.decode(reader, reader.uint32());
549
+ continue;
550
+ }
539
551
  }
540
552
  if ((tag & 7) === 4 || tag === 0) {
541
553
  break;
@@ -559,6 +571,7 @@ exports.NavigationRisk = {
559
571
  ? object.targets.map((e) => exports.NavigationRisk_TargetRisk.fromJSON(e))
560
572
  : [],
561
573
  inputs: isSet(object.inputs) ? exports.NavigationRisk_Inputs.fromJSON(object.inputs) : undefined,
574
+ ownShip: isSet(object.ownShip) ? exports.NavigationRisk_Kinematics.fromJSON(object.ownShip) : undefined,
562
575
  };
563
576
  },
564
577
  toJSON(message) {
@@ -587,6 +600,9 @@ exports.NavigationRisk = {
587
600
  if (message.inputs !== undefined) {
588
601
  obj.inputs = exports.NavigationRisk_Inputs.toJSON(message.inputs);
589
602
  }
603
+ if (message.ownShip !== undefined) {
604
+ obj.ownShip = exports.NavigationRisk_Kinematics.toJSON(message.ownShip);
605
+ }
590
606
  return obj;
591
607
  },
592
608
  create(base) {
@@ -610,10 +626,126 @@ exports.NavigationRisk = {
610
626
  message.inputs = (object.inputs !== undefined && object.inputs !== null)
611
627
  ? exports.NavigationRisk_Inputs.fromPartial(object.inputs)
612
628
  : undefined;
629
+ message.ownShip = (object.ownShip !== undefined && object.ownShip !== null)
630
+ ? exports.NavigationRisk_Kinematics.fromPartial(object.ownShip)
631
+ : undefined;
613
632
  return message;
614
633
  },
615
634
  };
616
635
  typeRegistry_1.messageTypeRegistry.set(exports.NavigationRisk.$type, exports.NavigationRisk);
636
+ function createBaseNavigationRisk_Kinematics() {
637
+ return {
638
+ $type: "keelson.NavigationRisk.Kinematics",
639
+ position: undefined,
640
+ headingDeg: undefined,
641
+ courseOverGroundDeg: undefined,
642
+ speedOverGroundKnots: undefined,
643
+ };
644
+ }
645
+ exports.NavigationRisk_Kinematics = {
646
+ $type: "keelson.NavigationRisk.Kinematics",
647
+ encode(message, writer = new wire_1.BinaryWriter()) {
648
+ if (message.position !== undefined) {
649
+ Coordinate_1.Coordinate.encode(message.position, writer.uint32(10).fork()).join();
650
+ }
651
+ if (message.headingDeg !== undefined) {
652
+ writer.uint32(17).double(message.headingDeg);
653
+ }
654
+ if (message.courseOverGroundDeg !== undefined) {
655
+ writer.uint32(25).double(message.courseOverGroundDeg);
656
+ }
657
+ if (message.speedOverGroundKnots !== undefined) {
658
+ writer.uint32(33).double(message.speedOverGroundKnots);
659
+ }
660
+ return writer;
661
+ },
662
+ decode(input, length) {
663
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
664
+ let end = length === undefined ? reader.len : reader.pos + length;
665
+ const message = createBaseNavigationRisk_Kinematics();
666
+ while (reader.pos < end) {
667
+ const tag = reader.uint32();
668
+ switch (tag >>> 3) {
669
+ case 1: {
670
+ if (tag !== 10) {
671
+ break;
672
+ }
673
+ message.position = Coordinate_1.Coordinate.decode(reader, reader.uint32());
674
+ continue;
675
+ }
676
+ case 2: {
677
+ if (tag !== 17) {
678
+ break;
679
+ }
680
+ message.headingDeg = reader.double();
681
+ continue;
682
+ }
683
+ case 3: {
684
+ if (tag !== 25) {
685
+ break;
686
+ }
687
+ message.courseOverGroundDeg = reader.double();
688
+ continue;
689
+ }
690
+ case 4: {
691
+ if (tag !== 33) {
692
+ break;
693
+ }
694
+ message.speedOverGroundKnots = reader.double();
695
+ continue;
696
+ }
697
+ }
698
+ if ((tag & 7) === 4 || tag === 0) {
699
+ break;
700
+ }
701
+ reader.skip(tag & 7);
702
+ }
703
+ return message;
704
+ },
705
+ fromJSON(object) {
706
+ return {
707
+ $type: exports.NavigationRisk_Kinematics.$type,
708
+ position: isSet(object.position) ? Coordinate_1.Coordinate.fromJSON(object.position) : undefined,
709
+ headingDeg: isSet(object.headingDeg) ? globalThis.Number(object.headingDeg) : undefined,
710
+ courseOverGroundDeg: isSet(object.courseOverGroundDeg)
711
+ ? globalThis.Number(object.courseOverGroundDeg)
712
+ : undefined,
713
+ speedOverGroundKnots: isSet(object.speedOverGroundKnots)
714
+ ? globalThis.Number(object.speedOverGroundKnots)
715
+ : undefined,
716
+ };
717
+ },
718
+ toJSON(message) {
719
+ const obj = {};
720
+ if (message.position !== undefined) {
721
+ obj.position = Coordinate_1.Coordinate.toJSON(message.position);
722
+ }
723
+ if (message.headingDeg !== undefined) {
724
+ obj.headingDeg = message.headingDeg;
725
+ }
726
+ if (message.courseOverGroundDeg !== undefined) {
727
+ obj.courseOverGroundDeg = message.courseOverGroundDeg;
728
+ }
729
+ if (message.speedOverGroundKnots !== undefined) {
730
+ obj.speedOverGroundKnots = message.speedOverGroundKnots;
731
+ }
732
+ return obj;
733
+ },
734
+ create(base) {
735
+ return exports.NavigationRisk_Kinematics.fromPartial(base ?? {});
736
+ },
737
+ fromPartial(object) {
738
+ const message = createBaseNavigationRisk_Kinematics();
739
+ message.position = (object.position !== undefined && object.position !== null)
740
+ ? Coordinate_1.Coordinate.fromPartial(object.position)
741
+ : undefined;
742
+ message.headingDeg = object.headingDeg ?? undefined;
743
+ message.courseOverGroundDeg = object.courseOverGroundDeg ?? undefined;
744
+ message.speedOverGroundKnots = object.speedOverGroundKnots ?? undefined;
745
+ return message;
746
+ },
747
+ };
748
+ typeRegistry_1.messageTypeRegistry.set(exports.NavigationRisk_Kinematics.$type, exports.NavigationRisk_Kinematics);
617
749
  function createBaseNavigationRisk_Model() {
618
750
  return { $type: "keelson.NavigationRisk.Model", package: "", version: "" };
619
751
  }
@@ -1095,6 +1227,7 @@ function createBaseNavigationRisk_TargetRisk() {
1095
1227
  mmsi: 0,
1096
1228
  feed: "",
1097
1229
  level: undefined,
1230
+ kinematics: undefined,
1098
1231
  };
1099
1232
  }
1100
1233
  exports.NavigationRisk_TargetRisk = {
@@ -1148,6 +1281,9 @@ exports.NavigationRisk_TargetRisk = {
1148
1281
  if (message.level !== undefined) {
1149
1282
  writer.uint32(128).int32(message.level);
1150
1283
  }
1284
+ if (message.kinematics !== undefined) {
1285
+ exports.NavigationRisk_Kinematics.encode(message.kinematics, writer.uint32(138).fork()).join();
1286
+ }
1151
1287
  return writer;
1152
1288
  },
1153
1289
  decode(input, length) {
@@ -1269,6 +1405,13 @@ exports.NavigationRisk_TargetRisk = {
1269
1405
  message.level = reader.int32();
1270
1406
  continue;
1271
1407
  }
1408
+ case 17: {
1409
+ if (tag !== 138) {
1410
+ break;
1411
+ }
1412
+ message.kinematics = exports.NavigationRisk_Kinematics.decode(reader, reader.uint32());
1413
+ continue;
1414
+ }
1272
1415
  }
1273
1416
  if ((tag & 7) === 4 || tag === 0) {
1274
1417
  break;
@@ -1302,6 +1445,7 @@ exports.NavigationRisk_TargetRisk = {
1302
1445
  mmsi: isSet(object.mmsi) ? globalThis.Number(object.mmsi) : 0,
1303
1446
  feed: isSet(object.feed) ? globalThis.String(object.feed) : "",
1304
1447
  level: isSet(object.level) ? navigationRisk_LevelFromJSON(object.level) : undefined,
1448
+ kinematics: isSet(object.kinematics) ? exports.NavigationRisk_Kinematics.fromJSON(object.kinematics) : undefined,
1305
1449
  };
1306
1450
  },
1307
1451
  toJSON(message) {
@@ -1354,6 +1498,9 @@ exports.NavigationRisk_TargetRisk = {
1354
1498
  if (message.level !== undefined) {
1355
1499
  obj.level = navigationRisk_LevelToJSON(message.level);
1356
1500
  }
1501
+ if (message.kinematics !== undefined) {
1502
+ obj.kinematics = exports.NavigationRisk_Kinematics.toJSON(message.kinematics);
1503
+ }
1357
1504
  return obj;
1358
1505
  },
1359
1506
  create(base) {
@@ -1381,6 +1528,9 @@ exports.NavigationRisk_TargetRisk = {
1381
1528
  message.mmsi = object.mmsi ?? 0;
1382
1529
  message.feed = object.feed ?? "";
1383
1530
  message.level = object.level ?? undefined;
1531
+ message.kinematics = (object.kinematics !== undefined && object.kinematics !== null)
1532
+ ? exports.NavigationRisk_Kinematics.fromPartial(object.kinematics)
1533
+ : undefined;
1384
1534
  return message;
1385
1535
  },
1386
1536
  };
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.307.dev.2",
4
+ "version": "0.6.0-alpha.307.dev.3",
5
5
  "description": "Keelson JavaScript SDK with Node-RED nodes",
6
6
  "main": "dist/index.js",
7
7
  "files": [