@rise-maritime/keelson-js 0.6.0-alpha.281.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.
@@ -0,0 +1,132 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { OperationalAuthority_AuthorityLevel } from "./OperationalAuthority";
3
+ import { RouteRef } from "./Route";
4
+ export declare const protobufPackage = "keelson";
5
+ /**
6
+ * What the vessel's navigation function is doing right now, stated by the process doing it.
7
+ *
8
+ * Not a lock and not a grant. command_authority says who holds the conn, operational_authority
9
+ * says the most the vessel may claim, and this says what navigation made of both. A consumer
10
+ * deciding whether to act on the vessel reads those, never this.
11
+ */
12
+ export interface NavigationState {
13
+ timestamp: Date | undefined;
14
+ mode: NavigationState_Mode;
15
+ subMode: NavigationState_SubMode;
16
+ /** The voyage being monitored or sailed. Absent in MODE_IDLE. */
17
+ voyageId?: string | undefined;
18
+ /** The route edition in force. Absent when no edition is resolved; never `latest`. */
19
+ routeRef?: RouteRef | undefined;
20
+ /** The leg being sailed, named by the waypoint it leaves (RouteExecution convention). */
21
+ currentLegFromWaypointId?: string | undefined;
22
+ /**
23
+ * The operational_authority level this process is acting under. UNKNOWN when it has heard
24
+ * none, which is non-authorising exactly as OperationalAuthority defines it.
25
+ */
26
+ authorityLevelInForce: OperationalAuthority_AuthorityLevel;
27
+ /** True only while this process holds a live command_authority lease, judged on its own clock. */
28
+ connHeld: boolean;
29
+ /** Why the process is in this mode. For operators and logs; consumers MUST NOT parse it. */
30
+ reason: string;
31
+ /** Subjects this process needs and currently lacks or holds stale, e.g. "location_fix". */
32
+ degradedInputs: string[];
33
+ /**
34
+ * The guidance order in force: what this process has been told to steer by, whether or not it
35
+ * holds the conn to do it. Absent when it has no voyage. Set through navigation_control/v1.
36
+ */
37
+ guidanceOrder?: GuidanceOrder | undefined;
38
+ }
39
+ export declare enum NavigationState_Mode {
40
+ MODE_UNSPECIFIED = 0,
41
+ /** MODE_IDLE - No active voyage, or none this process can resolve. */
42
+ MODE_IDLE = 1,
43
+ /** MODE_READY - A voyage is active and monitored. Not holding the conn, commanding nothing. */
44
+ MODE_READY = 2,
45
+ /** MODE_UNDERWAY - Holding the conn and commanding the vessel along the voyage. */
46
+ MODE_UNDERWAY = 3,
47
+ /**
48
+ * MODE_FALLBACK - Lost something it needs to navigate (conn, authority, fresh ownship state) and has
49
+ * commanded its declared safe state. `reason` and `degraded_inputs` say what.
50
+ */
51
+ MODE_FALLBACK = 4,
52
+ /** MODE_ARRIVED - Reached the final waypoint of the active voyage. */
53
+ MODE_ARRIVED = 5,
54
+ /** MODE_ENDED - The voyage was completed or aborted; conn released. */
55
+ MODE_ENDED = 6,
56
+ UNRECOGNIZED = -1
57
+ }
58
+ export declare function navigationState_ModeFromJSON(object: any): NavigationState_Mode;
59
+ export declare function navigationState_ModeToJSON(object: NavigationState_Mode): string;
60
+ /** Refines MODE_UNDERWAY; UNSPECIFIED in every other mode. */
61
+ export declare enum NavigationState_SubMode {
62
+ SUB_MODE_UNSPECIFIED = 0,
63
+ /** SUB_MODE_TRACK - following the planned track */
64
+ SUB_MODE_TRACK = 1,
65
+ /** SUB_MODE_AVOIDING - executing accepted collision-avoidance advice */
66
+ SUB_MODE_AVOIDING = 2,
67
+ /** SUB_MODE_HOLDING - speed zero or loitering, waiting on a condition */
68
+ SUB_MODE_HOLDING = 3,
69
+ /** SUB_MODE_REROUTING - awaiting a new route edition */
70
+ SUB_MODE_REROUTING = 4,
71
+ /** SUB_MODE_STEERING - holding an ordered course or heading, off the track (GuidanceOrder) */
72
+ SUB_MODE_STEERING = 5,
73
+ UNRECOGNIZED = -1
74
+ }
75
+ export declare function navigationState_SubModeFromJSON(object: any): NavigationState_SubMode;
76
+ export declare function navigationState_SubModeToJSON(object: NavigationState_SubMode): string;
77
+ /**
78
+ * How a navigation process is ordered to steer while a voyage is active. The one type used both to
79
+ * give the order (navigation_control/v1 set_guidance_order, load_route) and to report the order in
80
+ * force (NavigationState.guidance_order), so what was asked and what is held read alike.
81
+ *
82
+ * The frame is the field, as in vehicle_navigation/v1's SteeringOrder, so an order cannot name one
83
+ * frame and carry a value meant for another. Course over ground and heading are different
84
+ * instructions: in any current they differ by the drift angle.
85
+ */
86
+ export interface GuidanceOrder {
87
+ track?: GuidanceOrder_Track | undefined;
88
+ /** Make good this course, degrees true, [0, 360). */
89
+ courseOverGroundDeg?: number | undefined;
90
+ /** Point this way, degrees true, [0, 360). */
91
+ headingDeg?: number | undefined;
92
+ hold?: GuidanceOrder_Hold | undefined;
93
+ /**
94
+ * Speed through the water to keep, in knots. Absent: the planned speed of the current leg for
95
+ * `track`, the speed she has for a course or heading. Ignored by `hold`.
96
+ */
97
+ speedKnots?: number | undefined;
98
+ }
99
+ /** Follow the planned track of the active route edition. */
100
+ export interface GuidanceOrder_Track {
101
+ /**
102
+ * Rejoin at this waypoint (Waypoint.id, never an index). Absent: the leg the process judges
103
+ * current, which is how a hand-back from a course or heading order resumes.
104
+ */
105
+ resumeFromWaypointId?: string | undefined;
106
+ }
107
+ /** Stop making way and keep station where the order finds her, until told otherwise. */
108
+ export interface GuidanceOrder_Hold {
109
+ }
110
+ export declare const NavigationState: MessageFns<NavigationState>;
111
+ export declare const GuidanceOrder: MessageFns<GuidanceOrder>;
112
+ export declare const GuidanceOrder_Track: MessageFns<GuidanceOrder_Track>;
113
+ export declare const GuidanceOrder_Hold: MessageFns<GuidanceOrder_Hold>;
114
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
115
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
116
+ [K in keyof T]?: DeepPartial<T[K]>;
117
+ } : Partial<T>;
118
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
119
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
120
+ [K in keyof P]: Exact<P[K], I[K]>;
121
+ } & {
122
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
123
+ };
124
+ export interface MessageFns<T> {
125
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
126
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
127
+ fromJSON(object: any): T;
128
+ toJSON(message: T): unknown;
129
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
130
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
131
+ }
132
+ export {};