@neilberkman/sidereon 0.12.0 → 0.14.0

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.
@@ -116,6 +116,131 @@ export interface SppBatchOptions {
116
116
  maxPdop?: number;
117
117
  }
118
118
 
119
+ /** Serialized observability tier label. Handle getters return the generated
120
+ * `ObservabilityTier` enum; serde-returning APIs use these stable labels. */
121
+ export type ObservabilityTierLabel =
122
+ | "RankDeficient"
123
+ | "ZeroRedundancy"
124
+ | "Weak"
125
+ | "Nominal";
126
+
127
+ /** Geometry observability and covariance-validation diagnostics.
128
+ * `ZeroRedundancy` marks a full-rank design with no residual degrees of freedom,
129
+ * so snapshot covariance bounds are unvalidated unless a propagated prior is
130
+ * present. `Weak` means a condition-number or GDOP cutoff was exceeded; the
131
+ * returned bounds are reported as computed and are not clamped. */
132
+ export interface GeometryQualityObject {
133
+ tier: ObservabilityTierLabel;
134
+ /** Observation redundancy, `nObs - nParams`. */
135
+ redundancy: number;
136
+ /** Rank of the design matrix used by the solve. */
137
+ rank: number;
138
+ /** Singular-value condition number of the design matrix. */
139
+ conditionNumber: number;
140
+ /** Geometric dilution of precision for the solved state. */
141
+ gdop: number;
142
+ /** Whether residual-based RAIM can test the solve. */
143
+ raimCheckable: boolean;
144
+ /** Whether residuals or a propagated prior validated the covariance bound. */
145
+ covarianceValidated: boolean;
146
+ }
147
+
148
+ // --- Source localization ----------------------------------------------------
149
+ //
150
+ // Source-localization functions deserialize inputs and serialize outputs through
151
+ // serde, so wasm-bindgen types them as `any`. Import:
152
+ //
153
+ // import { locateSource } from "@neilberkman/sidereon";
154
+ // import type { SourceSensor, SourceLocateOptions, SourceSolution } from "@neilberkman/sidereon/types";
155
+
156
+ /** One source-localization sensor. Coordinates are caller-chosen Cartesian metres. */
157
+ export interface SourceSensor {
158
+ positionM: number[];
159
+ /** Per-sensor propagation speed, metres per second. */
160
+ propagationSpeedMS?: number;
161
+ }
162
+
163
+ /** Source solve mode selector. */
164
+ export type SourceSolveMode = "toa" | { mode: "tdoa"; referenceSensor: number };
165
+
166
+ /** Options for `locateSource`. */
167
+ export interface SourceLocateOptions {
168
+ mode?: "toa" | "tdoa";
169
+ referenceSensor?: number;
170
+ timingSigmaS?: number;
171
+ loss?: "linear" | "softL1" | "soft_l1" | "huber" | "cauchy" | "arctan";
172
+ fScaleS?: number;
173
+ ftol?: number;
174
+ xtol?: number;
175
+ gtol?: number;
176
+ maxNfev?: number;
177
+ }
178
+
179
+ /** Closed-form seed used by source localization. */
180
+ export interface SourceInitialGuess {
181
+ positionM: number[];
182
+ originTimeS?: number;
183
+ residualRmsS: number;
184
+ }
185
+
186
+ /** One source-localization residual row. */
187
+ export interface SourceResidual {
188
+ sensorIndex: number;
189
+ referenceSensorIndex?: number;
190
+ residualS: number;
191
+ }
192
+
193
+ /** Per-sensor source-localization influence diagnostic. */
194
+ export interface SourceSensorInfluence {
195
+ sensorIndex: number;
196
+ residualS: number;
197
+ leaveOneOutResidualS?: number;
198
+ positionDeltaM?: number;
199
+ originTimeDeltaS?: number;
200
+ lossWeight: number;
201
+ score: number;
202
+ }
203
+
204
+ /** Source-localization covariance. */
205
+ export interface SourceCovariance {
206
+ state: number[][];
207
+ positionM2: number[][];
208
+ originTimeS2?: number;
209
+ timingSigmaS: number;
210
+ }
211
+
212
+ /** Source solution returned by `locateSource`. */
213
+ export interface SourceSolution {
214
+ positionM: number[];
215
+ originTimeS?: number;
216
+ covariance?: SourceCovariance;
217
+ residuals: SourceResidual[];
218
+ perSensorInfluence: SourceSensorInfluence[];
219
+ geometryQuality: GeometryQualityObject;
220
+ initialGuess: SourceInitialGuess;
221
+ status: number;
222
+ nfev: number;
223
+ njev: number;
224
+ cost: number;
225
+ optimality: number;
226
+ }
227
+
228
+ /** DOP scalars returned by `sourceDop` and nested in `sourceCrlb`. */
229
+ export interface SourceDop {
230
+ gdop: number;
231
+ pdop: number;
232
+ hdop: number;
233
+ vdop: number;
234
+ tdop: number;
235
+ systemTdops: { system: string; tdop: number }[];
236
+ }
237
+
238
+ /** Cramer-Rao lower bound returned by `sourceCrlb`. */
239
+ export interface SourceCrlb {
240
+ dop: SourceDop;
241
+ covariance: SourceCovariance;
242
+ }
243
+
119
244
  // --- Observable-domain plain-object inputs ----------------------------------
120
245
  //
121
246
  // The wasm-bindgen surface types these arguments as `any` because they cross
@@ -2683,6 +2808,7 @@ export interface RtkStaticArcFloatSolution {
2683
2808
  phaseRmsM: number;
2684
2809
  weightedRmsM: number;
2685
2810
  nObservations: number;
2811
+ geometryQuality: GeometryQualityObject;
2686
2812
  }
2687
2813
 
2688
2814
  /** Static fixed RTK solution returned inside `RtkStaticArcSolution`. */
@@ -2734,6 +2860,7 @@ export interface RtkValidatedFixedSolution {
2734
2860
 
2735
2861
  /** The full static RTK arc solution returned by `solveStaticRtkArc`. */
2736
2862
  export interface RtkStaticArcSolution {
2863
+ geometryQuality: GeometryQualityObject;
2737
2864
  references: Record<string, string>;
2738
2865
  ambiguityIds: string[];
2739
2866
  ambiguitySatellites: Record<string, string>;
@@ -2774,6 +2901,7 @@ export interface RtkArcEpochSolution {
2774
2901
  usedSatelliteIds: string[];
2775
2902
  search?: RtkArcSearchSummary;
2776
2903
  residuals: RtkArcResidual[];
2904
+ geometryQuality: GeometryQualityObject;
2777
2905
  /** Per-epoch innovation-screen result, present only when the screen is enabled
2778
2906
  * for the arc via `updateOpts.innovationScreen`. */
2779
2907
  innovationScreen?: RtkArcInnovationScreenResult;
@@ -2881,6 +3009,7 @@ export interface RtkWideLaneArcConfig {
2881
3009
 
2882
3010
  /** The wide-lane RTK arc solution returned by `fixWideLaneRtkArc`. */
2883
3011
  export interface RtkWideLaneArcSolution {
3012
+ geometryQuality: GeometryQualityObject;
2884
3013
  references: Record<string, string>;
2885
3014
  wideLaneCycles: Record<string, number>;
2886
3015
  epochs: RtkDualFrequencyArcEpoch[];