@neilberkman/sidereon 0.9.0 → 0.9.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/pkg/sidereon.js CHANGED
@@ -3284,6 +3284,71 @@ export class Ephemeris {
3284
3284
  }
3285
3285
  if (Symbol.dispose) Ephemeris.prototype[Symbol.dispose] = Ephemeris.prototype.free;
3286
3286
 
3287
+ /**
3288
+ * A confidence ellipse from a 2x2 covariance block: semi-axes scaled by the
3289
+ * two-degree-of-freedom chi-square quantile `-2 ln(1 - confidence)`.
3290
+ */
3291
+ export class ErrorEllipse2 {
3292
+ static __wrap(ptr) {
3293
+ const obj = Object.create(ErrorEllipse2.prototype);
3294
+ obj.__wbg_ptr = ptr;
3295
+ ErrorEllipse2Finalization.register(obj, obj.__wbg_ptr, obj);
3296
+ return obj;
3297
+ }
3298
+ __destroy_into_raw() {
3299
+ const ptr = this.__wbg_ptr;
3300
+ this.__wbg_ptr = 0;
3301
+ ErrorEllipse2Finalization.unregister(this);
3302
+ return ptr;
3303
+ }
3304
+ free() {
3305
+ const ptr = this.__destroy_into_raw();
3306
+ wasm.__wbg_errorellipse2_free(ptr, 0);
3307
+ }
3308
+ /**
3309
+ * Two-degree-of-freedom chi-square scale `-2 ln(1 - confidence)`.
3310
+ * @returns {number}
3311
+ */
3312
+ get chiSquareScale() {
3313
+ const ret = wasm.errorellipse2_chiSquareScale(this.__wbg_ptr);
3314
+ return ret;
3315
+ }
3316
+ /**
3317
+ * Requested confidence probability in `(0, 1)`.
3318
+ * @returns {number}
3319
+ */
3320
+ get confidence() {
3321
+ const ret = wasm.errorellipse2_confidence(this.__wbg_ptr);
3322
+ return ret;
3323
+ }
3324
+ /**
3325
+ * Semi-major-axis orientation in radians, from the first (row/col 0) axis
3326
+ * toward the second (row/col 1) axis.
3327
+ * @returns {number}
3328
+ */
3329
+ get orientationRad() {
3330
+ const ret = wasm.errorellipse2_orientationRad(this.__wbg_ptr);
3331
+ return ret;
3332
+ }
3333
+ /**
3334
+ * Semi-major axis length (same unit as the square root of the covariance).
3335
+ * @returns {number}
3336
+ */
3337
+ get semiMajor() {
3338
+ const ret = wasm.errorellipse2_semiMajor(this.__wbg_ptr);
3339
+ return ret;
3340
+ }
3341
+ /**
3342
+ * Semi-minor axis length.
3343
+ * @returns {number}
3344
+ */
3345
+ get semiMinor() {
3346
+ const ret = wasm.errorellipse2_semiMinor(this.__wbg_ptr);
3347
+ return ret;
3348
+ }
3349
+ }
3350
+ if (Symbol.dispose) ErrorEllipse2.prototype[Symbol.dispose] = ErrorEllipse2.prototype.free;
3351
+
3287
3352
  /**
3288
3353
  * A fault-detection-and-exclusion result: the surviving solution, the excluded
3289
3354
  * satellites in exclusion order, and the number of exclusions performed.
@@ -5264,6 +5329,201 @@ export class LeapSecondTable {
5264
5329
  }
5265
5330
  if (Symbol.dispose) LeapSecondTable.prototype[Symbol.dispose] = LeapSecondTable.prototype.free;
5266
5331
 
5332
+ /**
5333
+ * A serial leave-one-out sweep: the base solve over all rows plus one re-solve
5334
+ * per masked row, with the per-row optimum-cost shift.
5335
+ */
5336
+ export class LeastSquaresDropOneReport {
5337
+ static __wrap(ptr) {
5338
+ const obj = Object.create(LeastSquaresDropOneReport.prototype);
5339
+ obj.__wbg_ptr = ptr;
5340
+ LeastSquaresDropOneReportFinalization.register(obj, obj.__wbg_ptr, obj);
5341
+ return obj;
5342
+ }
5343
+ __destroy_into_raw() {
5344
+ const ptr = this.__wbg_ptr;
5345
+ this.__wbg_ptr = 0;
5346
+ LeastSquaresDropOneReportFinalization.unregister(this);
5347
+ return ptr;
5348
+ }
5349
+ free() {
5350
+ const ptr = this.__destroy_into_raw();
5351
+ wasm.__wbg_leastsquaresdroponereport_free(ptr, 0);
5352
+ }
5353
+ /**
5354
+ * The solve over the full residual.
5355
+ * @returns {LeastSquaresResult}
5356
+ */
5357
+ get base() {
5358
+ const ret = wasm.leastsquaresdroponereport_base(this.__wbg_ptr);
5359
+ return LeastSquaresResult.__wrap(ret);
5360
+ }
5361
+ /**
5362
+ * `costDeltas[i] = dropAt(i).cost - base.cost`: how much the optimum cost
5363
+ * moves when row `i` is removed. `Float64Array` of length `count`.
5364
+ * @returns {Float64Array}
5365
+ */
5366
+ get costDeltas() {
5367
+ const ret = wasm.leastsquaresdroponereport_costDeltas(this.__wbg_ptr);
5368
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
5369
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
5370
+ return v1;
5371
+ }
5372
+ /**
5373
+ * Number of masked-row re-solves (equals the residual-row count `m`).
5374
+ * @returns {number}
5375
+ */
5376
+ get count() {
5377
+ const ret = wasm.leastsquaresdroponereport_count(this.__wbg_ptr);
5378
+ return ret >>> 0;
5379
+ }
5380
+ /**
5381
+ * The solve with residual row `index` masked out. Throws a `RangeError` for
5382
+ * an out-of-range index.
5383
+ * @param {number} index
5384
+ * @returns {LeastSquaresResult}
5385
+ */
5386
+ dropAt(index) {
5387
+ const ret = wasm.leastsquaresdroponereport_dropAt(this.__wbg_ptr, index);
5388
+ if (ret[2]) {
5389
+ throw takeFromExternrefTable0(ret[1]);
5390
+ }
5391
+ return LeastSquaresResult.__wrap(ret[0]);
5392
+ }
5393
+ }
5394
+ if (Symbol.dispose) LeastSquaresDropOneReport.prototype[Symbol.dispose] = LeastSquaresDropOneReport.prototype.free;
5395
+
5396
+ /**
5397
+ * The outcome of one trust-region least-squares solve, mirroring the fields of
5398
+ * `scipy.optimize.least_squares`'s `OptimizeResult`.
5399
+ */
5400
+ export class LeastSquaresResult {
5401
+ static __wrap(ptr) {
5402
+ const obj = Object.create(LeastSquaresResult.prototype);
5403
+ obj.__wbg_ptr = ptr;
5404
+ LeastSquaresResultFinalization.register(obj, obj.__wbg_ptr, obj);
5405
+ return obj;
5406
+ }
5407
+ __destroy_into_raw() {
5408
+ const ptr = this.__wbg_ptr;
5409
+ this.__wbg_ptr = 0;
5410
+ LeastSquaresResultFinalization.unregister(this);
5411
+ return ptr;
5412
+ }
5413
+ free() {
5414
+ const ptr = this.__destroy_into_raw();
5415
+ wasm.__wbg_leastsquaresresult_free(ptr, 0);
5416
+ }
5417
+ /**
5418
+ * Optimal cost `0.5 * sum(residual^2)` (after robust reweighting when a
5419
+ * non-linear loss is used).
5420
+ * @returns {number}
5421
+ */
5422
+ get cost() {
5423
+ const ret = wasm.leastsquaresresult_cost(this.__wbg_ptr);
5424
+ return ret;
5425
+ }
5426
+ /**
5427
+ * Residual vector at the solution, `Float64Array` of length `m`.
5428
+ * @returns {Float64Array}
5429
+ */
5430
+ get fun() {
5431
+ const ret = wasm.leastsquaresresult_fun(this.__wbg_ptr);
5432
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
5433
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
5434
+ return v1;
5435
+ }
5436
+ /**
5437
+ * Gradient `J^T f` at the solution, `Float64Array` of length `n`.
5438
+ * @returns {Float64Array}
5439
+ */
5440
+ get grad() {
5441
+ const ret = wasm.leastsquaresresult_grad(this.__wbg_ptr);
5442
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
5443
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
5444
+ return v1;
5445
+ }
5446
+ /**
5447
+ * Row-major `m`-by-`n` Jacobian at the solution, flat `Float64Array` of
5448
+ * length `m * n`.
5449
+ * @returns {Float64Array}
5450
+ */
5451
+ get jac() {
5452
+ const ret = wasm.leastsquaresresult_jac(this.__wbg_ptr);
5453
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
5454
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
5455
+ return v1;
5456
+ }
5457
+ /**
5458
+ * Residual row count `m`.
5459
+ * @returns {number}
5460
+ */
5461
+ get m() {
5462
+ const ret = wasm.leastsquaresresult_m(this.__wbg_ptr);
5463
+ return ret >>> 0;
5464
+ }
5465
+ /**
5466
+ * Parameter count `n`.
5467
+ * @returns {number}
5468
+ */
5469
+ get n() {
5470
+ const ret = wasm.leastsquaresresult_n(this.__wbg_ptr);
5471
+ return ret >>> 0;
5472
+ }
5473
+ /**
5474
+ * Number of residual evaluations.
5475
+ * @returns {number}
5476
+ */
5477
+ get nfev() {
5478
+ const ret = wasm.leastsquaresresult_nfev(this.__wbg_ptr);
5479
+ return ret >>> 0;
5480
+ }
5481
+ /**
5482
+ * Number of Jacobian evaluations.
5483
+ * @returns {number}
5484
+ */
5485
+ get njev() {
5486
+ const ret = wasm.leastsquaresresult_njev(this.__wbg_ptr);
5487
+ return ret >>> 0;
5488
+ }
5489
+ /**
5490
+ * First-order optimality `||J^T f||_inf` at the solution.
5491
+ * @returns {number}
5492
+ */
5493
+ get optimality() {
5494
+ const ret = wasm.leastsquaresresult_optimality(this.__wbg_ptr);
5495
+ return ret;
5496
+ }
5497
+ /**
5498
+ * SciPy-compatible termination status: `0` max evaluations, `1` gtol,
5499
+ * `2` ftol, `3` xtol, `4` both ftol and xtol.
5500
+ * @returns {number}
5501
+ */
5502
+ get status() {
5503
+ const ret = wasm.leastsquaresresult_status(this.__wbg_ptr);
5504
+ return ret;
5505
+ }
5506
+ /**
5507
+ * Whether the solve converged (`status > 0`).
5508
+ * @returns {boolean}
5509
+ */
5510
+ get success() {
5511
+ const ret = wasm.leastsquaresresult_success(this.__wbg_ptr);
5512
+ return ret !== 0;
5513
+ }
5514
+ /**
5515
+ * Solution parameter vector, `Float64Array` of length `n`.
5516
+ * @returns {Float64Array}
5517
+ */
5518
+ get x() {
5519
+ const ret = wasm.leastsquaresresult_x(this.__wbg_ptr);
5520
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
5521
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
5522
+ return v1;
5523
+ }
5524
+ }
5525
+ if (Symbol.dispose) LeastSquaresResult.prototype[Symbol.dispose] = LeastSquaresResult.prototype.free;
5526
+
5267
5527
  /**
5268
5528
  * Link-budget inputs for [`LinkBudget.margin`].
5269
5529
  */
