@neilberkman/sidereon 0.12.0 → 0.13.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.
package/pkg/sidereon.js CHANGED
@@ -875,6 +875,43 @@ export class BroadcastEphemeris {
875
875
  const ret = wasm.broadcastephemeris_leapSeconds(this.__wbg_ptr);
876
876
  return ret[0] === 0 ? undefined : ret[1];
877
877
  }
878
+ /**
879
+ * Query ECEF position and clock for parallel satellite and epoch arrays
880
+ * against this parsed broadcast ephemeris store.
881
+ *
882
+ * `satellites[i]` is evaluated at `epochsJ2000S[i]`, where epochs are
883
+ * seconds since J2000 in GPST for GNSS broadcast records. The returned
884
+ * plain object has aligned `positionsEcefM`, `clocksS`, `statuses`, and
885
+ * `elementResults` arrays.
886
+ * @param {any} satellites
887
+ * @param {any} epochs_j2000_s
888
+ * @returns {any}
889
+ */
890
+ observableStatesAtJ2000S(satellites, epochs_j2000_s) {
891
+ const ret = wasm.broadcastephemeris_observableStatesAtJ2000S(this.__wbg_ptr, satellites, epochs_j2000_s);
892
+ if (ret[2]) {
893
+ throw takeFromExternrefTable0(ret[1]);
894
+ }
895
+ return takeFromExternrefTable0(ret[0]);
896
+ }
897
+ /**
898
+ * Query ECEF position and clock for many satellites at one epoch against
899
+ * this parsed broadcast ephemeris store.
900
+ *
901
+ * `epochJ2000S` is seconds since J2000 in GPST. The returned object follows
902
+ * the same contract as
903
+ * [`observableStatesAtJ2000S`](Self::observable_states_at_j2000_s).
904
+ * @param {any} satellites
905
+ * @param {number} epoch_j2000_s
906
+ * @returns {any}
907
+ */
908
+ observableStatesAtSharedJ2000S(satellites, epoch_j2000_s) {
909
+ const ret = wasm.broadcastephemeris_observableStatesAtSharedJ2000S(this.__wbg_ptr, satellites, epoch_j2000_s);
910
+ if (ret[2]) {
911
+ throw takeFromExternrefTable0(ret[1]);
912
+ }
913
+ return takeFromExternrefTable0(ret[0]);
914
+ }
878
915
  /**
879
916
  * Number of usable GPS, Galileo, and BeiDou records.
880
917
  * @returns {number}
@@ -10929,6 +10966,159 @@ export class PppFloatSolution {
10929
10966
  }
10930
10967
  if (Symbol.dispose) PppFloatSolution.prototype[Symbol.dispose] = PppFloatSolution.prototype.free;
10931
10968
 
10969
+ /**
10970
+ * A reusable precise-ephemeris interpolant with cached per-satellite nodes.
10971
+ *
10972
+ * Build this handle once from a parsed [`Sp3`] product, raw precise samples, or
10973
+ * a [`PreciseEphemerisSampleSource`], then reuse it for many state or range
10974
+ * queries. The handle delegates to
10975
+ * `sidereon_core::ephemeris::PreciseEphemerisInterpolant`; ECEF positions are
10976
+ * metres, clocks are seconds, and query epochs are seconds since J2000 in the
10977
+ * source time scale.
10978
+ */
10979
+ export class PreciseEphemerisInterpolant {
10980
+ static __wrap(ptr) {
10981
+ const obj = Object.create(PreciseEphemerisInterpolant.prototype);
10982
+ obj.__wbg_ptr = ptr;
10983
+ PreciseEphemerisInterpolantFinalization.register(obj, obj.__wbg_ptr, obj);
10984
+ return obj;
10985
+ }
10986
+ __destroy_into_raw() {
10987
+ const ptr = this.__wbg_ptr;
10988
+ this.__wbg_ptr = 0;
10989
+ PreciseEphemerisInterpolantFinalization.unregister(this);
10990
+ return ptr;
10991
+ }
10992
+ free() {
10993
+ const ptr = this.__destroy_into_raw();
10994
+ wasm.__wbg_preciseephemerisinterpolant_free(ptr, 0);
10995
+ }
10996
+ /**
10997
+ * Build a cached interpolant from an existing sample-backed precise source.
10998
+ * @param {PreciseEphemerisSampleSource} source
10999
+ * @returns {PreciseEphemerisInterpolant}
11000
+ */
11001
+ static fromPreciseEphemerisSamples(source) {
11002
+ _assertClass(source, PreciseEphemerisSampleSource);
11003
+ const ret = wasm.preciseephemerisinterpolant_fromPreciseEphemerisSamples(source.__wbg_ptr);
11004
+ return PreciseEphemerisInterpolant.__wrap(ret);
11005
+ }
11006
+ /**
11007
+ * Build a cached interpolant directly from precise samples.
11008
+ *
11009
+ * `samples` is the same array accepted by
11010
+ * [`preciseEphemerisSamplesFromSamples`]: each item has `{ sat, epoch,
11011
+ * positionEcefM, clockS?, clockEvent? }`, with epochs in seconds since
11012
+ * J2000 and positions in ECEF metres. Throws a `TypeError` for malformed
11013
+ * JS input and a `RangeError` for sample validation failures.
11014
+ * @param {any} samples
11015
+ * @returns {PreciseEphemerisInterpolant}
11016
+ */
11017
+ static fromSamples(samples) {
11018
+ const ret = wasm.preciseephemerisinterpolant_fromSamples(samples);
11019
+ if (ret[2]) {
11020
+ throw takeFromExternrefTable0(ret[1]);
11021
+ }
11022
+ return PreciseEphemerisInterpolant.__wrap(ret[0]);
11023
+ }
11024
+ /**
11025
+ * Build a cached interpolant from a parsed SP3 precise product.
11026
+ *
11027
+ * Nodes are copied from the product's native SP3 records. Query epochs are
11028
+ * seconds since J2000 in the SP3 product time scale.
11029
+ * @param {Sp3} sp3
11030
+ * @returns {PreciseEphemerisInterpolant}
11031
+ */
11032
+ static fromSp3(sp3) {
11033
+ _assertClass(sp3, Sp3);
11034
+ const ret = wasm.preciseephemerisinterpolant_fromSp3(sp3.__wbg_ptr);
11035
+ return PreciseEphemerisInterpolant.__wrap(ret);
11036
+ }
11037
+ /**
11038
+ * Query ECEF position and optional clock for parallel satellite and epoch
11039
+ * arrays using this cached interpolant.
11040
+ *
11041
+ * `satellites[i]` is evaluated at `epochsJ2000S[i]`, where epochs are
11042
+ * seconds since J2000 on this handle's time scale. The returned plain
11043
+ * object has aligned `positionsEcefM`, `clocksS`, `statuses`, and
11044
+ * `elementResults` arrays.
11045
+ * @param {any} satellites
11046
+ * @param {any} epochs_j2000_s
11047
+ * @returns {any}
11048
+ */
11049
+ observableStatesAtJ2000S(satellites, epochs_j2000_s) {
11050
+ const ret = wasm.preciseephemerisinterpolant_observableStatesAtJ2000S(this.__wbg_ptr, satellites, epochs_j2000_s);
11051
+ if (ret[2]) {
11052
+ throw takeFromExternrefTable0(ret[1]);
11053
+ }
11054
+ return takeFromExternrefTable0(ret[0]);
11055
+ }
11056
+ /**
11057
+ * Query ECEF position and optional clock for many satellites at one epoch
11058
+ * using this cached interpolant.
11059
+ *
11060
+ * `epochJ2000S` is seconds since J2000 on this handle's time scale. The
11061
+ * returned object follows the same contract as
11062
+ * [`observableStatesAtJ2000S`](Self::observable_states_at_j2000_s).
11063
+ * @param {any} satellites
11064
+ * @param {number} epoch_j2000_s
11065
+ * @returns {any}
11066
+ */
11067
+ observableStatesAtSharedJ2000S(satellites, epoch_j2000_s) {
11068
+ const ret = wasm.preciseephemerisinterpolant_observableStatesAtSharedJ2000S(this.__wbg_ptr, satellites, epoch_j2000_s);
11069
+ if (ret[2]) {
11070
+ throw takeFromExternrefTable0(ret[1]);
11071
+ }
11072
+ return takeFromExternrefTable0(ret[0]);
11073
+ }
11074
+ /**
11075
+ * Predict geometric ranges for many `(satellite, receiver, epoch)`
11076
+ * requests using this cached interpolant.
11077
+ *
11078
+ * `requests` is an array of `{ sat, receiverEcefM, tRxJ2000S }` objects.
11079
+ * Positions are ECEF metres and epochs are seconds since J2000 on this
11080
+ * handle's time scale. The output matches [`Sp3.predictRanges`].
11081
+ * @param {any} requests
11082
+ * @param {any} options
11083
+ * @returns {any}
11084
+ */
11085
+ predictRanges(requests, options) {
11086
+ const ret = wasm.preciseephemerisinterpolant_predictRanges(this.__wbg_ptr, requests, options);
11087
+ if (ret[2]) {
11088
+ throw takeFromExternrefTable0(ret[1]);
11089
+ }
11090
+ return takeFromExternrefTable0(ret[0]);
11091
+ }
11092
+ /**
11093
+ * Satellite tokens this handle can interpolate, ascending.
11094
+ * @returns {string[]}
11095
+ */
11096
+ get satellites() {
11097
+ const ret = wasm.preciseephemerisinterpolant_satellites(this.__wbg_ptr);
11098
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
11099
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
11100
+ return v1;
11101
+ }
11102
+ /**
11103
+ * Source time-scale abbreviation used by this handle's J2000-second axis,
11104
+ * such as `"GPST"`.
11105
+ * @returns {string}
11106
+ */
11107
+ get timeScale() {
11108
+ let deferred1_0;
11109
+ let deferred1_1;
11110
+ try {
11111
+ const ret = wasm.preciseephemerisinterpolant_timeScale(this.__wbg_ptr);
11112
+ deferred1_0 = ret[0];
11113
+ deferred1_1 = ret[1];
11114
+ return getStringFromWasm0(ret[0], ret[1]);
11115
+ } finally {
11116
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
11117
+ }
11118
+ }
11119
+ }
11120
+ if (Symbol.dispose) PreciseEphemerisInterpolant.prototype[Symbol.dispose] = PreciseEphemerisInterpolant.prototype.free;
11121
+
10932
11122
  /**
10933
11123
  * A precise-ephemeris source built from samples rather than parsed SP3 text.
10934
11124
  *
@@ -10953,6 +11143,44 @@ export class PreciseEphemerisSampleSource {
10953
11143
  const ptr = this.__destroy_into_raw();
10954
11144
  wasm.__wbg_preciseephemerissamplesource_free(ptr, 0);
10955
11145
  }
11146
+ /**
11147
+ * Query ECEF position and optional clock for parallel satellite and epoch
11148
+ * arrays against this sample-backed precise source.
11149
+ *
11150
+ * `satellites[i]` is evaluated at `epochsJ2000S[i]`, where epochs are
11151
+ * seconds since J2000 on the source time scale. The returned plain object
11152
+ * has aligned `positionsEcefM`, `clocksS`, `statuses`, and
11153
+ * `elementResults` arrays. Failed elements use the core missing-position
11154
+ * sentinel and carry the scalar engine error in `elementResults[i].error`.
11155
+ * @param {any} satellites
11156
+ * @param {any} epochs_j2000_s
11157
+ * @returns {any}
11158
+ */
11159
+ observableStatesAtJ2000S(satellites, epochs_j2000_s) {
11160
+ const ret = wasm.preciseephemerissamplesource_observableStatesAtJ2000S(this.__wbg_ptr, satellites, epochs_j2000_s);
11161
+ if (ret[2]) {
11162
+ throw takeFromExternrefTable0(ret[1]);
11163
+ }
11164
+ return takeFromExternrefTable0(ret[0]);
11165
+ }
11166
+ /**
11167
+ * Query ECEF position and optional clock for many satellites at one epoch
11168
+ * against this sample-backed precise source.
11169
+ *
11170
+ * `epochJ2000S` is seconds since J2000 on the source time scale. The
11171
+ * returned plain object follows the same contract as
11172
+ * [`observableStatesAtJ2000S`](Self::observable_states_at_j2000_s).
11173
+ * @param {any} satellites
11174
+ * @param {number} epoch_j2000_s
11175
+ * @returns {any}
11176
+ */
11177
+ observableStatesAtSharedJ2000S(satellites, epoch_j2000_s) {
11178
+ const ret = wasm.preciseephemerissamplesource_observableStatesAtSharedJ2000S(this.__wbg_ptr, satellites, epoch_j2000_s);
11179
+ if (ret[2]) {
11180
+ throw takeFromExternrefTable0(ret[1]);
11181
+ }
11182
+ return takeFromExternrefTable0(ret[0]);
11183
+ }
10956
11184
  /**
10957
11185
  * Predict geometric ranges for many requests in one call. See the shared
10958
11186
  * [`predictRanges`](crate::precise_samples::predict_ranges_over) contract;
@@ -12996,6 +13224,44 @@ export class Sp3 {
12996
13224
  }
12997
13225
  return Sp3Interpolation.__wrap(ret[0]);
12998
13226
  }
13227
+ /**
13228
+ * Query ECEF position and optional clock for parallel satellite and epoch
13229
+ * arrays against this parsed SP3 product.
13230
+ *
13231
+ * `satellites[i]` is evaluated at `epochsJ2000S[i]`, where epochs are
13232
+ * seconds since J2000 in the product time scale. The returned plain object
13233
+ * has aligned `positionsEcefM`, `clocksS`, `statuses`, and
13234
+ * `elementResults` arrays. Failed elements use the core missing-position
13235
+ * sentinel and carry the scalar engine error in `elementResults[i].error`.
13236
+ * @param {any} satellites
13237
+ * @param {any} epochs_j2000_s
13238
+ * @returns {any}
13239
+ */
13240
+ observableStatesAtJ2000S(satellites, epochs_j2000_s) {
13241
+ const ret = wasm.sp3_observableStatesAtJ2000S(this.__wbg_ptr, satellites, epochs_j2000_s);
13242
+ if (ret[2]) {
13243
+ throw takeFromExternrefTable0(ret[1]);
13244
+ }
13245
+ return takeFromExternrefTable0(ret[0]);
13246
+ }
13247
+ /**
13248
+ * Query ECEF position and optional clock for many satellites at one epoch
13249
+ * against this parsed SP3 product.
13250
+ *
13251
+ * `epochJ2000S` is seconds since J2000 in the product time scale. The
13252
+ * returned object follows the same contract as
13253
+ * [`observableStatesAtJ2000S`](Self::observable_states_at_j2000_s).
13254
+ * @param {any} satellites
13255
+ * @param {number} epoch_j2000_s
13256
+ * @returns {any}
13257
+ */
13258
+ observableStatesAtSharedJ2000S(satellites, epoch_j2000_s) {
13259
+ const ret = wasm.sp3_observableStatesAtSharedJ2000S(this.__wbg_ptr, satellites, epoch_j2000_s);
13260
+ if (ret[2]) {
13261
+ throw takeFromExternrefTable0(ret[1]);
13262
+ }
13263
+ return takeFromExternrefTable0(ret[0]);
13264
+ }
12999
13265
  /**
13000
13266
  * Predict geometric ranges for many `(satellite, receiver, epoch)` requests
13001
13267
  * against this ephemeris in one call. `requests` is an array of
@@ -15732,6 +15998,78 @@ export function allanDeviation(series, tau0_s, averaging_factors) {
15732
15998
  return takeFromExternrefTable0(ret[0]);
15733
15999
  }
15734
16000
 
16001
+ /**
16002
+ * Alpha-beta measurement update applied to a predicted scalar state.
16003
+ *
16004
+ * `predicted` is `{ level, rate }`, `measurement` has the same unit as
16005
+ * `level`, `dt` is seconds, and `gains` is `{ alpha, beta }`.
16006
+ * @param {any} predicted
16007
+ * @param {number} measurement
16008
+ * @param {number} dt
16009
+ * @param {any} gains
16010
+ * @returns {any}
16011
+ */
16012
+ export function alphaBetaApplyMeasurement(predicted, measurement, dt, gains) {
16013
+ const ret = wasm.alphaBetaApplyMeasurement(predicted, measurement, dt, gains);
16014
+ if (ret[2]) {
16015
+ throw takeFromExternrefTable0(ret[1]);
16016
+ }
16017
+ return takeFromExternrefTable0(ret[0]);
16018
+ }
16019
+
16020
+ /**
16021
+ * Run one alpha-beta predict and measurement update.
16022
+ *
16023
+ * `state` is `{ level, rate }`, `measurement` has the same unit as `level`,
16024
+ * `dt` is seconds, and `gains` is `{ alpha, beta }`. Returns `{ predicted,
16025
+ * updated, innovation }`.
16026
+ * @param {any} state
16027
+ * @param {number} measurement
16028
+ * @param {number} dt
16029
+ * @param {any} gains
16030
+ * @returns {any}
16031
+ */
16032
+ export function alphaBetaFilterStep(state, measurement, dt, gains) {
16033
+ const ret = wasm.alphaBetaFilterStep(state, measurement, dt, gains);
16034
+ if (ret[2]) {
16035
+ throw takeFromExternrefTable0(ret[1]);
16036
+ }
16037
+ return takeFromExternrefTable0(ret[0]);
16038
+ }
16039
+
16040
+ /**
16041
+ * Alpha-beta constant-rate prediction.
16042
+ *
16043
+ * `state` is `{ level, rate }` and `dt` is the positive propagation interval in
16044
+ * seconds. Returns the predicted `{ level, rate }`.
16045
+ * @param {any} state
16046
+ * @param {number} dt
16047
+ * @returns {any}
16048
+ */
16049
+ export function alphaBetaPredict(state, dt) {
16050
+ const ret = wasm.alphaBetaPredict(state, dt);
16051
+ if (ret[2]) {
16052
+ throw takeFromExternrefTable0(ret[1]);
16053
+ }
16054
+ return takeFromExternrefTable0(ret[0]);
16055
+ }
16056
+
16057
+ /**
16058
+ * Steady-state alpha-beta gains from a positive tracking index.
16059
+ *
16060
+ * Returns `{ alpha, beta }`, where `alpha` is the level gain and `beta` maps
16061
+ * innovation to rate through `beta * innovation / dt`.
16062
+ * @param {number} tracking_index
16063
+ * @returns {any}
16064
+ */
16065
+ export function alphaBetaSteadyStateGains(tracking_index) {
16066
+ const ret = wasm.alphaBetaSteadyStateGains(tracking_index);
16067
+ if (ret[2]) {
16068
+ throw takeFromExternrefTable0(ret[1]);
16069
+ }
16070
+ return takeFromExternrefTable0(ret[0]);
16071
+ }
16072
+
15735
16073
  /**
15736
16074
  * On-sky angle in degrees between two direction vectors.
15737
16075
  * @param {Float64Array} a
@@ -15990,6 +16328,87 @@ export function carrierFrequencyHz(system, band) {
15990
16328
  return ret[0] === 0 ? undefined : ret[1];
15991
16329
  }
15992
16330
 
16331
+ /**
16332
+ * CA-CFAR false alarm probability from searched-cell count, absolute
16333
+ * threshold, and mean noise level.
16334
+ * @param {number} searched_cells
16335
+ * @param {number} threshold
16336
+ * @param {number} noise_level
16337
+ * @returns {number}
16338
+ */
16339
+ export function cfarCaFalseAlarmProbability(searched_cells, threshold, noise_level) {
16340
+ const ret = wasm.cfarCaFalseAlarmProbability(searched_cells, threshold, noise_level);
16341
+ if (ret[2]) {
16342
+ throw takeFromExternrefTable0(ret[1]);
16343
+ }
16344
+ return ret[0];
16345
+ }
16346
+
16347
+ /**
16348
+ * CA-CFAR threshold multiplier from searched-cell count and target false alarm
16349
+ * probability.
16350
+ * @param {number} searched_cells
16351
+ * @param {number} false_alarm_probability
16352
+ * @returns {number}
16353
+ */
16354
+ export function cfarCaMultiplierFromPfa(searched_cells, false_alarm_probability) {
16355
+ const ret = wasm.cfarCaMultiplierFromPfa(searched_cells, false_alarm_probability);
16356
+ if (ret[2]) {
16357
+ throw takeFromExternrefTable0(ret[1]);
16358
+ }
16359
+ return ret[0];
16360
+ }
16361
+
16362
+ /**
16363
+ * CA-CFAR false alarm probability from searched-cell count and multiplier.
16364
+ * @param {number} searched_cells
16365
+ * @param {number} multiplier
16366
+ * @returns {number}
16367
+ */
16368
+ export function cfarCaPfaFromMultiplier(searched_cells, multiplier) {
16369
+ const ret = wasm.cfarCaPfaFromMultiplier(searched_cells, multiplier);
16370
+ if (ret[2]) {
16371
+ throw takeFromExternrefTable0(ret[1]);
16372
+ }
16373
+ return ret[0];
16374
+ }
16375
+
16376
+ /**
16377
+ * CA-CFAR absolute threshold from searched-cell count, target false alarm
16378
+ * probability, and mean noise level.
16379
+ * @param {number} searched_cells
16380
+ * @param {number} false_alarm_probability
16381
+ * @param {number} noise_level
16382
+ * @returns {number}
16383
+ */
16384
+ export function cfarCaThreshold(searched_cells, false_alarm_probability, noise_level) {
16385
+ const ret = wasm.cfarCaThreshold(searched_cells, false_alarm_probability, noise_level);
16386
+ if (ret[2]) {
16387
+ throw takeFromExternrefTable0(ret[1]);
16388
+ }
16389
+ return ret[0];
16390
+ }
16391
+
16392
+ /**
16393
+ * Compute the closed-form Chan-Ho seed used by [`locateSource`].
16394
+ *
16395
+ * `mode` is `"toa"`, `"tdoa"`, or `{ mode: "tdoa", referenceSensor }`.
16396
+ * Per-sensor speed overrides are not used by the closed-form equations, but
16397
+ * they are used by [`locateSource`] during iterative refinement.
16398
+ * @param {any} sensors
16399
+ * @param {any} arrival_times_s
16400
+ * @param {number} propagation_speed_m_s
16401
+ * @param {any} mode
16402
+ * @returns {any}
16403
+ */
16404
+ export function chanHoInitialGuess(sensors, arrival_times_s, propagation_speed_m_s, mode) {
16405
+ const ret = wasm.chanHoInitialGuess(sensors, arrival_times_s, propagation_speed_m_s, mode);
16406
+ if (ret[2]) {
16407
+ throw takeFromExternrefTable0(ret[1]);
16408
+ }
16409
+ return takeFromExternrefTable0(ret[0]);
16410
+ }
16411
+
15993
16412
  /**
15994
16413
  * Returns `true` when a diff has any findings.
15995
16414
  * @param {any} diff
@@ -17074,6 +17493,39 @@ export function estimateDecayWithSpaceWeather(drag, table, request) {
17074
17493
  return takeFromExternrefTable0(ret[0]);
17075
17494
  }
17076
17495
 
17496
+ /**
17497
+ * Exponentially weighted moving-average update.
17498
+ *
17499
+ * `alpha` must be in `[0, 1]`; the returned value is
17500
+ * `previous + alpha * (sample - previous)`.
17501
+ * @param {number} previous
17502
+ * @param {number} sample
17503
+ * @param {number} alpha
17504
+ * @returns {number}
17505
+ */
17506
+ export function ewmaUpdate(previous, sample, alpha) {
17507
+ const ret = wasm.ewmaUpdate(previous, sample, alpha);
17508
+ if (ret[2]) {
17509
+ throw takeFromExternrefTable0(ret[1]);
17510
+ }
17511
+ return ret[0];
17512
+ }
17513
+
17514
+ /**
17515
+ * EWMA update with `alpha = 1 / 2^shift`.
17516
+ * @param {number} previous
17517
+ * @param {number} sample
17518
+ * @param {number} shift
17519
+ * @returns {number}
17520
+ */
17521
+ export function ewmaUpdatePowerOfTwo(previous, sample, shift) {
17522
+ const ret = wasm.ewmaUpdatePowerOfTwo(previous, sample, shift);
17523
+ if (ret[2]) {
17524
+ throw takeFromExternrefTable0(ret[1]);
17525
+ }
17526
+ return ret[0];
17527
+ }
17528
+
17077
17529
  /**
17078
17530
  * Find Moon elevation threshold crossings (moonrise / moonset) over a UTC
17079
17531
  * window.
@@ -18203,6 +18655,25 @@ export function jarqueBera(x) {
18203
18655
  return takeFromExternrefTable0(ret[0]);
18204
18656
  }
18205
18657
 
18658
+ /**
18659
+ * Steady-state gains for a scalar constant-velocity Kalman filter.
18660
+ *
18661
+ * `trackingIndex`, `dt`, and `measurementVariance` must be positive. Returns
18662
+ * `{ positionGain, rateGain }`; `rateGain * dt` equals the alpha-beta `beta`
18663
+ * gain for the same tracking index.
18664
+ * @param {number} tracking_index
18665
+ * @param {number} dt
18666
+ * @param {number} measurement_variance
18667
+ * @returns {any}
18668
+ */
18669
+ export function kalmanCvSteadyStateGains(tracking_index, dt, measurement_variance) {
18670
+ const ret = wasm.kalmanCvSteadyStateGains(tracking_index, dt, measurement_variance);
18671
+ if (ret[2]) {
18672
+ throw takeFromExternrefTable0(ret[1]);
18673
+ }
18674
+ return takeFromExternrefTable0(ret[0]);
18675
+ }
18676
+
18206
18677
  /**
18207
18678
  * GPS broadcast Klobuchar ionospheric group delay in the model's native units
18208
18679
  * (positive metres).
@@ -18744,6 +19215,29 @@ export function loadSp3(bytes) {
18744
19215
  return Sp3.__wrap(ret[0]);
18745
19216
  }
18746
19217
 
19218
+ /**
19219
+ * Locate a source from sensor arrival times.
19220
+ *
19221
+ * `sensors` is an array of `{ positionM, propagationSpeedMS? }`; each
19222
+ * `positionM` is a 2D or 3D Cartesian metre vector and all sensors must share
19223
+ * the same dimension. `arrivalTimesS` is an aligned seconds array,
19224
+ * `propagationSpeedMS` is the call-level speed in metres per second, and
19225
+ * `options` may include `mode`, `referenceSensor`, `timingSigmaS`, `loss`,
19226
+ * `fScaleS`, `ftol`, `xtol`, `gtol`, and `maxNfev`.
19227
+ * @param {any} sensors
19228
+ * @param {any} arrival_times_s
19229
+ * @param {number} propagation_speed_m_s
19230
+ * @param {any} options
19231
+ * @returns {any}
19232
+ */
19233
+ export function locateSource(sensors, arrival_times_s, propagation_speed_m_s, options) {
19234
+ const ret = wasm.locateSource(sensors, arrival_times_s, propagation_speed_m_s, options);
19235
+ if (ret[2]) {
19236
+ throw takeFromExternrefTable0(ret[1]);
19237
+ }
19238
+ return takeFromExternrefTable0(ret[0]);
19239
+ }
19240
+
18747
19241
  /**
18748
19242
  * @param {bigint} start_unix_us
18749
19243
  * @param {bigint} end_unix_us
@@ -18795,6 +19289,33 @@ export function lvlhRotation(position_km, velocity_km_s) {
18795
19289
  return v3;
18796
19290
  }
18797
19291
 
19292
+ /**
19293
+ * Gaussian consistency factor applied by [`madSpread`].
19294
+ * @returns {number}
19295
+ */
19296
+ export function madGaussianConsistency() {
19297
+ const ret = wasm.madGaussianConsistency();
19298
+ return ret;
19299
+ }
19300
+
19301
+ /**
19302
+ * Median absolute deviation spread estimate.
19303
+ *
19304
+ * `values` is a JS number array. The returned spread is
19305
+ * `MAD_GAUSSIAN_CONSISTENCY * median(abs(value - median(values)))`, floored by
19306
+ * `scaleFloor`.
19307
+ * @param {any} values
19308
+ * @param {number} scale_floor
19309
+ * @returns {number}
19310
+ */
19311
+ export function madSpread(values, scale_floor) {
19312
+ const ret = wasm.madSpread(values, scale_floor);
19313
+ if (ret[2]) {
19314
+ throw takeFromExternrefTable0(ret[1]);
19315
+ }
19316
+ return ret[0];
19317
+ }
19318
+
18798
19319
  /**
18799
19320
  * @param {number} radius_km
18800
19321
  * @returns {number}
@@ -19204,6 +19725,65 @@ export function nequickGStecTecu(_eval) {
19204
19725
  return ret[0];
19205
19726
  }
19206
19727
 
19728
+ /**
19729
+ * Scalar normalized innovation squared statistic.
19730
+ * @param {number} innovation
19731
+ * @param {number} innovation_variance
19732
+ * @returns {number}
19733
+ */
19734
+ export function nis(innovation, innovation_variance) {
19735
+ const ret = wasm.nis(innovation, innovation_variance);
19736
+ if (ret[2]) {
19737
+ throw takeFromExternrefTable0(ret[1]);
19738
+ }
19739
+ return ret[0];
19740
+ }
19741
+
19742
+ /**
19743
+ * Bar-Shalom expected NIS value for `dof` measurement degrees of freedom.
19744
+ * @param {number} dof
19745
+ * @returns {number}
19746
+ */
19747
+ export function nisExpectedValue(dof) {
19748
+ const ret = wasm.nisExpectedValue(dof);
19749
+ if (ret[2]) {
19750
+ throw takeFromExternrefTable0(ret[1]);
19751
+ }
19752
+ return ret[0];
19753
+ }
19754
+
19755
+ /**
19756
+ * Test a scalar innovation against a chi-square NIS gate.
19757
+ *
19758
+ * Returns `{ nis, threshold, inGate, dof }`, with `confidence` in `(0, 1)`.
19759
+ * @param {number} innovation
19760
+ * @param {number} innovation_variance
19761
+ * @param {number} dof
19762
+ * @param {number} confidence
19763
+ * @returns {any}
19764
+ */
19765
+ export function nisGate(innovation, innovation_variance, dof, confidence) {
19766
+ const ret = wasm.nisGate(innovation, innovation_variance, dof, confidence);
19767
+ if (ret[2]) {
19768
+ throw takeFromExternrefTable0(ret[1]);
19769
+ }
19770
+ return takeFromExternrefTable0(ret[0]);
19771
+ }
19772
+
19773
+ /**
19774
+ * Chi-square NIS gate threshold for `dof` and confidence probability.
19775
+ * @param {number} dof
19776
+ * @param {number} confidence
19777
+ * @returns {number}
19778
+ */
19779
+ export function nisGateThreshold(dof, confidence) {
19780
+ const ret = wasm.nisGateThreshold(dof, confidence);
19781
+ if (ret[2]) {
19782
+ throw takeFromExternrefTable0(ret[1]);
19783
+ }
19784
+ return ret[0];
19785
+ }
19786
+
19207
19787
  /**
19208
19788
  * Parse bytes and return grouped epoch snapshots directly.
19209
19789
  * @param {Uint8Array} bytes
@@ -19287,6 +19867,20 @@ export function normalCovariance(jacobian, m, n, variance_scale) {
19287
19867
  return v2;
19288
19868
  }
19289
19869
 
19870
+ /**
19871
+ * Scalar normalized innovation `innovation / sqrt(innovationVariance)`.
19872
+ * @param {number} innovation
19873
+ * @param {number} innovation_variance
19874
+ * @returns {number}
19875
+ */
19876
+ export function normalizedInnovation(innovation, innovation_variance) {
19877
+ const ret = wasm.normalizedInnovation(innovation, innovation_variance);
19878
+ if (ret[2]) {
19879
+ throw takeFromExternrefTable0(ret[1]);
19880
+ }
19881
+ return ret[0];
19882
+ }
19883
+
19290
19884
  /**
19291
19885
  * Build the NTRIP connection request bytes for a config object.
19292
19886
  * @param {any} config
@@ -19302,6 +19896,23 @@ export function ntripRequestBytes(config) {
19302
19896
  return v1;
19303
19897
  }
19304
19898
 
19899
+ /**
19900
+ * Missing-position sentinel used in failed observable-state batch elements.
19901
+ *
19902
+ * The returned JS value is `[NaN, NaN, NaN]`, matching
19903
+ * `sidereon_core::ephemeris::OBSERVABLE_STATE_MISSING_POSITION_ECEF_M`. Always
19904
+ * check `elementResults[i].ok` or `statuses[i]` before using
19905
+ * `positionsEcefM[i]`.
19906
+ * @returns {any}
19907
+ */
19908
+ export function observableStateMissingPositionEcefM() {
19909
+ const ret = wasm.observableStateMissingPositionEcefM();
19910
+ if (ret[2]) {
19911
+ throw takeFromExternrefTable0(ret[1]);
19912
+ }
19913
+ return takeFromExternrefTable0(ret[0]);
19914
+ }
19915
+
19305
19916
  /**
19306
19917
  * Predict observables for one satellite from a broadcast ephemeris store.
19307
19918
  * Delegates to `sidereon_core::observables::predict`.
@@ -21413,6 +22024,74 @@ export function solveWithFallback(precise, broadcast, request, policy) {
21413
22024
  return SourcedSolution.__wrap(ret[0]);
21414
22025
  }
21415
22026
 
22027
+ /**
22028
+ * Compute the timing Cramer-Rao lower bound for a proposed source position.
22029
+ *
22030
+ * The covariance is `(H^T H)^-1 * timingSigmaS^2`; position blocks are square
22031
+ * metres and origin-time variance is square seconds.
22032
+ * @param {any} sensors
22033
+ * @param {any} source_position_m
22034
+ * @param {number} propagation_speed_m_s
22035
+ * @param {number} timing_sigma_s
22036
+ * @returns {any}
22037
+ */
22038
+ export function sourceCrlb(sensors, source_position_m, propagation_speed_m_s, timing_sigma_s) {
22039
+ const ret = wasm.sourceCrlb(sensors, source_position_m, propagation_speed_m_s, timing_sigma_s);
22040
+ if (ret[2]) {
22041
+ throw takeFromExternrefTable0(ret[1]);
22042
+ }
22043
+ return takeFromExternrefTable0(ret[0]);
22044
+ }
22045
+
22046
+ /**
22047
+ * Compute timing DOP for a proposed source position.
22048
+ *
22049
+ * `sourcePositionM` is a 2D or 3D Cartesian metre vector in the same frame as
22050
+ * the sensors. The returned DOP values multiply timing sigma in seconds to
22051
+ * produce metres in the caller's Cartesian axes.
22052
+ * @param {any} sensors
22053
+ * @param {any} source_position_m
22054
+ * @param {number} propagation_speed_m_s
22055
+ * @returns {any}
22056
+ */
22057
+ export function sourceDop(sensors, source_position_m, propagation_speed_m_s) {
22058
+ const ret = wasm.sourceDop(sensors, source_position_m, propagation_speed_m_s);
22059
+ if (ret[2]) {
22060
+ throw takeFromExternrefTable0(ret[1]);
22061
+ }
22062
+ return takeFromExternrefTable0(ret[0]);
22063
+ }
22064
+
22065
+ /**
22066
+ * Return the plain mode object for TDOA solves against `referenceSensor`.
22067
+ * @param {number} reference_sensor
22068
+ * @returns {any}
22069
+ */
22070
+ export function sourceSolveModeTdoa(reference_sensor) {
22071
+ const ret = wasm.sourceSolveModeTdoa(reference_sensor);
22072
+ if (ret[2]) {
22073
+ throw takeFromExternrefTable0(ret[1]);
22074
+ }
22075
+ return takeFromExternrefTable0(ret[0]);
22076
+ }
22077
+
22078
+ /**
22079
+ * Return the plain mode value for absolute time-of-arrival solves.
22080
+ * @returns {string}
22081
+ */
22082
+ export function sourceSolveModeToa() {
22083
+ let deferred1_0;
22084
+ let deferred1_1;
22085
+ try {
22086
+ const ret = wasm.sourceSolveModeToa();
22087
+ deferred1_0 = ret[0];
22088
+ deferred1_1 = ret[1];
22089
+ return getStringFromWasm0(ret[0], ret[1]);
22090
+ } finally {
22091
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
22092
+ }
22093
+ }
22094
+
21416
22095
  /**
21417
22096
  * Extract a parsed SP3 product as the canonical precise-ephemeris samples, one
21418
22097
  * per real position record in ascending epoch order.
@@ -22847,6 +23526,9 @@ const PppFixedSolutionFinalization = (typeof FinalizationRegistry === 'undefined
22847
23526
  const PppFloatSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
22848
23527
  ? { register: () => {}, unregister: () => {} }
22849
23528
  : new FinalizationRegistry(ptr => wasm.__wbg_pppfloatsolution_free(ptr, 1));
23529
+ const PreciseEphemerisInterpolantFinalization = (typeof FinalizationRegistry === 'undefined')
23530
+ ? { register: () => {}, unregister: () => {} }
23531
+ : new FinalizationRegistry(ptr => wasm.__wbg_preciseephemerisinterpolant_free(ptr, 1));
22850
23532
  const PreciseEphemerisSampleSourceFinalization = (typeof FinalizationRegistry === 'undefined')
22851
23533
  ? { register: () => {}, unregister: () => {} }
22852
23534
  : new FinalizationRegistry(ptr => wasm.__wbg_preciseephemerissamplesource_free(ptr, 1));