@@ -5761,6 +6021,117 @@ export class MappingFactors {
5761
6021
  }
5762
6022
  if (Symbol.dispose) MappingFactors.prototype[Symbol.dispose] = MappingFactors.prototype.free;
5763
6023
 
6024
+ /**
6025
+ * One refined Moon elevation threshold crossing (moonrise / moonset).
6026
+ */
6027
+ export class MoonElevationCrossing {
6028
+ static __wrap(ptr) {
6029
+ const obj = Object.create(MoonElevationCrossing.prototype);
6030
+ obj.__wbg_ptr = ptr;
6031
+ MoonElevationCrossingFinalization.register(obj, obj.__wbg_ptr, obj);
6032
+ return obj;
6033
+ }
6034
+ __destroy_into_raw() {
6035
+ const ptr = this.__wbg_ptr;
6036
+ this.__wbg_ptr = 0;
6037
+ MoonElevationCrossingFinalization.unregister(this);
6038
+ return ptr;
6039
+ }
6040
+ free() {
6041
+ const ptr = this.__destroy_into_raw();
6042
+ wasm.__wbg_moonelevationcrossing_free(ptr, 0);
6043
+ }
6044
+ /**
6045
+ * Topocentric Moon elevation at the refined instant, degrees.
6046
+ * @returns {number}
6047
+ */
6048
+ get elevationDeg() {
6049
+ const ret = wasm.moonelevationcrossing_elevationDeg(this.__wbg_ptr);
6050
+ return ret;
6051
+ }
6052
+ /**
6053
+ * Crossing direction: `"rising"` (moonrise) or `"setting"` (moonset).
6054
+ * @returns {string}
6055
+ */
6056
+ get kind() {
6057
+ let deferred1_0;
6058
+ let deferred1_1;
6059
+ try {
6060
+ const ret = wasm.moonelevationcrossing_kind(this.__wbg_ptr);
6061
+ deferred1_0 = ret[0];
6062
+ deferred1_1 = ret[1];
6063
+ return getStringFromWasm0(ret[0], ret[1]);
6064
+ } finally {
6065
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
6066
+ }
6067
+ }
6068
+ /**
6069
+ * Refined crossing instant, unix microseconds.
6070
+ * @returns {bigint}
6071
+ */
6072
+ get timeUnixUs() {
6073
+ const ret = wasm.moonelevationcrossing_timeUnixUs(this.__wbg_ptr);
6074
+ return ret;
6075
+ }
6076
+ }
6077
+ if (Symbol.dispose) MoonElevationCrossing.prototype[Symbol.dispose] = MoonElevationCrossing.prototype.free;
6078
+
6079
+ /**
6080
+ * One refined Moon meridian transit (culmination).
6081
+ */
6082
+ export class MoonTransit {
6083
+ static __wrap(ptr) {
6084
+ const obj = Object.create(MoonTransit.prototype);
6085
+ obj.__wbg_ptr = ptr;
6086
+ MoonTransitFinalization.register(obj, obj.__wbg_ptr, obj);
6087
+ return obj;
6088
+ }
6089
+ __destroy_into_raw() {
6090
+ const ptr = this.__wbg_ptr;
6091
+ this.__wbg_ptr = 0;
6092
+ MoonTransitFinalization.unregister(this);
6093
+ return ptr;
6094
+ }
6095
+ free() {
6096
+ const ptr = this.__destroy_into_raw();
6097
+ wasm.__wbg_moontransit_free(ptr, 0);
6098
+ }
6099
+ /**
6100
+ * Topocentric Moon elevation at the refined instant, degrees.
6101
+ * @returns {number}
6102
+ */
6103
+ get elevationDeg() {
6104
+ const ret = wasm.moontransit_elevationDeg(this.__wbg_ptr);
6105
+ return ret;
6106
+ }
6107
+ /**
6108
+ * Culmination kind: `"upper"` (due south, highest) or `"lower"` (due north,
6109
+ * lowest).
6110
+ * @returns {string}
6111
+ */
6112
+ get kind() {
6113
+ let deferred1_0;
6114
+ let deferred1_1;
6115
+ try {
6116
+ const ret = wasm.moontransit_kind(this.__wbg_ptr);
6117
+ deferred1_0 = ret[0];
6118
+ deferred1_1 = ret[1];
6119
+ return getStringFromWasm0(ret[0], ret[1]);
6120
+ } finally {
6121
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
6122
+ }
6123
+ }
6124
+ /**
6125
+ * Refined culmination instant, unix microseconds.
6126
+ * @returns {bigint}
6127
+ */
6128
+ get timeUnixUs() {
6129
+ const ret = wasm.moontransit_timeUnixUs(this.__wbg_ptr);
6130
+ return ret;
6131
+ }
6132
+ }
6133
+ if (Symbol.dispose) MoonTransit.prototype[Symbol.dispose] = MoonTransit.prototype.free;
6134
+
5764
6135
  /**
5765
6136
  * One solved moving-baseline epoch.
5766
6137
  */
@@ -8756,28 +9127,107 @@ export class PppFloatSolution {
8756
9127
  if (Symbol.dispose) PppFloatSolution.prototype[Symbol.dispose] = PppFloatSolution.prototype.free;
8757
9128
 
8758
9129
  /**
8759
- * Predicted GNSS observables for one satellite at one receive epoch. Every
8760
- * field is computed by `sidereon_core::observables::predict`.
9130
+ * The per-request results of a batch observable prediction, index-aligned to
9131
+ * the input requests. Each request independently either produced observables or
9132
+ * failed; query a request with [`PredictBatch.isOk`] /
9133
+ * [`PredictBatch.observables`] / [`PredictBatch.error`].
8761
9134
  */
8762
- export class PredictedObservables {
9135
+ export class PredictBatch {
8763
9136
  static __wrap(ptr) {
8764
- const obj = Object.create(PredictedObservables.prototype);
9137
+ const obj = Object.create(PredictBatch.prototype);
8765
9138
  obj.__wbg_ptr = ptr;
8766
- PredictedObservablesFinalization.register(obj, obj.__wbg_ptr, obj);
9139
+ PredictBatchFinalization.register(obj, obj.__wbg_ptr, obj);
8767
9140
  return obj;
8768
9141
  }
8769
9142
  __destroy_into_raw() {
8770
9143
  const ptr = this.__wbg_ptr;
8771
9144
  this.__wbg_ptr = 0;
8772
- PredictedObservablesFinalization.unregister(this);
9145
+ PredictBatchFinalization.unregister(this);
8773
9146
  return ptr;
8774
9147
  }
8775
9148
  free() {
8776
9149
  const ptr = this.__destroy_into_raw();
8777
- wasm.__wbg_predictedobservables_free(ptr, 0);
9150
+ wasm.__wbg_predictbatch_free(ptr, 0);
8778
9151
  }
8779
9152
  /**
8780
- * Topocentric azimuth in `[0, 360)`, degrees.
9153
+ * Number of requests in the batch.
9154
+ * @returns {number}
9155
+ */
9156
+ get count() {
9157
+ const ret = wasm.predictbatch_count(this.__wbg_ptr);
9158
+ return ret >>> 0;
9159
+ }
9160
+ /**
9161
+ * The failure message for request `index`, or `undefined` when it
9162
+ * succeeded. Throws a `RangeError` for an out-of-range index.
9163
+ * @param {number} index
9164
+ * @returns {string | undefined}
9165
+ */
9166
+ error(index) {
9167
+ const ret = wasm.predictbatch_error(this.__wbg_ptr, index);
9168
+ if (ret[3]) {
9169
+ throw takeFromExternrefTable0(ret[2]);
9170
+ }
9171
+ let v1;
9172
+ if (ret[0] !== 0) {
9173
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
9174
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
9175
+ }
9176
+ return v1;
9177
+ }
9178
+ /**
9179
+ * Whether request `index` produced observables. Throws a `RangeError` for
9180
+ * an out-of-range index.
9181
+ * @param {number} index
9182
+ * @returns {boolean}
9183
+ */
9184
+ isOk(index) {
9185
+ const ret = wasm.predictbatch_isOk(this.__wbg_ptr, index);
9186
+ if (ret[2]) {
9187
+ throw takeFromExternrefTable0(ret[1]);
9188
+ }
9189
+ return ret[0] !== 0;
9190
+ }
9191
+ /**
9192
+ * The observables for request `index`. Throws a `RangeError` for an
9193
+ * out-of-range index and an `Error` carrying that request's failure message
9194
+ * when the prediction failed (check [`PredictBatch.isOk`] first).
9195
+ * @param {number} index
9196
+ * @returns {PredictedObservables}
9197
+ */
9198
+ observables(index) {
9199
+ const ret = wasm.predictbatch_observables(this.__wbg_ptr, index);
9200
+ if (ret[2]) {
9201
+ throw takeFromExternrefTable0(ret[1]);
9202
+ }
9203
+ return PredictedObservables.__wrap(ret[0]);
9204
+ }
9205
+ }
9206
+ if (Symbol.dispose) PredictBatch.prototype[Symbol.dispose] = PredictBatch.prototype.free;
9207
+
9208
+ /**
9209
+ * Predicted GNSS observables for one satellite at one receive epoch. Every
9210
+ * field is computed by `sidereon_core::observables::predict`.
9211
+ */
9212
+ export class PredictedObservables {
9213
+ static __wrap(ptr) {
9214
+ const obj = Object.create(PredictedObservables.prototype);
9215
+ obj.__wbg_ptr = ptr;
9216
+ PredictedObservablesFinalization.register(obj, obj.__wbg_ptr, obj);
9217
+ return obj;
9218
+ }
9219
+ __destroy_into_raw() {
9220
+ const ptr = this.__wbg_ptr;
9221
+ this.__wbg_ptr = 0;
9222
+ PredictedObservablesFinalization.unregister(this);
9223
+ return ptr;
9224
+ }
9225
+ free() {
9226
+ const ptr = this.__destroy_into_raw();
9227
+ wasm.__wbg_predictedobservables_free(ptr, 0);
9228
+ }
9229
+ /**
9230
+ * Topocentric azimuth in `[0, 360)`, degrees.
8781
9231
  * @returns {number}
8782
9232
  */
8783
9233
  get azimuthDeg() {
@@ -12586,6 +13036,36 @@ export function correlate(iq, prn, options) {
12586
13036
  return CorrelationResult.__wrap(ret[0]);
12587
13037
  }
12588
13038
 
13039
+ /**
13040
+ * Fitted parameter covariance from a converged solve, scaling `(J^T J)^-1` by
13041
+ * the post-fit reduced chi-square `s_sq = 2 * cost / (m - n)` (the same scale
13042
+ * `scipy.optimize.curve_fit` applies to its `pcov`).
13043
+ *
13044
+ * `jacobian` is a flat row-major `(m, n)` `Float64Array` (the Jacobian at the
13045
+ * solution), and `cost` is the solve's optimal cost `0.5 * sum(residual^2)`;
13046
+ * the degrees of freedom `m - n` (taken from the Jacobian's own shape) must be
13047
+ * positive. Pairs naturally with a [`crate::LeastSquaresResult`] (`result.jac`,
13048
+ * `result.m`, `result.n`, `result.cost`). Returns the `n`-by-`n` covariance as
13049
+ * a flat row-major `Float64Array`. Delegates to
13050
+ * `sidereon_core::astro::math::least_squares::covariance_from_jacobian`.
13051
+ * @param {Float64Array} jacobian
13052
+ * @param {number} m
13053
+ * @param {number} n
13054
+ * @param {number} cost
13055
+ * @returns {Float64Array}
13056
+ */
13057
+ export function covarianceFromJacobian(jacobian, m, n, cost) {
13058
+ const ptr0 = passArrayF64ToWasm0(jacobian, wasm.__wbindgen_malloc);
13059
+ const len0 = WASM_VECTOR_LEN;
13060
+ const ret = wasm.covarianceFromJacobian(ptr0, len0, m, n, cost);
13061
+ if (ret[3]) {
13062
+ throw takeFromExternrefTable0(ret[2]);
13063
+ }
13064
+ var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
13065
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
13066
+ return v2;
13067
+ }
13068
+
12589
13069
  /**
12590
13070
  * Whether a 3x3 covariance (flat row-major length 9) is symmetric positive
12591
13071
  * semidefinite within the engine tolerance.
@@ -12834,6 +13314,37 @@ export function dishGain(diameter_m, frequency_hz, efficiency) {
12834
13314
  return ret[0];
12835
13315
  }
12836
13316
 
13317
+ /**
13318
+ * GNSS dilution of precision with an explicit ENU convention for the
13319
+ * horizontal/vertical split.
13320
+ *
13321
+ * `lineOfSight` is a flat row-major `(n, 3)` `Float64Array` of ECEF unit
13322
+ * vectors, `weights` a positive `Float64Array` of length `n`, and `convention`
13323
+ * is `"geodeticNormal"` (the GNSS-standard default, matching [`gnssDop`]) or
13324
+ * `"geocentricRadial"` (radial up). Only HDOP/VDOP differ between conventions
13325
+ * (by ~`1e-3` relative); GDOP/PDOP/TDOP are identical. Delegates to
13326
+ * `sidereon_core::geometry::dop_with_convention`.
13327
+ * @param {Float64Array} line_of_sight
13328
+ * @param {Float64Array} weights
13329
+ * @param {Wgs84Geodetic} receiver
13330
+ * @param {string} convention
13331
+ * @returns {Dop}
13332
+ */
13333
+ export function dopWithConvention(line_of_sight, weights, receiver, convention) {
13334
+ const ptr0 = passArrayF64ToWasm0(line_of_sight, wasm.__wbindgen_malloc);
13335
+ const len0 = WASM_VECTOR_LEN;
13336
+ const ptr1 = passArrayF64ToWasm0(weights, wasm.__wbindgen_malloc);
13337
+ const len1 = WASM_VECTOR_LEN;
13338
+ _assertClass(receiver, Wgs84Geodetic);
13339
+ const ptr2 = passStringToWasm0(convention, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
13340
+ const len2 = WASM_VECTOR_LEN;
13341
+ const ret = wasm.dopWithConvention(ptr0, len0, ptr1, len1, receiver.__wbg_ptr, ptr2, len2);
13342
+ if (ret[2]) {
13343
+ throw takeFromExternrefTable0(ret[1]);
13344
+ }
13345
+ return Dop.__wrap(ret[0]);
13346
+ }
13347
+
12837
13348
  /**
12838
13349
  * Range rate and dimensionless Doppler ratio from a GCRS state.
12839
13350
  *
@@ -12975,6 +13486,53 @@ export function eclipseStatus(satellite_position_km, sun_position_km) {
12975
13486
  return v3;
12976
13487
  }
12977
13488
 
13489
+ /**
13490
+ * Ellipsoidal height `h = H + N` (metres above the WGS84 ellipsoid) from an
13491
+ * orthometric height and a geodetic position in radians, using the embedded
13492
+ * genuine EGM96 1-degree model. Delegates to
13493
+ * `sidereon_core::geoid::egm96_ellipsoidal_height_m`.
13494
+ * @param {number} orthometric_height_m
13495
+ * @param {number} lat_rad
13496
+ * @param {number} lon_rad
13497
+ * @returns {number}
13498
+ */
13499
+ export function egm96EllipsoidalHeightM(orthometric_height_m, lat_rad, lon_rad) {
13500
+ const ret = wasm.egm96EllipsoidalHeightM(orthometric_height_m, lat_rad, lon_rad);
13501
+ return ret;
13502
+ }
13503
+
13504
+ /**
13505
+ * Orthometric height `H = h - N` (metres above mean sea level) from an
13506
+ * ellipsoidal height and a geodetic position in radians, using the embedded
13507
+ * genuine EGM96 1-degree model. Delegates to
13508
+ * `sidereon_core::geoid::egm96_orthometric_height_m`.
13509
+ * @param {number} ellipsoidal_height_m
13510
+ * @param {number} lat_rad
13511
+ * @param {number} lon_rad
13512
+ * @returns {number}
13513
+ */
13514
+ export function egm96OrthometricHeightM(ellipsoidal_height_m, lat_rad, lon_rad) {
13515
+ const ret = wasm.egm96OrthometricHeightM(ellipsoidal_height_m, lat_rad, lon_rad);
13516
+ return ret;
13517
+ }
13518
+
13519
+ /**
13520
+ * Geoid undulation `N` (metres above the WGS84 ellipsoid) at a geodetic
13521
+ * position in radians, from the embedded GENUINE EGM96 1-degree global grid.
13522
+ * Latitude is positive north, longitude positive east. This is the recommended
13523
+ * zero-setup default for metre-class datum work (its bilinear lookup agrees
13524
+ * with the full 15-arcminute EGM96 grid to ~0.4 m RMS); the coarse
13525
+ * [`geoidUndulation`] is only suitable for sanity checks. Delegates to
13526
+ * `sidereon_core::geoid::egm96_undulation`.
13527
+ * @param {number} lat_rad
13528
+ * @param {number} lon_rad
13529
+ * @returns {number}
13530
+ */
13531
+ export function egm96Undulation(lat_rad, lon_rad) {
13532
+ const ret = wasm.egm96Undulation(lat_rad, lon_rad);
13533
+ return ret;
13534
+ }
13535
+
12978
13536
  /**
12979
13537
  * Effective isotropic radiated power, dBW.
12980
13538
  * @param {number} tx_power_dbm
@@ -13126,6 +13684,81 @@ export function encounterPlaneCovariance(frame, covariance_km2) {
13126
13684
  return v2;
13127
13685
  }
13128
13686
 
13687
+ /**
13688
+ * Confidence ellipse from an arbitrary 2x2 covariance block.
13689
+ *
13690
+ * `covariance` is a flat row-major length-4 `Float64Array` (`[c00, c01, c10,
13691
+ * c11]`); `confidence` is in `(0, 1)`. The semi-axes are the eigenvalues of the
13692
+ * symmetrized block scaled by the chi-square(2) quantile. Throws a `RangeError`
13693
+ * for a non-positive-semidefinite block or an out-of-range confidence.
13694
+ * Delegates to `sidereon_core::geometry::error_ellipse_2x2`.
13695
+ * @param {Float64Array} covariance
13696
+ * @param {number} confidence
13697
+ * @returns {ErrorEllipse2}
13698
+ */
13699
+ export function errorEllipse2(covariance, confidence) {
13700
+ const ptr0 = passArrayF64ToWasm0(covariance, wasm.__wbindgen_malloc);
13701
+ const len0 = WASM_VECTOR_LEN;
13702
+ const ret = wasm.errorEllipse2(ptr0, len0, confidence);
13703
+ if (ret[2]) {
13704
+ throw takeFromExternrefTable0(ret[1]);
13705
+ }
13706
+ return ErrorEllipse2.__wrap(ret[0]);
13707
+ }
13708
+
13709
+ /**
13710
+ * Find Moon elevation threshold crossings (moonrise / moonset) over a UTC
13711
+ * window.
13712
+ *
13713
+ * The station is geodetic (`latitudeDeg`, `longitudeDeg`, `altitudeKm`);
13714
+ * `startUnixUs` / `endUnixUs` bound the window in unix microseconds. `options`
13715
+ * is `{ elevationThresholdDeg?, stepSeconds?, timeToleranceSeconds? }`.
13716
+ * Delegates to `sidereon_core::astro::bodies::find_moon_elevation_crossings`.
13717
+ * @param {number} latitude_deg
13718
+ * @param {number} longitude_deg
13719
+ * @param {number} altitude_km
13720
+ * @param {bigint} start_unix_us
13721
+ * @param {bigint} end_unix_us
13722
+ * @param {any} options
13723
+ * @returns {MoonElevationCrossing[]}
13724
+ */
13725
+ export function findMoonElevationCrossings(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, options) {
13726
+ const ret = wasm.findMoonElevationCrossings(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, options);
13727
+ if (ret[3]) {
13728
+ throw takeFromExternrefTable0(ret[2]);
13729
+ }
13730
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13731
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13732
+ return v1;
13733
+ }
13734
+
13735
+ /**
13736
+ * Find Moon meridian transits (upper and lower culminations) over a UTC window.
13737
+ *
13738
+ * The station is geodetic (`latitudeDeg`, `longitudeDeg`, `altitudeKm`);
13739
+ * `startUnixUs` / `endUnixUs` bound the window in unix microseconds.
13740
+ * `stepSeconds` is the uniform scan step and `timeToleranceSeconds` the
13741
+ * refinement tolerance. Delegates to
13742
+ * `sidereon_core::astro::bodies::find_moon_transits`.
13743
+ * @param {number} latitude_deg
13744
+ * @param {number} longitude_deg
13745
+ * @param {number} altitude_km
13746
+ * @param {bigint} start_unix_us
13747
+ * @param {bigint} end_unix_us
13748
+ * @param {number} step_seconds
13749
+ * @param {number} time_tolerance_seconds
13750
+ * @returns {MoonTransit[]}
13751
+ */
13752
+ export function findMoonTransits(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, step_seconds, time_tolerance_seconds) {
13753
+ const ret = wasm.findMoonTransits(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, step_seconds, time_tolerance_seconds);
13754
+ if (ret[3]) {
13755
+ throw takeFromExternrefTable0(ret[2]);
13756
+ }
13757
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13758
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13759
+ return v1;
13760
+ }
13761
+
13129
13762
  /**
13130
13763
  * Find local TCA candidates between two satellites over a UTC window.
13131
13764
  *
@@ -13837,6 +14470,43 @@ export function gnssVisible(sp3, station_ecef_m, j2000_seconds, options) {
13837
14470
  return v2;
13838
14471
  }
13839
14472
 
14473
+ /**
14474
+ * GPS - UTC (the GNSS leap-second offset since the GPS epoch) on a UTC calendar
14475
+ * date: the IS-GPS-200 quantity broadcast in the navigation message (18 s from
14476
+ * 2017-01-01). Equals `taiUtcOffsetS - 19`. Use this, not [`taiUtcOffsetS`],
14477
+ * whenever you mean the leap seconds a GPS receiver applies. Delegates to
14478
+ * `sidereon_core::astro::time::scales::gps_utc_offset_s`.
14479
+ * @param {number} year
14480
+ * @param {number} month
14481
+ * @param {number} day
14482
+ * @returns {number}
14483
+ */
14484
+ export function gpsUtcOffsetS(year, month, day) {
14485
+ const ret = wasm.gpsUtcOffsetS(year, month, day);
14486
+ return ret;
14487
+ }
14488
+
14489
+ /**
14490
+ * Trace of the Gauss-Newton Hessian approximation `J^T J`: the sum of the
14491
+ * squared column norms of the Jacobian, with no inverse formed.
14492
+ *
14493
+ * `jacobian` is a flat row-major `(m, n)` `Float64Array`. Delegates to
14494
+ * `sidereon_core::astro::math::least_squares::hessian_trace`.
14495
+ * @param {Float64Array} jacobian
14496
+ * @param {number} m
14497
+ * @param {number} n
14498
+ * @returns {number}
14499
+ */
14500
+ export function hessianTrace(jacobian, m, n) {
14501
+ const ptr0 = passArrayF64ToWasm0(jacobian, wasm.__wbindgen_malloc);
14502
+ const len0 = WASM_VECTOR_LEN;
14503
+ const ret = wasm.hessianTrace(ptr0, len0, m, n);
14504
+ if (ret[2]) {
14505
+ throw takeFromExternrefTable0(ret[1]);
14506
+ }
14507
+ return ret[0];
14508
+ }
14509
+
13840
14510
  /**
13841
14511
  * Gauss angles-only orbit determination.
13842
14512
  *
@@ -14034,6 +14704,27 @@ export function j2000SecondsToCivil(seconds) {
14034
14704
  return CivilDateTime.__wrap(ret);
14035
14705
  }
14036
14706
 
14707
+ /**
14708
+ * Jarque-Bera normality test on a residual set.
14709
+ *
14710
+ * `x` is a `Float64Array` (at least two values). Returns
14711
+ * `{ statistic, pValue }` with `statistic = n/6 (S^2 + K^2/4)` (biased moments)
14712
+ * and the chi-square(2) survival `pValue = exp(-statistic/2)`, matching
14713
+ * `scipy.stats.jarque_bera`. Delegates to
14714
+ * `sidereon_core::quality::normality::jarque_bera`.
14715
+ * @param {Float64Array} x
14716
+ * @returns {any}
14717
+ */
14718
+ export function jarqueBera(x) {
14719
+ const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
14720
+ const len0 = WASM_VECTOR_LEN;
14721
+ const ret = wasm.jarqueBera(ptr0, len0);
14722
+ if (ret[2]) {
14723
+ throw takeFromExternrefTable0(ret[1]);
14724
+ }
14725
+ return takeFromExternrefTable0(ret[0]);
14726
+ }
14727
+
14037
14728
  /**
14038
14729
  * GPS broadcast Klobuchar ionospheric group delay in the model's native units
14039
14730
  * (positive metres).
@@ -14069,6 +14760,29 @@ export function klobucharDelay(alpha, beta, lat_deg, lon_deg, azimuth_deg, eleva
14069
14760
  return ret[0];
14070
14761
  }
14071
14762
 
14763
+ /**
14764
+ * Sample kurtosis of a residual set.
14765
+ *
14766
+ * `x` is a `Float64Array`. `fisher` (default `true`) returns the excess
14767
+ * kurtosis `m4 / m2^2 - 3` (Gaussian -> 0, `scipy.stats.kurtosis`); `false`
14768
+ * returns the Pearson kurtosis (Gaussian -> 3). `bias` (default `true`); pass
14769
+ * `false` for the sample correction (needs at least four values). Delegates to
14770
+ * `sidereon_core::quality::normality::kurtosis`.
14771
+ * @param {Float64Array} x
14772
+ * @param {boolean | null} [fisher]
14773
+ * @param {boolean | null} [bias]
14774
+ * @returns {number}
14775
+ */
14776
+ export function kurtosis(x, fisher, bias) {
14777
+ const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
14778
+ const len0 = WASM_VECTOR_LEN;
14779
+ const ret = wasm.kurtosis(ptr0, len0, isLikeNone(fisher) ? 0xFFFFFF : fisher ? 1 : 0, isLikeNone(bias) ? 0xFFFFFF : bias ? 1 : 0);
14780
+ if (ret[2]) {
14781
+ throw takeFromExternrefTable0(ret[1]);
14782
+ }
14783
+ return ret[0];
14784
+ }
14785
+
14072
14786
  /**
14073
14787
  * Resolve integer ambiguities with the LAMBDA method (RTKLIB `lambda()` port).
14074
14788
  *
@@ -14171,6 +14885,47 @@ export function leapSecondsBatch(dates) {
14171
14885
  return v2;
14172
14886
  }
14173
14887
 
14888
+ /**
14889
+ * Solve a generic data-driven least-squares problem.
14890
+ *
14891
+ * `request` is a `DataProblemInput` object: a `kind` (`"linear"`,
14892
+ * `"polynomial"`, `"exponential"`) carrying its data arrays, the `x0` starting
14893
+ * point, and the SciPy `least_squares` options. The whole trust-region
14894
+ * iteration runs in Rust through
14895
+ * `trust_region_least_squares::data::solve_data_problem` (the serial entry, the
14896
+ * default in-crate SVD backend); no rayon thread pool is entered.
14897
+ * @param {any} request
14898
+ * @returns {LeastSquaresResult}
14899
+ */
14900
+ export function leastSquares(request) {
14901
+ const ret = wasm.leastSquares(request);
14902
+ if (ret[2]) {
14903
+ throw takeFromExternrefTable0(ret[1]);
14904
+ }
14905
+ return LeastSquaresResult.__wrap(ret[0]);
14906
+ }
14907
+
14908
+ /**
14909
+ * Serial leave-one-out (jackknife) over a data-driven least-squares problem.
14910
+ *
14911
+ * Delegates to the core's serial leave-one-out entry
14912
+ * `trust_region_least_squares::batch::solve_data_problem_drop_one_serial`: the
14913
+ * full problem is solved once, then re-solved with each residual row masked in
14914
+ * turn. The core's default `solve_data_problem_drop_one` fans these re-solves
14915
+ * across a rayon pool that wasm has no threads for, so this binding takes the
14916
+ * serial twin, which runs the identical re-solves one row at a time and is
14917
+ * byte-identical to the parallel version.
14918
+ * @param {any} request
14919
+ * @returns {LeastSquaresDropOneReport}
14920
+ */
14921
+ export function leastSquaresDropOne(request) {
14922
+ const ret = wasm.leastSquaresDropOne(request);
14923
+ if (ret[2]) {
14924
+ throw takeFromExternrefTable0(ret[1]);
14925
+ }
14926
+ return LeastSquaresDropOneReport.__wrap(ret[0]);
14927
+ }
14928
+
14174
14929
  /**
14175
14930
  * Decode LNAV subframes 1-3 back into engineering-unit parameters.
14176
14931
  *
@@ -14482,6 +15237,29 @@ export function mergeSp3(sources, options) {
14482
15237
  return Sp3MergeResult.__wrap(ret[0]);
14483
15238
  }
14484
15239
 
15240
+ /**
15241
+ * Mean, variance, skewness, and excess kurtosis of a residual set in one pass.
15242
+ *
15243
+ * `x` is a `Float64Array`; `fisher` and `bias` select the kurtosis convention
15244
+ * and the bias correction exactly as in [`skewness`] / [`kurtosis`] (both
15245
+ * default `true`). Returns `{ mean, variance, skewness, kurtosisExcess }`; the
15246
+ * variance is the biased second central moment. Delegates to
15247
+ * `sidereon_core::quality::normality::moments`.
15248
+ * @param {Float64Array} x
15249
+ * @param {boolean | null} [fisher]
15250
+ * @param {boolean | null} [bias]
15251
+ * @returns {any}
15252
+ */
15253
+ export function moments(x, fisher, bias) {
15254
+ const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
15255
+ const len0 = WASM_VECTOR_LEN;
15256
+ const ret = wasm.moments(ptr0, len0, isLikeNone(fisher) ? 0xFFFFFF : fisher ? 1 : 0, isLikeNone(bias) ? 0xFFFFFF : bias ? 1 : 0);
15257
+ if (ret[2]) {
15258
+ throw takeFromExternrefTable0(ret[1]);
15259
+ }
15260
+ return takeFromExternrefTable0(ret[0]);
15261
+ }
15262
+
14485
15263
  /**
14486
15264
  * Angle in degrees between satellite nadir and the Moon direction.
14487
15265
  * @param {Float64Array} satellite_position_km
@@ -14502,6 +15280,64 @@ export function moonAngle(satellite_position_km, moon_position_km) {
14502
15280
  return v3;
14503
15281
  }
14504
15282
 
15283
+ /**
15284
+ * Topocentric azimuth/elevation/range of the Moon from a ground site,
15285
+ * including the diurnal parallax. See [`sunAzEl`] for the argument shapes.
15286
+ * Delegates to `sidereon_core::astro::bodies::moon_az_el`.
15287
+ * @param {number} latitude_deg
15288
+ * @param {number} longitude_deg
15289
+ * @param {number} altitude_km
15290
+ * @param {bigint} epoch_unix_us
15291
+ * @returns {any}
15292
+ */
15293
+ export function moonAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
15294
+ const ret = wasm.moonAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
15295
+ if (ret[2]) {
15296
+ throw takeFromExternrefTable0(ret[1]);
15297
+ }
15298
+ return takeFromExternrefTable0(ret[0]);
15299
+ }
15300
+
15301
+ /**
15302
+ * Topocentric geometric Moon (disk-center) elevation from a ground site,
15303
+ * degrees. See [`sunAzEl`] for the argument shapes. Delegates to
15304
+ * `sidereon_core::astro::bodies::moon_az_el` and returns its `elevationDeg`: the
15305
+ * core `moon_elevation_deg` convenience wrapper `expect`s on the geometry, so a
15306
+ * valid-shaped but out-of-range station (e.g. latitude 120) would panic the
15307
+ * wasm module; going through `moon_az_el` surfaces that as a thrown JS error.
15308
+ * @param {number} latitude_deg
15309
+ * @param {number} longitude_deg
15310
+ * @param {number} altitude_km
15311
+ * @param {bigint} epoch_unix_us
15312
+ * @returns {number}
15313
+ */
15314
+ export function moonElevationDeg(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
15315
+ const ret = wasm.moonElevationDeg(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
15316
+ if (ret[2]) {
15317
+ throw takeFromExternrefTable0(ret[1]);
15318
+ }
15319
+ return ret[0];
15320
+ }
15321
+
15322
+ /**
15323
+ * Illuminated fraction of the Moon as seen from a ground site. Returns
15324
+ * `{ illuminatedFraction, phaseAngleDeg }` (0 = new, 1 = full). See [`sunAzEl`]
15325
+ * for the argument shapes. Delegates to
15326
+ * `sidereon_core::astro::bodies::moon_illumination`.
15327
+ * @param {number} latitude_deg
15328
+ * @param {number} longitude_deg
15329
+ * @param {number} altitude_km
15330
+ * @param {bigint} epoch_unix_us
15331
+ * @returns {any}
15332
+ */
15333
+ export function moonIllumination(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
15334
+ const ret = wasm.moonIllumination(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
15335
+ if (ret[2]) {
15336
+ throw takeFromExternrefTable0(ret[1]);
15337
+ }
15338
+ return takeFromExternrefTable0(ret[0]);
15339
+ }
15340
+
14505
15341
  /**
14506
15342
  * Narrow-lane code combination, metres.
14507
15343
  * @param {number} p1_m
@@ -14594,6 +15430,36 @@ export function noiseAmplification(f1_hz, f2_hz) {
14594
15430
  return ret[0];
14595
15431
  }
14596
15432
 
15433
+ /**
15434
+ * Parameter covariance from a design (Jacobian) matrix via the Gauss-Newton
15435
+ * normal equations `varianceScale * (J^T J)^-1`, formed from the thin SVD of
15436
+ * `J` (not by inverting `J^T J`, so the condition number is not squared).
15437
+ *
15438
+ * `jacobian` is a flat row-major `(m, n)` `Float64Array` with `m >= n`;
15439
+ * `varianceScale` (`sigma^2`, non-negative) scales the bare cofactor (pass the
15440
+ * post-fit reduced chi-square for the fitted covariance, or `1.0` for
15441
+ * `(J^T J)^-1`). Returns the `n`-by-`n` covariance as a flat row-major
15442
+ * `Float64Array` of length `n * n`. Throws an `Error` for a rank-deficient
15443
+ * Jacobian. Delegates to
15444
+ * `sidereon_core::astro::math::least_squares::normal_covariance`.
15445
+ * @param {Float64Array} jacobian
15446
+ * @param {number} m
15447
+ * @param {number} n
15448
+ * @param {number} variance_scale
15449
+ * @returns {Float64Array}
15450
+ */
15451
+ export function normalCovariance(jacobian, m, n, variance_scale) {
15452
+ const ptr0 = passArrayF64ToWasm0(jacobian, wasm.__wbindgen_malloc);
15453
+ const len0 = WASM_VECTOR_LEN;
15454
+ const ret = wasm.normalCovariance(ptr0, len0, m, n, variance_scale);
15455
+ if (ret[3]) {
15456
+ throw takeFromExternrefTable0(ret[2]);
15457
+ }
15458
+ var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
15459
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
15460
+ return v2;
15461
+ }
15462
+
14597
15463
  /**
14598
15464
  * Predict observables for one satellite from a broadcast ephemeris store.
14599
15465
  * Delegates to `sidereon_core::observables::predict`.
@@ -15101,6 +15967,65 @@ export function pppCorrections(sp3, epochs, receiver_ecef_m, options) {
15101
15967
  return takeFromExternrefTable0(ret[0]);
15102
15968
  }
15103
15969
 
15970
+ /**
15971
+ * Predict observables for many `(satellite, receiver, epoch)` requests from a
15972
+ * broadcast ephemeris store, serially. See [`predictBatchSp3`] for the argument
15973
+ * shapes. Delegates to the serial `sidereon_core::observables::predict_batch`.
15974
+ * @param {BroadcastEphemeris} broadcast
15975
+ * @param {string[]} satellites
15976
+ * @param {Float64Array} receivers_ecef_m
15977
+ * @param {Float64Array} epochs_j2000_s
15978
+ * @param {any} options
15979
+ * @returns {PredictBatch}
15980
+ */
15981
+ export function predictBatchBroadcast(broadcast, satellites, receivers_ecef_m, epochs_j2000_s, options) {
15982
+ _assertClass(broadcast, BroadcastEphemeris);
15983
+ const ptr0 = passArrayJsValueToWasm0(satellites, wasm.__wbindgen_malloc);
15984
+ const len0 = WASM_VECTOR_LEN;
15985
+ const ptr1 = passArrayF64ToWasm0(receivers_ecef_m, wasm.__wbindgen_malloc);
15986
+ const len1 = WASM_VECTOR_LEN;
15987
+ const ptr2 = passArrayF64ToWasm0(epochs_j2000_s, wasm.__wbindgen_malloc);
15988
+ const len2 = WASM_VECTOR_LEN;
15989
+ const ret = wasm.predictBatchBroadcast(broadcast.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, options);
15990
+ if (ret[2]) {
15991
+ throw takeFromExternrefTable0(ret[1]);
15992
+ }
15993
+ return PredictBatch.__wrap(ret[0]);
15994
+ }
15995
+
15996
+ /**
15997
+ * Predict observables for many `(satellite, receiver, epoch)` requests from an
15998
+ * SP3 precise product, serially.
15999
+ *
16000
+ * `satellites` is an array of satellite tokens, `receiversEcefM` a flat
16001
+ * row-major `(n, 3)` `Float64Array` of receiver ECEF positions (metres), and
16002
+ * `epochsJ2000S` a `Float64Array` of receive epochs (seconds since J2000); all
16003
+ * three are index-aligned and length `n`. Element `i` of the result corresponds
16004
+ * to request `i`. Delegates to the serial reference kernel
16005
+ * `sidereon_core::observables::predict_batch`; the binding never spawns the
16006
+ * rayon thread pool the parallel variant uses.
16007
+ * @param {Sp3} sp3
16008
+ * @param {string[]} satellites
16009
+ * @param {Float64Array} receivers_ecef_m
16010
+ * @param {Float64Array} epochs_j2000_s
16011
+ * @param {any} options
16012
+ * @returns {PredictBatch}
16013
+ */
16014
+ export function predictBatchSp3(sp3, satellites, receivers_ecef_m, epochs_j2000_s, options) {
16015
+ _assertClass(sp3, Sp3);
16016
+ const ptr0 = passArrayJsValueToWasm0(satellites, wasm.__wbindgen_malloc);
16017
+ const len0 = WASM_VECTOR_LEN;
16018
+ const ptr1 = passArrayF64ToWasm0(receivers_ecef_m, wasm.__wbindgen_malloc);
16019
+ const len1 = WASM_VECTOR_LEN;
16020
+ const ptr2 = passArrayF64ToWasm0(epochs_j2000_s, wasm.__wbindgen_malloc);
16021
+ const len2 = WASM_VECTOR_LEN;
16022
+ const ret = wasm.predictBatchSp3(sp3.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, options);
16023
+ if (ret[2]) {
16024
+ throw takeFromExternrefTable0(ret[1]);
16025
+ }
16026
+ return PredictBatch.__wrap(ret[0]);
16027
+ }
16028
+
15104
16029
  /**
15105
16030
  * Prepare ionosphere-free single-frequency RTK arc inputs from a
15106
16031
  * dual-frequency arc and fixed wide-lane ambiguities.
@@ -15542,6 +16467,26 @@ export function shadowFraction(satellite_position_km, sun_position_km) {
15542
16467
  return v3;
15543
16468
  }
15544
16469
 
16470
+ /**
16471
+ * Shapiro-Wilk normality test on a residual set.
16472
+ *
16473
+ * `x` is a `Float64Array` (at least three values). Returns `{ w, pValue }`,
16474
+ * Royston's AS R94 port that `scipy.stats.shapiro` uses; `w` is in `(0, 1]`
16475
+ * (closer to one is more Gaussian). Delegates to
16476
+ * `sidereon_core::quality::normality::shapiro_wilk`.
16477
+ * @param {Float64Array} x
16478
+ * @returns {any}
16479
+ */
16480
+ export function shapiroWilk(x) {
16481
+ const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
16482
+ const len0 = WASM_VECTOR_LEN;
16483
+ const ret = wasm.shapiroWilk(ptr0, len0);
16484
+ if (ret[2]) {
16485
+ throw takeFromExternrefTable0(ret[1]);
16486
+ }
16487
+ return takeFromExternrefTable0(ret[0]);
16488
+ }
16489
+
15545
16490
  /**
15546
16491
  * Build satellite-keyed pseudorange sigmas in metres from `{ satelliteId,
15547
16492
  * elevationDeg, cn0Dbhz? }` entries. Invalid entries are dropped by the core.
@@ -15557,6 +16502,27 @@ export function sigmas(entries, options) {
15557
16502
  return SatelliteVector.__wrap(ret[0]);
15558
16503
  }
15559
16504
 
16505
+ /**
16506
+ * Sample skewness of a residual set.
16507
+ *
16508
+ * `x` is a `Float64Array`. `bias` (default `true`) selects the Fisher-Pearson
16509
+ * coefficient `g1 = m3 / m2^(3/2)` (`scipy.stats.skew`); `false` applies the
16510
+ * sample correction (`scipy.stats.skew(bias=False)`, needs at least three
16511
+ * values). Delegates to `sidereon_core::quality::normality::skewness`.
16512
+ * @param {Float64Array} x
16513
+ * @param {boolean | null} [bias]
16514
+ * @returns {number}
16515
+ */
16516
+ export function skewness(x, bias) {
16517
+ const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
16518
+ const len0 = WASM_VECTOR_LEN;
16519
+ const ret = wasm.skewness(ptr0, len0, isLikeNone(bias) ? 0xFFFFFF : bias ? 1 : 0);
16520
+ if (ret[2]) {
16521
+ throw takeFromExternrefTable0(ret[1]);
16522
+ }
16523
+ return ret[0];
16524
+ }
16525
+
15560
16526
  /**
15561
16527
  * Stable lower-case label for a slip reason.
15562
16528
  * @param {SlipReason} reason
@@ -16019,6 +16985,27 @@ export function sunAngle(satellite_position_km, sun_position_km) {
16019
16985
  return v3;
16020
16986
  }
16021
16987
 
16988
+ /**
16989
+ * Topocentric azimuth/elevation/range of the Sun from a ground site.
16990
+ *
16991
+ * The station is geodetic (`latitudeDeg`, `longitudeDeg`, `altitudeKm`);
16992
+ * `epochUnixUs` is the UTC instant as unix microseconds. Returns
16993
+ * `{ azimuthDeg, elevationDeg, rangeKm }` (azimuth clockwise from north).
16994
+ * Delegates to `sidereon_core::astro::bodies::sun_az_el`.
16995
+ * @param {number} latitude_deg
16996
+ * @param {number} longitude_deg
16997
+ * @param {number} altitude_km
16998
+ * @param {bigint} epoch_unix_us
16999
+ * @returns {any}
17000
+ */
17001
+ export function sunAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
17002
+ const ret = wasm.sunAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
17003
+ if (ret[2]) {
17004
+ throw takeFromExternrefTable0(ret[1]);
17005
+ }
17006
+ return takeFromExternrefTable0(ret[0]);
17007
+ }
17008
+
16022
17009
  /**
16023
17010
  * Sun elevation in degrees above the satellite local horizontal plane.
16024
17011
  * @param {Float64Array} satellite_position_km
@@ -16071,6 +17058,22 @@ export function sunMoonEci(epochs_unix_us) {
16071
17058
  return SunMoon.__wrap(ret[0]);
16072
17059
  }
16073
17060
 
17061
+ /**
17062
+ * TAI-UTC (cumulative leap seconds) in effect on a UTC calendar date.
17063
+ *
17064
+ * This is **not** the GNSS "GPS - UTC" offset; for the quantity a GPS receiver
17065
+ * applies use [`gpsUtcOffsetS`] (they differ by a constant 19 s). Delegates to
17066
+ * `sidereon_core::astro::time::scales::tai_utc_offset_s`.
17067
+ * @param {number} year
17068
+ * @param {number} month
17069
+ * @param {number} day
17070
+ * @returns {number}
17071
+ */
17072
+ export function taiUtcOffsetS(year, month, day) {
17073
+ const ret = wasm.taiUtcOffsetS(year, month, day);
17074
+ return ret;
17075
+ }
17076
+
16074
17077
  /**
16075
17078
  * Transform a batch of TEME states to GCRS, each at its own epoch.
16076
17079
  *
@@ -16163,8 +17166,8 @@ export function timescaleOffsetAtS(from, to, utc_jd) {
16163
17166
  *
16164
17167
  * Covers the atomic scales (TAI/TT/GPST/GST/QZSST/BDT), whose mutual offsets
16165
17168
  * are constants fixed by their ICDs. Throws a `RangeError` when either scale is
16166
- * UTC-based (`Utc`/`Glonasst`) those carry leap seconds, so their offset is
16167
- * epoch-dependent and needs [`timescaleOffsetAtS`] or for `Tdb` (no fixed
17169
+ * UTC-based (`Utc`/`Glonasst`): those carry leap seconds, so their offset is
17170
+ * epoch-dependent and needs [`timescaleOffsetAtS`], or for `Tdb` (no fixed
16168
17171
  * offset; resolve it through an `Instant`).
16169
17172
  * @param {TimeScale} from
16170
17173
  * @param {TimeScale} to
@@ -16651,6 +17654,14 @@ function __wbg_get_imports() {
16651
17654
  const ret = LookAngles.__wrap(arg0);
16652
17655
  return ret;
16653
17656
  },
17657
+ __wbg_moonelevationcrossing_new: function(arg0) {
17658
+ const ret = MoonElevationCrossing.__wrap(arg0);
17659
+ return ret;
17660
+ },
17661
+ __wbg_moontransit_new: function(arg0) {
17662
+ const ret = MoonTransit.__wrap(arg0);
17663
+ return ret;
17664
+ },
16654
17665
  __wbg_movingbaselinesolution_new: function(arg0) {
16655
17666
  const ret = MovingBaselineSolution.__wrap(arg0);
16656
17667
  return ret;
@@ -16935,6 +17946,9 @@ const EncounterFrameFinalization = (typeof FinalizationRegistry === 'undefined')
16935
17946
  const EphemerisFinalization = (typeof FinalizationRegistry === 'undefined')
16936
17947
  ? { register: () => {}, unregister: () => {} }
16937
17948
  : new FinalizationRegistry(ptr => wasm.__wbg_ephemeris_free(ptr, 1));
17949
+ const ErrorEllipse2Finalization = (typeof FinalizationRegistry === 'undefined')
17950
+ ? { register: () => {}, unregister: () => {} }
17951
+ : new FinalizationRegistry(ptr => wasm.__wbg_errorellipse2_free(ptr, 1));
16938
17952
  const FdeSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
16939
17953
  ? { register: () => {}, unregister: () => {} }
16940
17954
  : new FinalizationRegistry(ptr => wasm.__wbg_fdesolution_free(ptr, 1));
@@ -17013,6 +18027,12 @@ const LambertTransferFinalization = (typeof FinalizationRegistry === 'undefined'
17013
18027
  const LeapSecondTableFinalization = (typeof FinalizationRegistry === 'undefined')
17014
18028
  ? { register: () => {}, unregister: () => {} }
17015
18029
  : new FinalizationRegistry(ptr => wasm.__wbg_leapsecondtable_free(ptr, 1));
18030
+ const LeastSquaresDropOneReportFinalization = (typeof FinalizationRegistry === 'undefined')
18031
+ ? { register: () => {}, unregister: () => {} }
18032
+ : new FinalizationRegistry(ptr => wasm.__wbg_leastsquaresdroponereport_free(ptr, 1));
18033
+ const LeastSquaresResultFinalization = (typeof FinalizationRegistry === 'undefined')
18034
+ ? { register: () => {}, unregister: () => {} }
18035
+ : new FinalizationRegistry(ptr => wasm.__wbg_leastsquaresresult_free(ptr, 1));
17016
18036
  const LinkBudgetFinalization = (typeof FinalizationRegistry === 'undefined')
17017
18037
  ? { register: () => {}, unregister: () => {} }
17018
18038
  : new FinalizationRegistry(ptr => wasm.__wbg_linkbudget_free(ptr, 1));
@@ -17028,6 +18048,12 @@ const LookAnglesFinalization = (typeof FinalizationRegistry === 'undefined')
17028
18048
  const MappingFactorsFinalization = (typeof FinalizationRegistry === 'undefined')
17029
18049
  ? { register: () => {}, unregister: () => {} }
17030
18050
  : new FinalizationRegistry(ptr => wasm.__wbg_mappingfactors_free(ptr, 1));
18051
+ const MoonElevationCrossingFinalization = (typeof FinalizationRegistry === 'undefined')
18052
+ ? { register: () => {}, unregister: () => {} }
18053
+ : new FinalizationRegistry(ptr => wasm.__wbg_moonelevationcrossing_free(ptr, 1));
18054
+ const MoonTransitFinalization = (typeof FinalizationRegistry === 'undefined')
18055
+ ? { register: () => {}, unregister: () => {} }
18056
+ : new FinalizationRegistry(ptr => wasm.__wbg_moontransit_free(ptr, 1));
17031
18057
  const MovingBaselineSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
17032
18058
  ? { register: () => {}, unregister: () => {} }
17033
18059
  : new FinalizationRegistry(ptr => wasm.__wbg_movingbaselinesolution_free(ptr, 1));
@@ -17109,6 +18135,9 @@ const PppFixedSolutionFinalization = (typeof FinalizationRegistry === 'undefined
17109
18135
  const PppFloatSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
17110
18136
  ? { register: () => {}, unregister: () => {} }
17111
18137
  : new FinalizationRegistry(ptr => wasm.__wbg_pppfloatsolution_free(ptr, 1));
18138
+ const PredictBatchFinalization = (typeof FinalizationRegistry === 'undefined')
18139
+ ? { register: () => {}, unregister: () => {} }
18140
+ : new FinalizationRegistry(ptr => wasm.__wbg_predictbatch_free(ptr, 1));
17112
18141
  const PredictedObservablesFinalization = (typeof FinalizationRegistry === 'undefined')
17113
18142
  ? { register: () => {}, unregister: () => {} }
17114
18143
  : new FinalizationRegistry(ptr => wasm.__wbg_predictedobservables_free(ptr, 1));