@neilberkman/sidereon 0.9.0 → 0.9.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.
- package/README.md +91 -100
- package/package.json +1 -1
- package/pkg/sidereon.d.ts +1479 -892
- package/pkg/sidereon.js +1156 -9
- package/pkg/sidereon_bg.wasm +0 -0
- package/pkg/sidereon_bg.wasm.d.ts +933 -865
- package/pkg-node/sidereon.d.ts +521 -2
- package/pkg-node/sidereon.js +1190 -9
- package/pkg-node/sidereon_bg.wasm +0 -0
- package/pkg-node/sidereon_bg.wasm.d.ts +933 -865
package/pkg-node/sidereon.js
CHANGED
|
@@ -3317,6 +3317,72 @@ class Ephemeris {
|
|
|
3317
3317
|
if (Symbol.dispose) Ephemeris.prototype[Symbol.dispose] = Ephemeris.prototype.free;
|
|
3318
3318
|
exports.Ephemeris = Ephemeris;
|
|
3319
3319
|
|
|
3320
|
+
/**
|
|
3321
|
+
* A confidence ellipse from a 2x2 covariance block: semi-axes scaled by the
|
|
3322
|
+
* two-degree-of-freedom chi-square quantile `-2 ln(1 - confidence)`.
|
|
3323
|
+
*/
|
|
3324
|
+
class ErrorEllipse2 {
|
|
3325
|
+
static __wrap(ptr) {
|
|
3326
|
+
const obj = Object.create(ErrorEllipse2.prototype);
|
|
3327
|
+
obj.__wbg_ptr = ptr;
|
|
3328
|
+
ErrorEllipse2Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
3329
|
+
return obj;
|
|
3330
|
+
}
|
|
3331
|
+
__destroy_into_raw() {
|
|
3332
|
+
const ptr = this.__wbg_ptr;
|
|
3333
|
+
this.__wbg_ptr = 0;
|
|
3334
|
+
ErrorEllipse2Finalization.unregister(this);
|
|
3335
|
+
return ptr;
|
|
3336
|
+
}
|
|
3337
|
+
free() {
|
|
3338
|
+
const ptr = this.__destroy_into_raw();
|
|
3339
|
+
wasm.__wbg_errorellipse2_free(ptr, 0);
|
|
3340
|
+
}
|
|
3341
|
+
/**
|
|
3342
|
+
* Two-degree-of-freedom chi-square scale `-2 ln(1 - confidence)`.
|
|
3343
|
+
* @returns {number}
|
|
3344
|
+
*/
|
|
3345
|
+
get chiSquareScale() {
|
|
3346
|
+
const ret = wasm.errorellipse2_chiSquareScale(this.__wbg_ptr);
|
|
3347
|
+
return ret;
|
|
3348
|
+
}
|
|
3349
|
+
/**
|
|
3350
|
+
* Requested confidence probability in `(0, 1)`.
|
|
3351
|
+
* @returns {number}
|
|
3352
|
+
*/
|
|
3353
|
+
get confidence() {
|
|
3354
|
+
const ret = wasm.errorellipse2_confidence(this.__wbg_ptr);
|
|
3355
|
+
return ret;
|
|
3356
|
+
}
|
|
3357
|
+
/**
|
|
3358
|
+
* Semi-major-axis orientation in radians, from the first (row/col 0) axis
|
|
3359
|
+
* toward the second (row/col 1) axis.
|
|
3360
|
+
* @returns {number}
|
|
3361
|
+
*/
|
|
3362
|
+
get orientationRad() {
|
|
3363
|
+
const ret = wasm.errorellipse2_orientationRad(this.__wbg_ptr);
|
|
3364
|
+
return ret;
|
|
3365
|
+
}
|
|
3366
|
+
/**
|
|
3367
|
+
* Semi-major axis length (same unit as the square root of the covariance).
|
|
3368
|
+
* @returns {number}
|
|
3369
|
+
*/
|
|
3370
|
+
get semiMajor() {
|
|
3371
|
+
const ret = wasm.errorellipse2_semiMajor(this.__wbg_ptr);
|
|
3372
|
+
return ret;
|
|
3373
|
+
}
|
|
3374
|
+
/**
|
|
3375
|
+
* Semi-minor axis length.
|
|
3376
|
+
* @returns {number}
|
|
3377
|
+
*/
|
|
3378
|
+
get semiMinor() {
|
|
3379
|
+
const ret = wasm.errorellipse2_semiMinor(this.__wbg_ptr);
|
|
3380
|
+
return ret;
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
if (Symbol.dispose) ErrorEllipse2.prototype[Symbol.dispose] = ErrorEllipse2.prototype.free;
|
|
3384
|
+
exports.ErrorEllipse2 = ErrorEllipse2;
|
|
3385
|
+
|
|
3320
3386
|
/**
|
|
3321
3387
|
* A fault-detection-and-exclusion result: the surviving solution, the excluded
|
|
3322
3388
|
* satellites in exclusion order, and the number of exclusions performed.
|
|
@@ -5324,6 +5390,203 @@ class LeapSecondTable {
|
|
|
5324
5390
|
if (Symbol.dispose) LeapSecondTable.prototype[Symbol.dispose] = LeapSecondTable.prototype.free;
|
|
5325
5391
|
exports.LeapSecondTable = LeapSecondTable;
|
|
5326
5392
|
|
|
5393
|
+
/**
|
|
5394
|
+
* A serial leave-one-out sweep: the base solve over all rows plus one re-solve
|
|
5395
|
+
* per masked row, with the per-row optimum-cost shift.
|
|
5396
|
+
*/
|
|
5397
|
+
class LeastSquaresDropOneReport {
|
|
5398
|
+
static __wrap(ptr) {
|
|
5399
|
+
const obj = Object.create(LeastSquaresDropOneReport.prototype);
|
|
5400
|
+
obj.__wbg_ptr = ptr;
|
|
5401
|
+
LeastSquaresDropOneReportFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
5402
|
+
return obj;
|
|
5403
|
+
}
|
|
5404
|
+
__destroy_into_raw() {
|
|
5405
|
+
const ptr = this.__wbg_ptr;
|
|
5406
|
+
this.__wbg_ptr = 0;
|
|
5407
|
+
LeastSquaresDropOneReportFinalization.unregister(this);
|
|
5408
|
+
return ptr;
|
|
5409
|
+
}
|
|
5410
|
+
free() {
|
|
5411
|
+
const ptr = this.__destroy_into_raw();
|
|
5412
|
+
wasm.__wbg_leastsquaresdroponereport_free(ptr, 0);
|
|
5413
|
+
}
|
|
5414
|
+
/**
|
|
5415
|
+
* The solve over the full residual.
|
|
5416
|
+
* @returns {LeastSquaresResult}
|
|
5417
|
+
*/
|
|
5418
|
+
get base() {
|
|
5419
|
+
const ret = wasm.leastsquaresdroponereport_base(this.__wbg_ptr);
|
|
5420
|
+
return LeastSquaresResult.__wrap(ret);
|
|
5421
|
+
}
|
|
5422
|
+
/**
|
|
5423
|
+
* `costDeltas[i] = dropAt(i).cost - base.cost`: how much the optimum cost
|
|
5424
|
+
* moves when row `i` is removed. `Float64Array` of length `count`.
|
|
5425
|
+
* @returns {Float64Array}
|
|
5426
|
+
*/
|
|
5427
|
+
get costDeltas() {
|
|
5428
|
+
const ret = wasm.leastsquaresdroponereport_costDeltas(this.__wbg_ptr);
|
|
5429
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5430
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5431
|
+
return v1;
|
|
5432
|
+
}
|
|
5433
|
+
/**
|
|
5434
|
+
* Number of masked-row re-solves (equals the residual-row count `m`).
|
|
5435
|
+
* @returns {number}
|
|
5436
|
+
*/
|
|
5437
|
+
get count() {
|
|
5438
|
+
const ret = wasm.leastsquaresdroponereport_count(this.__wbg_ptr);
|
|
5439
|
+
return ret >>> 0;
|
|
5440
|
+
}
|
|
5441
|
+
/**
|
|
5442
|
+
* The solve with residual row `index` masked out. Throws a `RangeError` for
|
|
5443
|
+
* an out-of-range index.
|
|
5444
|
+
* @param {number} index
|
|
5445
|
+
* @returns {LeastSquaresResult}
|
|
5446
|
+
*/
|
|
5447
|
+
dropAt(index) {
|
|
5448
|
+
const ret = wasm.leastsquaresdroponereport_dropAt(this.__wbg_ptr, index);
|
|
5449
|
+
if (ret[2]) {
|
|
5450
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5451
|
+
}
|
|
5452
|
+
return LeastSquaresResult.__wrap(ret[0]);
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
if (Symbol.dispose) LeastSquaresDropOneReport.prototype[Symbol.dispose] = LeastSquaresDropOneReport.prototype.free;
|
|
5456
|
+
exports.LeastSquaresDropOneReport = LeastSquaresDropOneReport;
|
|
5457
|
+
|
|
5458
|
+
/**
|
|
5459
|
+
* The outcome of one trust-region least-squares solve, mirroring the fields of
|
|
5460
|
+
* `scipy.optimize.least_squares`'s `OptimizeResult`.
|
|
5461
|
+
*/
|
|
5462
|
+
class LeastSquaresResult {
|
|
5463
|
+
static __wrap(ptr) {
|
|
5464
|
+
const obj = Object.create(LeastSquaresResult.prototype);
|
|
5465
|
+
obj.__wbg_ptr = ptr;
|
|
5466
|
+
LeastSquaresResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
5467
|
+
return obj;
|
|
5468
|
+
}
|
|
5469
|
+
__destroy_into_raw() {
|
|
5470
|
+
const ptr = this.__wbg_ptr;
|
|
5471
|
+
this.__wbg_ptr = 0;
|
|
5472
|
+
LeastSquaresResultFinalization.unregister(this);
|
|
5473
|
+
return ptr;
|
|
5474
|
+
}
|
|
5475
|
+
free() {
|
|
5476
|
+
const ptr = this.__destroy_into_raw();
|
|
5477
|
+
wasm.__wbg_leastsquaresresult_free(ptr, 0);
|
|
5478
|
+
}
|
|
5479
|
+
/**
|
|
5480
|
+
* Optimal cost `0.5 * sum(residual^2)` (after robust reweighting when a
|
|
5481
|
+
* non-linear loss is used).
|
|
5482
|
+
* @returns {number}
|
|
5483
|
+
*/
|
|
5484
|
+
get cost() {
|
|
5485
|
+
const ret = wasm.leastsquaresresult_cost(this.__wbg_ptr);
|
|
5486
|
+
return ret;
|
|
5487
|
+
}
|
|
5488
|
+
/**
|
|
5489
|
+
* Residual vector at the solution, `Float64Array` of length `m`.
|
|
5490
|
+
* @returns {Float64Array}
|
|
5491
|
+
*/
|
|
5492
|
+
get fun() {
|
|
5493
|
+
const ret = wasm.leastsquaresresult_fun(this.__wbg_ptr);
|
|
5494
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5495
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5496
|
+
return v1;
|
|
5497
|
+
}
|
|
5498
|
+
/**
|
|
5499
|
+
* Gradient `J^T f` at the solution, `Float64Array` of length `n`.
|
|
5500
|
+
* @returns {Float64Array}
|
|
5501
|
+
*/
|
|
5502
|
+
get grad() {
|
|
5503
|
+
const ret = wasm.leastsquaresresult_grad(this.__wbg_ptr);
|
|
5504
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5505
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5506
|
+
return v1;
|
|
5507
|
+
}
|
|
5508
|
+
/**
|
|
5509
|
+
* Row-major `m`-by-`n` Jacobian at the solution, flat `Float64Array` of
|
|
5510
|
+
* length `m * n`.
|
|
5511
|
+
* @returns {Float64Array}
|
|
5512
|
+
*/
|
|
5513
|
+
get jac() {
|
|
5514
|
+
const ret = wasm.leastsquaresresult_jac(this.__wbg_ptr);
|
|
5515
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5516
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5517
|
+
return v1;
|
|
5518
|
+
}
|
|
5519
|
+
/**
|
|
5520
|
+
* Residual row count `m`.
|
|
5521
|
+
* @returns {number}
|
|
5522
|
+
*/
|
|
5523
|
+
get m() {
|
|
5524
|
+
const ret = wasm.leastsquaresresult_m(this.__wbg_ptr);
|
|
5525
|
+
return ret >>> 0;
|
|
5526
|
+
}
|
|
5527
|
+
/**
|
|
5528
|
+
* Parameter count `n`.
|
|
5529
|
+
* @returns {number}
|
|
5530
|
+
*/
|
|
5531
|
+
get n() {
|
|
5532
|
+
const ret = wasm.leastsquaresresult_n(this.__wbg_ptr);
|
|
5533
|
+
return ret >>> 0;
|
|
5534
|
+
}
|
|
5535
|
+
/**
|
|
5536
|
+
* Number of residual evaluations.
|
|
5537
|
+
* @returns {number}
|
|
5538
|
+
*/
|
|
5539
|
+
get nfev() {
|
|
5540
|
+
const ret = wasm.leastsquaresresult_nfev(this.__wbg_ptr);
|
|
5541
|
+
return ret >>> 0;
|
|
5542
|
+
}
|
|
5543
|
+
/**
|
|
5544
|
+
* Number of Jacobian evaluations.
|
|
5545
|
+
* @returns {number}
|
|
5546
|
+
*/
|
|
5547
|
+
get njev() {
|
|
5548
|
+
const ret = wasm.leastsquaresresult_njev(this.__wbg_ptr);
|
|
5549
|
+
return ret >>> 0;
|
|
5550
|
+
}
|
|
5551
|
+
/**
|
|
5552
|
+
* First-order optimality `||J^T f||_inf` at the solution.
|
|
5553
|
+
* @returns {number}
|
|
5554
|
+
*/
|
|
5555
|
+
get optimality() {
|
|
5556
|
+
const ret = wasm.leastsquaresresult_optimality(this.__wbg_ptr);
|
|
5557
|
+
return ret;
|
|
5558
|
+
}
|
|
5559
|
+
/**
|
|
5560
|
+
* SciPy-compatible termination status: `0` max evaluations, `1` gtol,
|
|
5561
|
+
* `2` ftol, `3` xtol, `4` both ftol and xtol.
|
|
5562
|
+
* @returns {number}
|
|
5563
|
+
*/
|
|
5564
|
+
get status() {
|
|
5565
|
+
const ret = wasm.leastsquaresresult_status(this.__wbg_ptr);
|
|
5566
|
+
return ret;
|
|
5567
|
+
}
|
|
5568
|
+
/**
|
|
5569
|
+
* Whether the solve converged (`status > 0`).
|
|
5570
|
+
* @returns {boolean}
|
|
5571
|
+
*/
|
|
5572
|
+
get success() {
|
|
5573
|
+
const ret = wasm.leastsquaresresult_success(this.__wbg_ptr);
|
|
5574
|
+
return ret !== 0;
|
|
5575
|
+
}
|
|
5576
|
+
/**
|
|
5577
|
+
* Solution parameter vector, `Float64Array` of length `n`.
|
|
5578
|
+
* @returns {Float64Array}
|
|
5579
|
+
*/
|
|
5580
|
+
get x() {
|
|
5581
|
+
const ret = wasm.leastsquaresresult_x(this.__wbg_ptr);
|
|
5582
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5583
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5584
|
+
return v1;
|
|
5585
|
+
}
|
|
5586
|
+
}
|
|
5587
|
+
if (Symbol.dispose) LeastSquaresResult.prototype[Symbol.dispose] = LeastSquaresResult.prototype.free;
|
|
5588
|
+
exports.LeastSquaresResult = LeastSquaresResult;
|
|
5589
|
+
|
|
5327
5590
|
/**
|
|
5328
5591
|
* Link-budget inputs for [`LinkBudget.margin`].
|
|
5329
5592
|
*/
|
|
@@ -5826,6 +6089,119 @@ class MappingFactors {
|
|
|
5826
6089
|
if (Symbol.dispose) MappingFactors.prototype[Symbol.dispose] = MappingFactors.prototype.free;
|
|
5827
6090
|
exports.MappingFactors = MappingFactors;
|
|
5828
6091
|
|
|
6092
|
+
/**
|
|
6093
|
+
* One refined Moon elevation threshold crossing (moonrise / moonset).
|
|
6094
|
+
*/
|
|
6095
|
+
class MoonElevationCrossing {
|
|
6096
|
+
static __wrap(ptr) {
|
|
6097
|
+
const obj = Object.create(MoonElevationCrossing.prototype);
|
|
6098
|
+
obj.__wbg_ptr = ptr;
|
|
6099
|
+
MoonElevationCrossingFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
6100
|
+
return obj;
|
|
6101
|
+
}
|
|
6102
|
+
__destroy_into_raw() {
|
|
6103
|
+
const ptr = this.__wbg_ptr;
|
|
6104
|
+
this.__wbg_ptr = 0;
|
|
6105
|
+
MoonElevationCrossingFinalization.unregister(this);
|
|
6106
|
+
return ptr;
|
|
6107
|
+
}
|
|
6108
|
+
free() {
|
|
6109
|
+
const ptr = this.__destroy_into_raw();
|
|
6110
|
+
wasm.__wbg_moonelevationcrossing_free(ptr, 0);
|
|
6111
|
+
}
|
|
6112
|
+
/**
|
|
6113
|
+
* Topocentric Moon elevation at the refined instant, degrees.
|
|
6114
|
+
* @returns {number}
|
|
6115
|
+
*/
|
|
6116
|
+
get elevationDeg() {
|
|
6117
|
+
const ret = wasm.moonelevationcrossing_elevationDeg(this.__wbg_ptr);
|
|
6118
|
+
return ret;
|
|
6119
|
+
}
|
|
6120
|
+
/**
|
|
6121
|
+
* Crossing direction: `"rising"` (moonrise) or `"setting"` (moonset).
|
|
6122
|
+
* @returns {string}
|
|
6123
|
+
*/
|
|
6124
|
+
get kind() {
|
|
6125
|
+
let deferred1_0;
|
|
6126
|
+
let deferred1_1;
|
|
6127
|
+
try {
|
|
6128
|
+
const ret = wasm.moonelevationcrossing_kind(this.__wbg_ptr);
|
|
6129
|
+
deferred1_0 = ret[0];
|
|
6130
|
+
deferred1_1 = ret[1];
|
|
6131
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
6132
|
+
} finally {
|
|
6133
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
6134
|
+
}
|
|
6135
|
+
}
|
|
6136
|
+
/**
|
|
6137
|
+
* Refined crossing instant, unix microseconds.
|
|
6138
|
+
* @returns {bigint}
|
|
6139
|
+
*/
|
|
6140
|
+
get timeUnixUs() {
|
|
6141
|
+
const ret = wasm.moonelevationcrossing_timeUnixUs(this.__wbg_ptr);
|
|
6142
|
+
return ret;
|
|
6143
|
+
}
|
|
6144
|
+
}
|
|
6145
|
+
if (Symbol.dispose) MoonElevationCrossing.prototype[Symbol.dispose] = MoonElevationCrossing.prototype.free;
|
|
6146
|
+
exports.MoonElevationCrossing = MoonElevationCrossing;
|
|
6147
|
+
|
|
6148
|
+
/**
|
|
6149
|
+
* One refined Moon meridian transit (culmination).
|
|
6150
|
+
*/
|
|
6151
|
+
class MoonTransit {
|
|
6152
|
+
static __wrap(ptr) {
|
|
6153
|
+
const obj = Object.create(MoonTransit.prototype);
|
|
6154
|
+
obj.__wbg_ptr = ptr;
|
|
6155
|
+
MoonTransitFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
6156
|
+
return obj;
|
|
6157
|
+
}
|
|
6158
|
+
__destroy_into_raw() {
|
|
6159
|
+
const ptr = this.__wbg_ptr;
|
|
6160
|
+
this.__wbg_ptr = 0;
|
|
6161
|
+
MoonTransitFinalization.unregister(this);
|
|
6162
|
+
return ptr;
|
|
6163
|
+
}
|
|
6164
|
+
free() {
|
|
6165
|
+
const ptr = this.__destroy_into_raw();
|
|
6166
|
+
wasm.__wbg_moontransit_free(ptr, 0);
|
|
6167
|
+
}
|
|
6168
|
+
/**
|
|
6169
|
+
* Topocentric Moon elevation at the refined instant, degrees.
|
|
6170
|
+
* @returns {number}
|
|
6171
|
+
*/
|
|
6172
|
+
get elevationDeg() {
|
|
6173
|
+
const ret = wasm.moontransit_elevationDeg(this.__wbg_ptr);
|
|
6174
|
+
return ret;
|
|
6175
|
+
}
|
|
6176
|
+
/**
|
|
6177
|
+
* Culmination kind: `"upper"` (due south, highest) or `"lower"` (due north,
|
|
6178
|
+
* lowest).
|
|
6179
|
+
* @returns {string}
|
|
6180
|
+
*/
|
|
6181
|
+
get kind() {
|
|
6182
|
+
let deferred1_0;
|
|
6183
|
+
let deferred1_1;
|
|
6184
|
+
try {
|
|
6185
|
+
const ret = wasm.moontransit_kind(this.__wbg_ptr);
|
|
6186
|
+
deferred1_0 = ret[0];
|
|
6187
|
+
deferred1_1 = ret[1];
|
|
6188
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
6189
|
+
} finally {
|
|
6190
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
6191
|
+
}
|
|
6192
|
+
}
|
|
6193
|
+
/**
|
|
6194
|
+
* Refined culmination instant, unix microseconds.
|
|
6195
|
+
* @returns {bigint}
|
|
6196
|
+
*/
|
|
6197
|
+
get timeUnixUs() {
|
|
6198
|
+
const ret = wasm.moontransit_timeUnixUs(this.__wbg_ptr);
|
|
6199
|
+
return ret;
|
|
6200
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
if (Symbol.dispose) MoonTransit.prototype[Symbol.dispose] = MoonTransit.prototype.free;
|
|
6203
|
+
exports.MoonTransit = MoonTransit;
|
|
6204
|
+
|
|
5829
6205
|
/**
|
|
5830
6206
|
* One solved moving-baseline epoch.
|
|
5831
6207
|
*/
|
|
@@ -8850,25 +9226,158 @@ if (Symbol.dispose) PppFloatSolution.prototype[Symbol.dispose] = PppFloatSolutio
|
|
|
8850
9226
|
exports.PppFloatSolution = PppFloatSolution;
|
|
8851
9227
|
|
|
8852
9228
|
/**
|
|
8853
|
-
*
|
|
8854
|
-
*
|
|
9229
|
+
* A precise-ephemeris source built from samples rather than parsed SP3 text.
|
|
9230
|
+
*
|
|
9231
|
+
* Implements the same `ObservableEphemerisSource` contract as a parsed [`Sp3`]
|
|
9232
|
+
* product and shares its interpolation substrate, so [`predictRanges`] accepts
|
|
9233
|
+
* either handle. Build one with [`preciseEphemerisSamplesFromSamples`].
|
|
8855
9234
|
*/
|
|
8856
|
-
class
|
|
9235
|
+
class PreciseEphemerisSampleSource {
|
|
8857
9236
|
static __wrap(ptr) {
|
|
8858
|
-
const obj = Object.create(
|
|
9237
|
+
const obj = Object.create(PreciseEphemerisSampleSource.prototype);
|
|
8859
9238
|
obj.__wbg_ptr = ptr;
|
|
8860
|
-
|
|
9239
|
+
PreciseEphemerisSampleSourceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
8861
9240
|
return obj;
|
|
8862
9241
|
}
|
|
8863
9242
|
__destroy_into_raw() {
|
|
8864
9243
|
const ptr = this.__wbg_ptr;
|
|
8865
9244
|
this.__wbg_ptr = 0;
|
|
8866
|
-
|
|
9245
|
+
PreciseEphemerisSampleSourceFinalization.unregister(this);
|
|
8867
9246
|
return ptr;
|
|
8868
9247
|
}
|
|
8869
9248
|
free() {
|
|
8870
9249
|
const ptr = this.__destroy_into_raw();
|
|
8871
|
-
wasm.
|
|
9250
|
+
wasm.__wbg_preciseephemerissamplesource_free(ptr, 0);
|
|
9251
|
+
}
|
|
9252
|
+
/**
|
|
9253
|
+
* Predict geometric ranges for many requests in one call. See the shared
|
|
9254
|
+
* [`predictRanges`](crate::precise_samples::predict_ranges_over) contract;
|
|
9255
|
+
* this is the sample-source entry point.
|
|
9256
|
+
* @param {any} requests
|
|
9257
|
+
* @param {any} options
|
|
9258
|
+
* @returns {any}
|
|
9259
|
+
*/
|
|
9260
|
+
predictRanges(requests, options) {
|
|
9261
|
+
const ret = wasm.preciseephemerissamplesource_predictRanges(this.__wbg_ptr, requests, options);
|
|
9262
|
+
if (ret[2]) {
|
|
9263
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
9264
|
+
}
|
|
9265
|
+
return takeFromExternrefTable0(ret[0]);
|
|
9266
|
+
}
|
|
9267
|
+
/**
|
|
9268
|
+
* The satellites this source can interpolate (e.g. `"G01"`), ascending.
|
|
9269
|
+
* @returns {string[]}
|
|
9270
|
+
*/
|
|
9271
|
+
get satellites() {
|
|
9272
|
+
const ret = wasm.preciseephemerissamplesource_satellites(this.__wbg_ptr);
|
|
9273
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
9274
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
9275
|
+
return v1;
|
|
9276
|
+
}
|
|
9277
|
+
}
|
|
9278
|
+
if (Symbol.dispose) PreciseEphemerisSampleSource.prototype[Symbol.dispose] = PreciseEphemerisSampleSource.prototype.free;
|
|
9279
|
+
exports.PreciseEphemerisSampleSource = PreciseEphemerisSampleSource;
|
|
9280
|
+
|
|
9281
|
+
/**
|
|
9282
|
+
* The per-request results of a batch observable prediction, index-aligned to
|
|
9283
|
+
* the input requests. Each request independently either produced observables or
|
|
9284
|
+
* failed; query a request with [`PredictBatch.isOk`] /
|
|
9285
|
+
* [`PredictBatch.observables`] / [`PredictBatch.error`].
|
|
9286
|
+
*/
|
|
9287
|
+
class PredictBatch {
|
|
9288
|
+
static __wrap(ptr) {
|
|
9289
|
+
const obj = Object.create(PredictBatch.prototype);
|
|
9290
|
+
obj.__wbg_ptr = ptr;
|
|
9291
|
+
PredictBatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
9292
|
+
return obj;
|
|
9293
|
+
}
|
|
9294
|
+
__destroy_into_raw() {
|
|
9295
|
+
const ptr = this.__wbg_ptr;
|
|
9296
|
+
this.__wbg_ptr = 0;
|
|
9297
|
+
PredictBatchFinalization.unregister(this);
|
|
9298
|
+
return ptr;
|
|
9299
|
+
}
|
|
9300
|
+
free() {
|
|
9301
|
+
const ptr = this.__destroy_into_raw();
|
|
9302
|
+
wasm.__wbg_predictbatch_free(ptr, 0);
|
|
9303
|
+
}
|
|
9304
|
+
/**
|
|
9305
|
+
* Number of requests in the batch.
|
|
9306
|
+
* @returns {number}
|
|
9307
|
+
*/
|
|
9308
|
+
get count() {
|
|
9309
|
+
const ret = wasm.predictbatch_count(this.__wbg_ptr);
|
|
9310
|
+
return ret >>> 0;
|
|
9311
|
+
}
|
|
9312
|
+
/**
|
|
9313
|
+
* The failure message for request `index`, or `undefined` when it
|
|
9314
|
+
* succeeded. Throws a `RangeError` for an out-of-range index.
|
|
9315
|
+
* @param {number} index
|
|
9316
|
+
* @returns {string | undefined}
|
|
9317
|
+
*/
|
|
9318
|
+
error(index) {
|
|
9319
|
+
const ret = wasm.predictbatch_error(this.__wbg_ptr, index);
|
|
9320
|
+
if (ret[3]) {
|
|
9321
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
9322
|
+
}
|
|
9323
|
+
let v1;
|
|
9324
|
+
if (ret[0] !== 0) {
|
|
9325
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
9326
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
9327
|
+
}
|
|
9328
|
+
return v1;
|
|
9329
|
+
}
|
|
9330
|
+
/**
|
|
9331
|
+
* Whether request `index` produced observables. Throws a `RangeError` for
|
|
9332
|
+
* an out-of-range index.
|
|
9333
|
+
* @param {number} index
|
|
9334
|
+
* @returns {boolean}
|
|
9335
|
+
*/
|
|
9336
|
+
isOk(index) {
|
|
9337
|
+
const ret = wasm.predictbatch_isOk(this.__wbg_ptr, index);
|
|
9338
|
+
if (ret[2]) {
|
|
9339
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
9340
|
+
}
|
|
9341
|
+
return ret[0] !== 0;
|
|
9342
|
+
}
|
|
9343
|
+
/**
|
|
9344
|
+
* The observables for request `index`. Throws a `RangeError` for an
|
|
9345
|
+
* out-of-range index and an `Error` carrying that request's failure message
|
|
9346
|
+
* when the prediction failed (check [`PredictBatch.isOk`] first).
|
|
9347
|
+
* @param {number} index
|
|
9348
|
+
* @returns {PredictedObservables}
|
|
9349
|
+
*/
|
|
9350
|
+
observables(index) {
|
|
9351
|
+
const ret = wasm.predictbatch_observables(this.__wbg_ptr, index);
|
|
9352
|
+
if (ret[2]) {
|
|
9353
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
9354
|
+
}
|
|
9355
|
+
return PredictedObservables.__wrap(ret[0]);
|
|
9356
|
+
}
|
|
9357
|
+
}
|
|
9358
|
+
if (Symbol.dispose) PredictBatch.prototype[Symbol.dispose] = PredictBatch.prototype.free;
|
|
9359
|
+
exports.PredictBatch = PredictBatch;
|
|
9360
|
+
|
|
9361
|
+
/**
|
|
9362
|
+
* Predicted GNSS observables for one satellite at one receive epoch. Every
|
|
9363
|
+
* field is computed by `sidereon_core::observables::predict`.
|
|
9364
|
+
*/
|
|
9365
|
+
class PredictedObservables {
|
|
9366
|
+
static __wrap(ptr) {
|
|
9367
|
+
const obj = Object.create(PredictedObservables.prototype);
|
|
9368
|
+
obj.__wbg_ptr = ptr;
|
|
9369
|
+
PredictedObservablesFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
9370
|
+
return obj;
|
|
9371
|
+
}
|
|
9372
|
+
__destroy_into_raw() {
|
|
9373
|
+
const ptr = this.__wbg_ptr;
|
|
9374
|
+
this.__wbg_ptr = 0;
|
|
9375
|
+
PredictedObservablesFinalization.unregister(this);
|
|
9376
|
+
return ptr;
|
|
9377
|
+
}
|
|
9378
|
+
free() {
|
|
9379
|
+
const ptr = this.__destroy_into_raw();
|
|
9380
|
+
wasm.__wbg_predictedobservables_free(ptr, 0);
|
|
8872
9381
|
}
|
|
8873
9382
|
/**
|
|
8874
9383
|
* Topocentric azimuth in `[0, 360)`, degrees.
|
|
@@ -10391,6 +10900,25 @@ class Sp3 {
|
|
|
10391
10900
|
}
|
|
10392
10901
|
return Sp3Interpolation.__wrap(ret[0]);
|
|
10393
10902
|
}
|
|
10903
|
+
/**
|
|
10904
|
+
* Predict geometric ranges for many `(satellite, receiver, epoch)` requests
|
|
10905
|
+
* against this ephemeris in one call. `requests` is an array of
|
|
10906
|
+
* `{ sat, receiverEcefM, tRxJ2000S }`; returns an array of
|
|
10907
|
+
* `{ geometricRangeM, satClockS, transmitTimeJ2000S, satPosEcefM }`
|
|
10908
|
+
* index-aligned to `requests`. The same call shape works on a
|
|
10909
|
+
* `PreciseEphemerisSampleSource`. Delegates to the serial reference kernel
|
|
10910
|
+
* `sidereon_core::observables::predict_ranges`.
|
|
10911
|
+
* @param {any} requests
|
|
10912
|
+
* @param {any} options
|
|
10913
|
+
* @returns {any}
|
|
10914
|
+
*/
|
|
10915
|
+
predictRanges(requests, options) {
|
|
10916
|
+
const ret = wasm.sp3_predictRanges(this.__wbg_ptr, requests, options);
|
|
10917
|
+
if (ret[2]) {
|
|
10918
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
10919
|
+
}
|
|
10920
|
+
return takeFromExternrefTable0(ret[0]);
|
|
10921
|
+
}
|
|
10394
10922
|
/**
|
|
10395
10923
|
* Satellite tokens present in the product (e.g. `"G01"`), ascending.
|
|
10396
10924
|
* @returns {string[]}
|
|
@@ -12740,6 +13268,37 @@ function correlate(iq, prn, options) {
|
|
|
12740
13268
|
}
|
|
12741
13269
|
exports.correlate = correlate;
|
|
12742
13270
|
|
|
13271
|
+
/**
|
|
13272
|
+
* Fitted parameter covariance from a converged solve, scaling `(J^T J)^-1` by
|
|
13273
|
+
* the post-fit reduced chi-square `s_sq = 2 * cost / (m - n)` (the same scale
|
|
13274
|
+
* `scipy.optimize.curve_fit` applies to its `pcov`).
|
|
13275
|
+
*
|
|
13276
|
+
* `jacobian` is a flat row-major `(m, n)` `Float64Array` (the Jacobian at the
|
|
13277
|
+
* solution), and `cost` is the solve's optimal cost `0.5 * sum(residual^2)`;
|
|
13278
|
+
* the degrees of freedom `m - n` (taken from the Jacobian's own shape) must be
|
|
13279
|
+
* positive. Pairs naturally with a [`crate::LeastSquaresResult`] (`result.jac`,
|
|
13280
|
+
* `result.m`, `result.n`, `result.cost`). Returns the `n`-by-`n` covariance as
|
|
13281
|
+
* a flat row-major `Float64Array`. Delegates to
|
|
13282
|
+
* `sidereon_core::astro::math::least_squares::covariance_from_jacobian`.
|
|
13283
|
+
* @param {Float64Array} jacobian
|
|
13284
|
+
* @param {number} m
|
|
13285
|
+
* @param {number} n
|
|
13286
|
+
* @param {number} cost
|
|
13287
|
+
* @returns {Float64Array}
|
|
13288
|
+
*/
|
|
13289
|
+
function covarianceFromJacobian(jacobian, m, n, cost) {
|
|
13290
|
+
const ptr0 = passArrayF64ToWasm0(jacobian, wasm.__wbindgen_malloc);
|
|
13291
|
+
const len0 = WASM_VECTOR_LEN;
|
|
13292
|
+
const ret = wasm.covarianceFromJacobian(ptr0, len0, m, n, cost);
|
|
13293
|
+
if (ret[3]) {
|
|
13294
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
13295
|
+
}
|
|
13296
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
13297
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
13298
|
+
return v2;
|
|
13299
|
+
}
|
|
13300
|
+
exports.covarianceFromJacobian = covarianceFromJacobian;
|
|
13301
|
+
|
|
12743
13302
|
/**
|
|
12744
13303
|
* Whether a 3x3 covariance (flat row-major length 9) is symmetric positive
|
|
12745
13304
|
* semidefinite within the engine tolerance.
|
|
@@ -13002,6 +13561,38 @@ function dishGain(diameter_m, frequency_hz, efficiency) {
|
|
|
13002
13561
|
}
|
|
13003
13562
|
exports.dishGain = dishGain;
|
|
13004
13563
|
|
|
13564
|
+
/**
|
|
13565
|
+
* GNSS dilution of precision with an explicit ENU convention for the
|
|
13566
|
+
* horizontal/vertical split.
|
|
13567
|
+
*
|
|
13568
|
+
* `lineOfSight` is a flat row-major `(n, 3)` `Float64Array` of ECEF unit
|
|
13569
|
+
* vectors, `weights` a positive `Float64Array` of length `n`, and `convention`
|
|
13570
|
+
* is `"geodeticNormal"` (the GNSS-standard default, matching [`gnssDop`]) or
|
|
13571
|
+
* `"geocentricRadial"` (radial up). Only HDOP/VDOP differ between conventions
|
|
13572
|
+
* (by ~`1e-3` relative); GDOP/PDOP/TDOP are identical. Delegates to
|
|
13573
|
+
* `sidereon_core::geometry::dop_with_convention`.
|
|
13574
|
+
* @param {Float64Array} line_of_sight
|
|
13575
|
+
* @param {Float64Array} weights
|
|
13576
|
+
* @param {Wgs84Geodetic} receiver
|
|
13577
|
+
* @param {string} convention
|
|
13578
|
+
* @returns {Dop}
|
|
13579
|
+
*/
|
|
13580
|
+
function dopWithConvention(line_of_sight, weights, receiver, convention) {
|
|
13581
|
+
const ptr0 = passArrayF64ToWasm0(line_of_sight, wasm.__wbindgen_malloc);
|
|
13582
|
+
const len0 = WASM_VECTOR_LEN;
|
|
13583
|
+
const ptr1 = passArrayF64ToWasm0(weights, wasm.__wbindgen_malloc);
|
|
13584
|
+
const len1 = WASM_VECTOR_LEN;
|
|
13585
|
+
_assertClass(receiver, Wgs84Geodetic);
|
|
13586
|
+
const ptr2 = passStringToWasm0(convention, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
13587
|
+
const len2 = WASM_VECTOR_LEN;
|
|
13588
|
+
const ret = wasm.dopWithConvention(ptr0, len0, ptr1, len1, receiver.__wbg_ptr, ptr2, len2);
|
|
13589
|
+
if (ret[2]) {
|
|
13590
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
13591
|
+
}
|
|
13592
|
+
return Dop.__wrap(ret[0]);
|
|
13593
|
+
}
|
|
13594
|
+
exports.dopWithConvention = dopWithConvention;
|
|
13595
|
+
|
|
13005
13596
|
/**
|
|
13006
13597
|
* Range rate and dimensionless Doppler ratio from a GCRS state.
|
|
13007
13598
|
*
|
|
@@ -13149,6 +13740,56 @@ function eclipseStatus(satellite_position_km, sun_position_km) {
|
|
|
13149
13740
|
}
|
|
13150
13741
|
exports.eclipseStatus = eclipseStatus;
|
|
13151
13742
|
|
|
13743
|
+
/**
|
|
13744
|
+
* Ellipsoidal height `h = H + N` (metres above the WGS84 ellipsoid) from an
|
|
13745
|
+
* orthometric height and a geodetic position in radians, using the embedded
|
|
13746
|
+
* genuine EGM96 1-degree model. Delegates to
|
|
13747
|
+
* `sidereon_core::geoid::egm96_ellipsoidal_height_m`.
|
|
13748
|
+
* @param {number} orthometric_height_m
|
|
13749
|
+
* @param {number} lat_rad
|
|
13750
|
+
* @param {number} lon_rad
|
|
13751
|
+
* @returns {number}
|
|
13752
|
+
*/
|
|
13753
|
+
function egm96EllipsoidalHeightM(orthometric_height_m, lat_rad, lon_rad) {
|
|
13754
|
+
const ret = wasm.egm96EllipsoidalHeightM(orthometric_height_m, lat_rad, lon_rad);
|
|
13755
|
+
return ret;
|
|
13756
|
+
}
|
|
13757
|
+
exports.egm96EllipsoidalHeightM = egm96EllipsoidalHeightM;
|
|
13758
|
+
|
|
13759
|
+
/**
|
|
13760
|
+
* Orthometric height `H = h - N` (metres above mean sea level) from an
|
|
13761
|
+
* ellipsoidal height and a geodetic position in radians, using the embedded
|
|
13762
|
+
* genuine EGM96 1-degree model. Delegates to
|
|
13763
|
+
* `sidereon_core::geoid::egm96_orthometric_height_m`.
|
|
13764
|
+
* @param {number} ellipsoidal_height_m
|
|
13765
|
+
* @param {number} lat_rad
|
|
13766
|
+
* @param {number} lon_rad
|
|
13767
|
+
* @returns {number}
|
|
13768
|
+
*/
|
|
13769
|
+
function egm96OrthometricHeightM(ellipsoidal_height_m, lat_rad, lon_rad) {
|
|
13770
|
+
const ret = wasm.egm96OrthometricHeightM(ellipsoidal_height_m, lat_rad, lon_rad);
|
|
13771
|
+
return ret;
|
|
13772
|
+
}
|
|
13773
|
+
exports.egm96OrthometricHeightM = egm96OrthometricHeightM;
|
|
13774
|
+
|
|
13775
|
+
/**
|
|
13776
|
+
* Geoid undulation `N` (metres above the WGS84 ellipsoid) at a geodetic
|
|
13777
|
+
* position in radians, from the embedded GENUINE EGM96 1-degree global grid.
|
|
13778
|
+
* Latitude is positive north, longitude positive east. This is the recommended
|
|
13779
|
+
* zero-setup default for metre-class datum work (its bilinear lookup agrees
|
|
13780
|
+
* with the full 15-arcminute EGM96 grid to ~0.4 m RMS); the coarse
|
|
13781
|
+
* [`geoidUndulation`] is only suitable for sanity checks. Delegates to
|
|
13782
|
+
* `sidereon_core::geoid::egm96_undulation`.
|
|
13783
|
+
* @param {number} lat_rad
|
|
13784
|
+
* @param {number} lon_rad
|
|
13785
|
+
* @returns {number}
|
|
13786
|
+
*/
|
|
13787
|
+
function egm96Undulation(lat_rad, lon_rad) {
|
|
13788
|
+
const ret = wasm.egm96Undulation(lat_rad, lon_rad);
|
|
13789
|
+
return ret;
|
|
13790
|
+
}
|
|
13791
|
+
exports.egm96Undulation = egm96Undulation;
|
|
13792
|
+
|
|
13152
13793
|
/**
|
|
13153
13794
|
* Effective isotropic radiated power, dBW.
|
|
13154
13795
|
* @param {number} tx_power_dbm
|
|
@@ -13307,6 +13948,84 @@ function encounterPlaneCovariance(frame, covariance_km2) {
|
|
|
13307
13948
|
}
|
|
13308
13949
|
exports.encounterPlaneCovariance = encounterPlaneCovariance;
|
|
13309
13950
|
|
|
13951
|
+
/**
|
|
13952
|
+
* Confidence ellipse from an arbitrary 2x2 covariance block.
|
|
13953
|
+
*
|
|
13954
|
+
* `covariance` is a flat row-major length-4 `Float64Array` (`[c00, c01, c10,
|
|
13955
|
+
* c11]`); `confidence` is in `(0, 1)`. The semi-axes are the eigenvalues of the
|
|
13956
|
+
* symmetrized block scaled by the chi-square(2) quantile. Throws a `RangeError`
|
|
13957
|
+
* for a non-positive-semidefinite block or an out-of-range confidence.
|
|
13958
|
+
* Delegates to `sidereon_core::geometry::error_ellipse_2x2`.
|
|
13959
|
+
* @param {Float64Array} covariance
|
|
13960
|
+
* @param {number} confidence
|
|
13961
|
+
* @returns {ErrorEllipse2}
|
|
13962
|
+
*/
|
|
13963
|
+
function errorEllipse2(covariance, confidence) {
|
|
13964
|
+
const ptr0 = passArrayF64ToWasm0(covariance, wasm.__wbindgen_malloc);
|
|
13965
|
+
const len0 = WASM_VECTOR_LEN;
|
|
13966
|
+
const ret = wasm.errorEllipse2(ptr0, len0, confidence);
|
|
13967
|
+
if (ret[2]) {
|
|
13968
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
13969
|
+
}
|
|
13970
|
+
return ErrorEllipse2.__wrap(ret[0]);
|
|
13971
|
+
}
|
|
13972
|
+
exports.errorEllipse2 = errorEllipse2;
|
|
13973
|
+
|
|
13974
|
+
/**
|
|
13975
|
+
* Find Moon elevation threshold crossings (moonrise / moonset) over a UTC
|
|
13976
|
+
* window.
|
|
13977
|
+
*
|
|
13978
|
+
* The station is geodetic (`latitudeDeg`, `longitudeDeg`, `altitudeKm`);
|
|
13979
|
+
* `startUnixUs` / `endUnixUs` bound the window in unix microseconds. `options`
|
|
13980
|
+
* is `{ elevationThresholdDeg?, stepSeconds?, timeToleranceSeconds? }`.
|
|
13981
|
+
* Delegates to `sidereon_core::astro::bodies::find_moon_elevation_crossings`.
|
|
13982
|
+
* @param {number} latitude_deg
|
|
13983
|
+
* @param {number} longitude_deg
|
|
13984
|
+
* @param {number} altitude_km
|
|
13985
|
+
* @param {bigint} start_unix_us
|
|
13986
|
+
* @param {bigint} end_unix_us
|
|
13987
|
+
* @param {any} options
|
|
13988
|
+
* @returns {MoonElevationCrossing[]}
|
|
13989
|
+
*/
|
|
13990
|
+
function findMoonElevationCrossings(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, options) {
|
|
13991
|
+
const ret = wasm.findMoonElevationCrossings(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, options);
|
|
13992
|
+
if (ret[3]) {
|
|
13993
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
13994
|
+
}
|
|
13995
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13996
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13997
|
+
return v1;
|
|
13998
|
+
}
|
|
13999
|
+
exports.findMoonElevationCrossings = findMoonElevationCrossings;
|
|
14000
|
+
|
|
14001
|
+
/**
|
|
14002
|
+
* Find Moon meridian transits (upper and lower culminations) over a UTC window.
|
|
14003
|
+
*
|
|
14004
|
+
* The station is geodetic (`latitudeDeg`, `longitudeDeg`, `altitudeKm`);
|
|
14005
|
+
* `startUnixUs` / `endUnixUs` bound the window in unix microseconds.
|
|
14006
|
+
* `stepSeconds` is the uniform scan step and `timeToleranceSeconds` the
|
|
14007
|
+
* refinement tolerance. Delegates to
|
|
14008
|
+
* `sidereon_core::astro::bodies::find_moon_transits`.
|
|
14009
|
+
* @param {number} latitude_deg
|
|
14010
|
+
* @param {number} longitude_deg
|
|
14011
|
+
* @param {number} altitude_km
|
|
14012
|
+
* @param {bigint} start_unix_us
|
|
14013
|
+
* @param {bigint} end_unix_us
|
|
14014
|
+
* @param {number} step_seconds
|
|
14015
|
+
* @param {number} time_tolerance_seconds
|
|
14016
|
+
* @returns {MoonTransit[]}
|
|
14017
|
+
*/
|
|
14018
|
+
function findMoonTransits(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, step_seconds, time_tolerance_seconds) {
|
|
14019
|
+
const ret = wasm.findMoonTransits(latitude_deg, longitude_deg, altitude_km, start_unix_us, end_unix_us, step_seconds, time_tolerance_seconds);
|
|
14020
|
+
if (ret[3]) {
|
|
14021
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
14022
|
+
}
|
|
14023
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
14024
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
14025
|
+
return v1;
|
|
14026
|
+
}
|
|
14027
|
+
exports.findMoonTransits = findMoonTransits;
|
|
14028
|
+
|
|
13310
14029
|
/**
|
|
13311
14030
|
* Find local TCA candidates between two satellites over a UTC window.
|
|
13312
14031
|
*
|
|
@@ -14050,6 +14769,45 @@ function gnssVisible(sp3, station_ecef_m, j2000_seconds, options) {
|
|
|
14050
14769
|
}
|
|
14051
14770
|
exports.gnssVisible = gnssVisible;
|
|
14052
14771
|
|
|
14772
|
+
/**
|
|
14773
|
+
* GPS - UTC (the GNSS leap-second offset since the GPS epoch) on a UTC calendar
|
|
14774
|
+
* date: the IS-GPS-200 quantity broadcast in the navigation message (18 s from
|
|
14775
|
+
* 2017-01-01). Equals `taiUtcOffsetS - 19`. Use this, not [`taiUtcOffsetS`],
|
|
14776
|
+
* whenever you mean the leap seconds a GPS receiver applies. Delegates to
|
|
14777
|
+
* `sidereon_core::astro::time::scales::gps_utc_offset_s`.
|
|
14778
|
+
* @param {number} year
|
|
14779
|
+
* @param {number} month
|
|
14780
|
+
* @param {number} day
|
|
14781
|
+
* @returns {number}
|
|
14782
|
+
*/
|
|
14783
|
+
function gpsUtcOffsetS(year, month, day) {
|
|
14784
|
+
const ret = wasm.gpsUtcOffsetS(year, month, day);
|
|
14785
|
+
return ret;
|
|
14786
|
+
}
|
|
14787
|
+
exports.gpsUtcOffsetS = gpsUtcOffsetS;
|
|
14788
|
+
|
|
14789
|
+
/**
|
|
14790
|
+
* Trace of the Gauss-Newton Hessian approximation `J^T J`: the sum of the
|
|
14791
|
+
* squared column norms of the Jacobian, with no inverse formed.
|
|
14792
|
+
*
|
|
14793
|
+
* `jacobian` is a flat row-major `(m, n)` `Float64Array`. Delegates to
|
|
14794
|
+
* `sidereon_core::astro::math::least_squares::hessian_trace`.
|
|
14795
|
+
* @param {Float64Array} jacobian
|
|
14796
|
+
* @param {number} m
|
|
14797
|
+
* @param {number} n
|
|
14798
|
+
* @returns {number}
|
|
14799
|
+
*/
|
|
14800
|
+
function hessianTrace(jacobian, m, n) {
|
|
14801
|
+
const ptr0 = passArrayF64ToWasm0(jacobian, wasm.__wbindgen_malloc);
|
|
14802
|
+
const len0 = WASM_VECTOR_LEN;
|
|
14803
|
+
const ret = wasm.hessianTrace(ptr0, len0, m, n);
|
|
14804
|
+
if (ret[2]) {
|
|
14805
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14806
|
+
}
|
|
14807
|
+
return ret[0];
|
|
14808
|
+
}
|
|
14809
|
+
exports.hessianTrace = hessianTrace;
|
|
14810
|
+
|
|
14053
14811
|
/**
|
|
14054
14812
|
* Gauss angles-only orbit determination.
|
|
14055
14813
|
*
|
|
@@ -14257,6 +15015,28 @@ function j2000SecondsToCivil(seconds) {
|
|
|
14257
15015
|
}
|
|
14258
15016
|
exports.j2000SecondsToCivil = j2000SecondsToCivil;
|
|
14259
15017
|
|
|
15018
|
+
/**
|
|
15019
|
+
* Jarque-Bera normality test on a residual set.
|
|
15020
|
+
*
|
|
15021
|
+
* `x` is a `Float64Array` (at least two values). Returns
|
|
15022
|
+
* `{ statistic, pValue }` with `statistic = n/6 (S^2 + K^2/4)` (biased moments)
|
|
15023
|
+
* and the chi-square(2) survival `pValue = exp(-statistic/2)`, matching
|
|
15024
|
+
* `scipy.stats.jarque_bera`. Delegates to
|
|
15025
|
+
* `sidereon_core::quality::normality::jarque_bera`.
|
|
15026
|
+
* @param {Float64Array} x
|
|
15027
|
+
* @returns {any}
|
|
15028
|
+
*/
|
|
15029
|
+
function jarqueBera(x) {
|
|
15030
|
+
const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
15031
|
+
const len0 = WASM_VECTOR_LEN;
|
|
15032
|
+
const ret = wasm.jarqueBera(ptr0, len0);
|
|
15033
|
+
if (ret[2]) {
|
|
15034
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15035
|
+
}
|
|
15036
|
+
return takeFromExternrefTable0(ret[0]);
|
|
15037
|
+
}
|
|
15038
|
+
exports.jarqueBera = jarqueBera;
|
|
15039
|
+
|
|
14260
15040
|
/**
|
|
14261
15041
|
* GPS broadcast Klobuchar ionospheric group delay in the model's native units
|
|
14262
15042
|
* (positive metres).
|
|
@@ -14293,6 +15073,30 @@ function klobucharDelay(alpha, beta, lat_deg, lon_deg, azimuth_deg, elevation_de
|
|
|
14293
15073
|
}
|
|
14294
15074
|
exports.klobucharDelay = klobucharDelay;
|
|
14295
15075
|
|
|
15076
|
+
/**
|
|
15077
|
+
* Sample kurtosis of a residual set.
|
|
15078
|
+
*
|
|
15079
|
+
* `x` is a `Float64Array`. `fisher` (default `true`) returns the excess
|
|
15080
|
+
* kurtosis `m4 / m2^2 - 3` (Gaussian -> 0, `scipy.stats.kurtosis`); `false`
|
|
15081
|
+
* returns the Pearson kurtosis (Gaussian -> 3). `bias` (default `true`); pass
|
|
15082
|
+
* `false` for the sample correction (needs at least four values). Delegates to
|
|
15083
|
+
* `sidereon_core::quality::normality::kurtosis`.
|
|
15084
|
+
* @param {Float64Array} x
|
|
15085
|
+
* @param {boolean | null} [fisher]
|
|
15086
|
+
* @param {boolean | null} [bias]
|
|
15087
|
+
* @returns {number}
|
|
15088
|
+
*/
|
|
15089
|
+
function kurtosis(x, fisher, bias) {
|
|
15090
|
+
const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
15091
|
+
const len0 = WASM_VECTOR_LEN;
|
|
15092
|
+
const ret = wasm.kurtosis(ptr0, len0, isLikeNone(fisher) ? 0xFFFFFF : fisher ? 1 : 0, isLikeNone(bias) ? 0xFFFFFF : bias ? 1 : 0);
|
|
15093
|
+
if (ret[2]) {
|
|
15094
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15095
|
+
}
|
|
15096
|
+
return ret[0];
|
|
15097
|
+
}
|
|
15098
|
+
exports.kurtosis = kurtosis;
|
|
15099
|
+
|
|
14296
15100
|
/**
|
|
14297
15101
|
* Resolve integer ambiguities with the LAMBDA method (RTKLIB `lambda()` port).
|
|
14298
15102
|
*
|
|
@@ -14400,6 +15204,49 @@ function leapSecondsBatch(dates) {
|
|
|
14400
15204
|
}
|
|
14401
15205
|
exports.leapSecondsBatch = leapSecondsBatch;
|
|
14402
15206
|
|
|
15207
|
+
/**
|
|
15208
|
+
* Solve a generic data-driven least-squares problem.
|
|
15209
|
+
*
|
|
15210
|
+
* `request` is a `DataProblemInput` object: a `kind` (`"linear"`,
|
|
15211
|
+
* `"polynomial"`, `"exponential"`) carrying its data arrays, the `x0` starting
|
|
15212
|
+
* point, and the SciPy `least_squares` options. The whole trust-region
|
|
15213
|
+
* iteration runs in Rust through
|
|
15214
|
+
* `trust_region_least_squares::data::solve_data_problem` (the serial entry, the
|
|
15215
|
+
* default in-crate SVD backend); no rayon thread pool is entered.
|
|
15216
|
+
* @param {any} request
|
|
15217
|
+
* @returns {LeastSquaresResult}
|
|
15218
|
+
*/
|
|
15219
|
+
function leastSquares(request) {
|
|
15220
|
+
const ret = wasm.leastSquares(request);
|
|
15221
|
+
if (ret[2]) {
|
|
15222
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15223
|
+
}
|
|
15224
|
+
return LeastSquaresResult.__wrap(ret[0]);
|
|
15225
|
+
}
|
|
15226
|
+
exports.leastSquares = leastSquares;
|
|
15227
|
+
|
|
15228
|
+
/**
|
|
15229
|
+
* Serial leave-one-out (jackknife) over a data-driven least-squares problem.
|
|
15230
|
+
*
|
|
15231
|
+
* Delegates to the core's serial leave-one-out entry
|
|
15232
|
+
* `trust_region_least_squares::batch::solve_data_problem_drop_one_serial`: the
|
|
15233
|
+
* full problem is solved once, then re-solved with each residual row masked in
|
|
15234
|
+
* turn. The core's default `solve_data_problem_drop_one` fans these re-solves
|
|
15235
|
+
* across a rayon pool that wasm has no threads for, so this binding takes the
|
|
15236
|
+
* serial twin, which runs the identical re-solves one row at a time and is
|
|
15237
|
+
* byte-identical to the parallel version.
|
|
15238
|
+
* @param {any} request
|
|
15239
|
+
* @returns {LeastSquaresDropOneReport}
|
|
15240
|
+
*/
|
|
15241
|
+
function leastSquaresDropOne(request) {
|
|
15242
|
+
const ret = wasm.leastSquaresDropOne(request);
|
|
15243
|
+
if (ret[2]) {
|
|
15244
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15245
|
+
}
|
|
15246
|
+
return LeastSquaresDropOneReport.__wrap(ret[0]);
|
|
15247
|
+
}
|
|
15248
|
+
exports.leastSquaresDropOne = leastSquaresDropOne;
|
|
15249
|
+
|
|
14403
15250
|
/**
|
|
14404
15251
|
* Decode LNAV subframes 1-3 back into engineering-unit parameters.
|
|
14405
15252
|
*
|
|
@@ -14728,6 +15575,30 @@ function mergeSp3(sources, options) {
|
|
|
14728
15575
|
}
|
|
14729
15576
|
exports.mergeSp3 = mergeSp3;
|
|
14730
15577
|
|
|
15578
|
+
/**
|
|
15579
|
+
* Mean, variance, skewness, and excess kurtosis of a residual set in one pass.
|
|
15580
|
+
*
|
|
15581
|
+
* `x` is a `Float64Array`; `fisher` and `bias` select the kurtosis convention
|
|
15582
|
+
* and the bias correction exactly as in [`skewness`] / [`kurtosis`] (both
|
|
15583
|
+
* default `true`). Returns `{ mean, variance, skewness, kurtosisExcess }`; the
|
|
15584
|
+
* variance is the biased second central moment. Delegates to
|
|
15585
|
+
* `sidereon_core::quality::normality::moments`.
|
|
15586
|
+
* @param {Float64Array} x
|
|
15587
|
+
* @param {boolean | null} [fisher]
|
|
15588
|
+
* @param {boolean | null} [bias]
|
|
15589
|
+
* @returns {any}
|
|
15590
|
+
*/
|
|
15591
|
+
function moments(x, fisher, bias) {
|
|
15592
|
+
const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
15593
|
+
const len0 = WASM_VECTOR_LEN;
|
|
15594
|
+
const ret = wasm.moments(ptr0, len0, isLikeNone(fisher) ? 0xFFFFFF : fisher ? 1 : 0, isLikeNone(bias) ? 0xFFFFFF : bias ? 1 : 0);
|
|
15595
|
+
if (ret[2]) {
|
|
15596
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15597
|
+
}
|
|
15598
|
+
return takeFromExternrefTable0(ret[0]);
|
|
15599
|
+
}
|
|
15600
|
+
exports.moments = moments;
|
|
15601
|
+
|
|
14731
15602
|
/**
|
|
14732
15603
|
* Angle in degrees between satellite nadir and the Moon direction.
|
|
14733
15604
|
* @param {Float64Array} satellite_position_km
|
|
@@ -14749,6 +15620,67 @@ function moonAngle(satellite_position_km, moon_position_km) {
|
|
|
14749
15620
|
}
|
|
14750
15621
|
exports.moonAngle = moonAngle;
|
|
14751
15622
|
|
|
15623
|
+
/**
|
|
15624
|
+
* Topocentric azimuth/elevation/range of the Moon from a ground site,
|
|
15625
|
+
* including the diurnal parallax. See [`sunAzEl`] for the argument shapes.
|
|
15626
|
+
* Delegates to `sidereon_core::astro::bodies::moon_az_el`.
|
|
15627
|
+
* @param {number} latitude_deg
|
|
15628
|
+
* @param {number} longitude_deg
|
|
15629
|
+
* @param {number} altitude_km
|
|
15630
|
+
* @param {bigint} epoch_unix_us
|
|
15631
|
+
* @returns {any}
|
|
15632
|
+
*/
|
|
15633
|
+
function moonAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
|
|
15634
|
+
const ret = wasm.moonAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
|
|
15635
|
+
if (ret[2]) {
|
|
15636
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15637
|
+
}
|
|
15638
|
+
return takeFromExternrefTable0(ret[0]);
|
|
15639
|
+
}
|
|
15640
|
+
exports.moonAzEl = moonAzEl;
|
|
15641
|
+
|
|
15642
|
+
/**
|
|
15643
|
+
* Topocentric geometric Moon (disk-center) elevation from a ground site,
|
|
15644
|
+
* degrees. See [`sunAzEl`] for the argument shapes. Delegates to
|
|
15645
|
+
* `sidereon_core::astro::bodies::moon_az_el` and returns its `elevationDeg`: the
|
|
15646
|
+
* core `moon_elevation_deg` convenience wrapper `expect`s on the geometry, so a
|
|
15647
|
+
* valid-shaped but out-of-range station (e.g. latitude 120) would panic the
|
|
15648
|
+
* wasm module; going through `moon_az_el` surfaces that as a thrown JS error.
|
|
15649
|
+
* @param {number} latitude_deg
|
|
15650
|
+
* @param {number} longitude_deg
|
|
15651
|
+
* @param {number} altitude_km
|
|
15652
|
+
* @param {bigint} epoch_unix_us
|
|
15653
|
+
* @returns {number}
|
|
15654
|
+
*/
|
|
15655
|
+
function moonElevationDeg(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
|
|
15656
|
+
const ret = wasm.moonElevationDeg(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
|
|
15657
|
+
if (ret[2]) {
|
|
15658
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15659
|
+
}
|
|
15660
|
+
return ret[0];
|
|
15661
|
+
}
|
|
15662
|
+
exports.moonElevationDeg = moonElevationDeg;
|
|
15663
|
+
|
|
15664
|
+
/**
|
|
15665
|
+
* Illuminated fraction of the Moon as seen from a ground site. Returns
|
|
15666
|
+
* `{ illuminatedFraction, phaseAngleDeg }` (0 = new, 1 = full). See [`sunAzEl`]
|
|
15667
|
+
* for the argument shapes. Delegates to
|
|
15668
|
+
* `sidereon_core::astro::bodies::moon_illumination`.
|
|
15669
|
+
* @param {number} latitude_deg
|
|
15670
|
+
* @param {number} longitude_deg
|
|
15671
|
+
* @param {number} altitude_km
|
|
15672
|
+
* @param {bigint} epoch_unix_us
|
|
15673
|
+
* @returns {any}
|
|
15674
|
+
*/
|
|
15675
|
+
function moonIllumination(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
|
|
15676
|
+
const ret = wasm.moonIllumination(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
|
|
15677
|
+
if (ret[2]) {
|
|
15678
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
15679
|
+
}
|
|
15680
|
+
return takeFromExternrefTable0(ret[0]);
|
|
15681
|
+
}
|
|
15682
|
+
exports.moonIllumination = moonIllumination;
|
|
15683
|
+
|
|
14752
15684
|
/**
|
|
14753
15685
|
* Narrow-lane code combination, metres.
|
|
14754
15686
|
* @param {number} p1_m
|
|
@@ -14846,6 +15778,37 @@ function noiseAmplification(f1_hz, f2_hz) {
|
|
|
14846
15778
|
}
|
|
14847
15779
|
exports.noiseAmplification = noiseAmplification;
|
|
14848
15780
|
|
|
15781
|
+
/**
|
|
15782
|
+
* Parameter covariance from a design (Jacobian) matrix via the Gauss-Newton
|
|
15783
|
+
* normal equations `varianceScale * (J^T J)^-1`, formed from the thin SVD of
|
|
15784
|
+
* `J` (not by inverting `J^T J`, so the condition number is not squared).
|
|
15785
|
+
*
|
|
15786
|
+
* `jacobian` is a flat row-major `(m, n)` `Float64Array` with `m >= n`;
|
|
15787
|
+
* `varianceScale` (`sigma^2`, non-negative) scales the bare cofactor (pass the
|
|
15788
|
+
* post-fit reduced chi-square for the fitted covariance, or `1.0` for
|
|
15789
|
+
* `(J^T J)^-1`). Returns the `n`-by-`n` covariance as a flat row-major
|
|
15790
|
+
* `Float64Array` of length `n * n`. Throws an `Error` for a rank-deficient
|
|
15791
|
+
* Jacobian. Delegates to
|
|
15792
|
+
* `sidereon_core::astro::math::least_squares::normal_covariance`.
|
|
15793
|
+
* @param {Float64Array} jacobian
|
|
15794
|
+
* @param {number} m
|
|
15795
|
+
* @param {number} n
|
|
15796
|
+
* @param {number} variance_scale
|
|
15797
|
+
* @returns {Float64Array}
|
|
15798
|
+
*/
|
|
15799
|
+
function normalCovariance(jacobian, m, n, variance_scale) {
|
|
15800
|
+
const ptr0 = passArrayF64ToWasm0(jacobian, wasm.__wbindgen_malloc);
|
|
15801
|
+
const len0 = WASM_VECTOR_LEN;
|
|
15802
|
+
const ret = wasm.normalCovariance(ptr0, len0, m, n, variance_scale);
|
|
15803
|
+
if (ret[3]) {
|
|
15804
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
15805
|
+
}
|
|
15806
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
15807
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
15808
|
+
return v2;
|
|
15809
|
+
}
|
|
15810
|
+
exports.normalCovariance = normalCovariance;
|
|
15811
|
+
|
|
14849
15812
|
/**
|
|
14850
15813
|
* Predict observables for one satellite from a broadcast ephemeris store.
|
|
14851
15814
|
* Delegates to `sidereon_core::observables::predict`.
|
|
@@ -15381,6 +16344,89 @@ function pppCorrections(sp3, epochs, receiver_ecef_m, options) {
|
|
|
15381
16344
|
}
|
|
15382
16345
|
exports.pppCorrections = pppCorrections;
|
|
15383
16346
|
|
|
16347
|
+
/**
|
|
16348
|
+
* Build a sample-backed precise-ephemeris source from an array of samples.
|
|
16349
|
+
*
|
|
16350
|
+
* `samples` is an array of `{ sat, epoch, positionEcefM, clockS?, clockEvent? }`
|
|
16351
|
+
* objects (see the sample field docs). Samples are grouped by satellite in their
|
|
16352
|
+
* supplied order; each satellite needs at least two strictly time-increasing
|
|
16353
|
+
* samples. Throws a `TypeError` for a malformed object or bad satellite token
|
|
16354
|
+
* and a `RangeError` for a non-finite epoch or a source validation failure
|
|
16355
|
+
* (empty input, a single-sample satellite, non-monotonic epochs, a non-finite
|
|
16356
|
+
* sample). Delegates to `sidereon_core::sp3::PreciseEphemerisSamples::from_samples`.
|
|
16357
|
+
* @param {any} samples
|
|
16358
|
+
* @returns {PreciseEphemerisSampleSource}
|
|
16359
|
+
*/
|
|
16360
|
+
function preciseEphemerisSamplesFromSamples(samples) {
|
|
16361
|
+
const ret = wasm.preciseEphemerisSamplesFromSamples(samples);
|
|
16362
|
+
if (ret[2]) {
|
|
16363
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16364
|
+
}
|
|
16365
|
+
return PreciseEphemerisSampleSource.__wrap(ret[0]);
|
|
16366
|
+
}
|
|
16367
|
+
exports.preciseEphemerisSamplesFromSamples = preciseEphemerisSamplesFromSamples;
|
|
16368
|
+
|
|
16369
|
+
/**
|
|
16370
|
+
* Predict observables for many `(satellite, receiver, epoch)` requests from a
|
|
16371
|
+
* broadcast ephemeris store, serially. See [`predictBatchSp3`] for the argument
|
|
16372
|
+
* shapes. Delegates to the serial `sidereon_core::observables::predict_batch`.
|
|
16373
|
+
* @param {BroadcastEphemeris} broadcast
|
|
16374
|
+
* @param {string[]} satellites
|
|
16375
|
+
* @param {Float64Array} receivers_ecef_m
|
|
16376
|
+
* @param {Float64Array} epochs_j2000_s
|
|
16377
|
+
* @param {any} options
|
|
16378
|
+
* @returns {PredictBatch}
|
|
16379
|
+
*/
|
|
16380
|
+
function predictBatchBroadcast(broadcast, satellites, receivers_ecef_m, epochs_j2000_s, options) {
|
|
16381
|
+
_assertClass(broadcast, BroadcastEphemeris);
|
|
16382
|
+
const ptr0 = passArrayJsValueToWasm0(satellites, wasm.__wbindgen_malloc);
|
|
16383
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16384
|
+
const ptr1 = passArrayF64ToWasm0(receivers_ecef_m, wasm.__wbindgen_malloc);
|
|
16385
|
+
const len1 = WASM_VECTOR_LEN;
|
|
16386
|
+
const ptr2 = passArrayF64ToWasm0(epochs_j2000_s, wasm.__wbindgen_malloc);
|
|
16387
|
+
const len2 = WASM_VECTOR_LEN;
|
|
16388
|
+
const ret = wasm.predictBatchBroadcast(broadcast.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, options);
|
|
16389
|
+
if (ret[2]) {
|
|
16390
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16391
|
+
}
|
|
16392
|
+
return PredictBatch.__wrap(ret[0]);
|
|
16393
|
+
}
|
|
16394
|
+
exports.predictBatchBroadcast = predictBatchBroadcast;
|
|
16395
|
+
|
|
16396
|
+
/**
|
|
16397
|
+
* Predict observables for many `(satellite, receiver, epoch)` requests from an
|
|
16398
|
+
* SP3 precise product, serially.
|
|
16399
|
+
*
|
|
16400
|
+
* `satellites` is an array of satellite tokens, `receiversEcefM` a flat
|
|
16401
|
+
* row-major `(n, 3)` `Float64Array` of receiver ECEF positions (metres), and
|
|
16402
|
+
* `epochsJ2000S` a `Float64Array` of receive epochs (seconds since J2000); all
|
|
16403
|
+
* three are index-aligned and length `n`. Element `i` of the result corresponds
|
|
16404
|
+
* to request `i`. Delegates to the serial reference kernel
|
|
16405
|
+
* `sidereon_core::observables::predict_batch`; the binding never spawns the
|
|
16406
|
+
* rayon thread pool the parallel variant uses.
|
|
16407
|
+
* @param {Sp3} sp3
|
|
16408
|
+
* @param {string[]} satellites
|
|
16409
|
+
* @param {Float64Array} receivers_ecef_m
|
|
16410
|
+
* @param {Float64Array} epochs_j2000_s
|
|
16411
|
+
* @param {any} options
|
|
16412
|
+
* @returns {PredictBatch}
|
|
16413
|
+
*/
|
|
16414
|
+
function predictBatchSp3(sp3, satellites, receivers_ecef_m, epochs_j2000_s, options) {
|
|
16415
|
+
_assertClass(sp3, Sp3);
|
|
16416
|
+
const ptr0 = passArrayJsValueToWasm0(satellites, wasm.__wbindgen_malloc);
|
|
16417
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16418
|
+
const ptr1 = passArrayF64ToWasm0(receivers_ecef_m, wasm.__wbindgen_malloc);
|
|
16419
|
+
const len1 = WASM_VECTOR_LEN;
|
|
16420
|
+
const ptr2 = passArrayF64ToWasm0(epochs_j2000_s, wasm.__wbindgen_malloc);
|
|
16421
|
+
const len2 = WASM_VECTOR_LEN;
|
|
16422
|
+
const ret = wasm.predictBatchSp3(sp3.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, options);
|
|
16423
|
+
if (ret[2]) {
|
|
16424
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16425
|
+
}
|
|
16426
|
+
return PredictBatch.__wrap(ret[0]);
|
|
16427
|
+
}
|
|
16428
|
+
exports.predictBatchSp3 = predictBatchSp3;
|
|
16429
|
+
|
|
15384
16430
|
/**
|
|
15385
16431
|
* Prepare ionosphere-free single-frequency RTK arc inputs from a
|
|
15386
16432
|
* dual-frequency arc and fixed wide-lane ambiguities.
|
|
@@ -15843,6 +16889,27 @@ function shadowFraction(satellite_position_km, sun_position_km) {
|
|
|
15843
16889
|
}
|
|
15844
16890
|
exports.shadowFraction = shadowFraction;
|
|
15845
16891
|
|
|
16892
|
+
/**
|
|
16893
|
+
* Shapiro-Wilk normality test on a residual set.
|
|
16894
|
+
*
|
|
16895
|
+
* `x` is a `Float64Array` (at least three values). Returns `{ w, pValue }`,
|
|
16896
|
+
* Royston's AS R94 port that `scipy.stats.shapiro` uses; `w` is in `(0, 1]`
|
|
16897
|
+
* (closer to one is more Gaussian). Delegates to
|
|
16898
|
+
* `sidereon_core::quality::normality::shapiro_wilk`.
|
|
16899
|
+
* @param {Float64Array} x
|
|
16900
|
+
* @returns {any}
|
|
16901
|
+
*/
|
|
16902
|
+
function shapiroWilk(x) {
|
|
16903
|
+
const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
16904
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16905
|
+
const ret = wasm.shapiroWilk(ptr0, len0);
|
|
16906
|
+
if (ret[2]) {
|
|
16907
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16908
|
+
}
|
|
16909
|
+
return takeFromExternrefTable0(ret[0]);
|
|
16910
|
+
}
|
|
16911
|
+
exports.shapiroWilk = shapiroWilk;
|
|
16912
|
+
|
|
15846
16913
|
/**
|
|
15847
16914
|
* Build satellite-keyed pseudorange sigmas in metres from `{ satelliteId,
|
|
15848
16915
|
* elevationDeg, cn0Dbhz? }` entries. Invalid entries are dropped by the core.
|
|
@@ -15859,6 +16926,28 @@ function sigmas(entries, options) {
|
|
|
15859
16926
|
}
|
|
15860
16927
|
exports.sigmas = sigmas;
|
|
15861
16928
|
|
|
16929
|
+
/**
|
|
16930
|
+
* Sample skewness of a residual set.
|
|
16931
|
+
*
|
|
16932
|
+
* `x` is a `Float64Array`. `bias` (default `true`) selects the Fisher-Pearson
|
|
16933
|
+
* coefficient `g1 = m3 / m2^(3/2)` (`scipy.stats.skew`); `false` applies the
|
|
16934
|
+
* sample correction (`scipy.stats.skew(bias=False)`, needs at least three
|
|
16935
|
+
* values). Delegates to `sidereon_core::quality::normality::skewness`.
|
|
16936
|
+
* @param {Float64Array} x
|
|
16937
|
+
* @param {boolean | null} [bias]
|
|
16938
|
+
* @returns {number}
|
|
16939
|
+
*/
|
|
16940
|
+
function skewness(x, bias) {
|
|
16941
|
+
const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_malloc);
|
|
16942
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16943
|
+
const ret = wasm.skewness(ptr0, len0, isLikeNone(bias) ? 0xFFFFFF : bias ? 1 : 0);
|
|
16944
|
+
if (ret[2]) {
|
|
16945
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16946
|
+
}
|
|
16947
|
+
return ret[0];
|
|
16948
|
+
}
|
|
16949
|
+
exports.skewness = skewness;
|
|
16950
|
+
|
|
15862
16951
|
/**
|
|
15863
16952
|
* Stable lower-case label for a slip reason.
|
|
15864
16953
|
* @param {SlipReason} reason
|
|
@@ -16263,6 +17352,30 @@ function solveWithFallback(precise, broadcast, request, policy) {
|
|
|
16263
17352
|
}
|
|
16264
17353
|
exports.solveWithFallback = solveWithFallback;
|
|
16265
17354
|
|
|
17355
|
+
/**
|
|
17356
|
+
* Extract a parsed SP3 product as the canonical precise-ephemeris samples, one
|
|
17357
|
+
* per real position record in ascending epoch order.
|
|
17358
|
+
*
|
|
17359
|
+
* Returns an array of `{ sat, epoch, positionEcefM, clockS, clockEvent }`
|
|
17360
|
+
* objects. Round-tripping the result back through
|
|
17361
|
+
* [`preciseEphemerisSamplesFromSamples`] rebuilds an interpolatable source that
|
|
17362
|
+
* reproduces the SP3-parsed source's interpolated states and predicted ranges
|
|
17363
|
+
* to the documented round-trip precision (byte-identical for samples whose
|
|
17364
|
+
* meters are the faithful image of the fit nodes; see the core module docs).
|
|
17365
|
+
* Delegates to `sidereon_core::sp3::Sp3::precise_ephemeris_samples`.
|
|
17366
|
+
* @param {Sp3} sp3
|
|
17367
|
+
* @returns {any}
|
|
17368
|
+
*/
|
|
17369
|
+
function sp3PreciseEphemerisSamples(sp3) {
|
|
17370
|
+
_assertClass(sp3, Sp3);
|
|
17371
|
+
const ret = wasm.sp3PreciseEphemerisSamples(sp3.__wbg_ptr);
|
|
17372
|
+
if (ret[2]) {
|
|
17373
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
17374
|
+
}
|
|
17375
|
+
return takeFromExternrefTable0(ret[0]);
|
|
17376
|
+
}
|
|
17377
|
+
exports.sp3PreciseEphemerisSamples = sp3PreciseEphemerisSamples;
|
|
17378
|
+
|
|
16266
17379
|
/**
|
|
16267
17380
|
* Continuous seconds since J2000 for a split Julian date.
|
|
16268
17381
|
* @param {number} jd_whole
|
|
@@ -16343,6 +17456,28 @@ function sunAngle(satellite_position_km, sun_position_km) {
|
|
|
16343
17456
|
}
|
|
16344
17457
|
exports.sunAngle = sunAngle;
|
|
16345
17458
|
|
|
17459
|
+
/**
|
|
17460
|
+
* Topocentric azimuth/elevation/range of the Sun from a ground site.
|
|
17461
|
+
*
|
|
17462
|
+
* The station is geodetic (`latitudeDeg`, `longitudeDeg`, `altitudeKm`);
|
|
17463
|
+
* `epochUnixUs` is the UTC instant as unix microseconds. Returns
|
|
17464
|
+
* `{ azimuthDeg, elevationDeg, rangeKm }` (azimuth clockwise from north).
|
|
17465
|
+
* Delegates to `sidereon_core::astro::bodies::sun_az_el`.
|
|
17466
|
+
* @param {number} latitude_deg
|
|
17467
|
+
* @param {number} longitude_deg
|
|
17468
|
+
* @param {number} altitude_km
|
|
17469
|
+
* @param {bigint} epoch_unix_us
|
|
17470
|
+
* @returns {any}
|
|
17471
|
+
*/
|
|
17472
|
+
function sunAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us) {
|
|
17473
|
+
const ret = wasm.sunAzEl(latitude_deg, longitude_deg, altitude_km, epoch_unix_us);
|
|
17474
|
+
if (ret[2]) {
|
|
17475
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
17476
|
+
}
|
|
17477
|
+
return takeFromExternrefTable0(ret[0]);
|
|
17478
|
+
}
|
|
17479
|
+
exports.sunAzEl = sunAzEl;
|
|
17480
|
+
|
|
16346
17481
|
/**
|
|
16347
17482
|
* Sun elevation in degrees above the satellite local horizontal plane.
|
|
16348
17483
|
* @param {Float64Array} satellite_position_km
|
|
@@ -16398,6 +17533,23 @@ function sunMoonEci(epochs_unix_us) {
|
|
|
16398
17533
|
}
|
|
16399
17534
|
exports.sunMoonEci = sunMoonEci;
|
|
16400
17535
|
|
|
17536
|
+
/**
|
|
17537
|
+
* TAI-UTC (cumulative leap seconds) in effect on a UTC calendar date.
|
|
17538
|
+
*
|
|
17539
|
+
* This is **not** the GNSS "GPS - UTC" offset; for the quantity a GPS receiver
|
|
17540
|
+
* applies use [`gpsUtcOffsetS`] (they differ by a constant 19 s). Delegates to
|
|
17541
|
+
* `sidereon_core::astro::time::scales::tai_utc_offset_s`.
|
|
17542
|
+
* @param {number} year
|
|
17543
|
+
* @param {number} month
|
|
17544
|
+
* @param {number} day
|
|
17545
|
+
* @returns {number}
|
|
17546
|
+
*/
|
|
17547
|
+
function taiUtcOffsetS(year, month, day) {
|
|
17548
|
+
const ret = wasm.taiUtcOffsetS(year, month, day);
|
|
17549
|
+
return ret;
|
|
17550
|
+
}
|
|
17551
|
+
exports.taiUtcOffsetS = taiUtcOffsetS;
|
|
17552
|
+
|
|
16401
17553
|
/**
|
|
16402
17554
|
* Transform a batch of TEME states to GCRS, each at its own epoch.
|
|
16403
17555
|
*
|
|
@@ -16494,8 +17646,8 @@ exports.timescaleOffsetAtS = timescaleOffsetAtS;
|
|
|
16494
17646
|
*
|
|
16495
17647
|
* Covers the atomic scales (TAI/TT/GPST/GST/QZSST/BDT), whose mutual offsets
|
|
16496
17648
|
* are constants fixed by their ICDs. Throws a `RangeError` when either scale is
|
|
16497
|
-
* UTC-based (`Utc`/`Glonasst`)
|
|
16498
|
-
* epoch-dependent and needs [`timescaleOffsetAtS`]
|
|
17649
|
+
* UTC-based (`Utc`/`Glonasst`): those carry leap seconds, so their offset is
|
|
17650
|
+
* epoch-dependent and needs [`timescaleOffsetAtS`], or for `Tdb` (no fixed
|
|
16499
17651
|
* offset; resolve it through an `Instant`).
|
|
16500
17652
|
* @param {TimeScale} from
|
|
16501
17653
|
* @param {TimeScale} to
|
|
@@ -16996,6 +18148,14 @@ function __wbg_get_imports() {
|
|
|
16996
18148
|
const ret = LookAngles.__wrap(arg0);
|
|
16997
18149
|
return ret;
|
|
16998
18150
|
},
|
|
18151
|
+
__wbg_moonelevationcrossing_new: function(arg0) {
|
|
18152
|
+
const ret = MoonElevationCrossing.__wrap(arg0);
|
|
18153
|
+
return ret;
|
|
18154
|
+
},
|
|
18155
|
+
__wbg_moontransit_new: function(arg0) {
|
|
18156
|
+
const ret = MoonTransit.__wrap(arg0);
|
|
18157
|
+
return ret;
|
|
18158
|
+
},
|
|
16999
18159
|
__wbg_movingbaselinesolution_new: function(arg0) {
|
|
17000
18160
|
const ret = MovingBaselineSolution.__wrap(arg0);
|
|
17001
18161
|
return ret;
|
|
@@ -17280,6 +18440,9 @@ const EncounterFrameFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
17280
18440
|
const EphemerisFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17281
18441
|
? { register: () => {}, unregister: () => {} }
|
|
17282
18442
|
: new FinalizationRegistry(ptr => wasm.__wbg_ephemeris_free(ptr, 1));
|
|
18443
|
+
const ErrorEllipse2Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
18444
|
+
? { register: () => {}, unregister: () => {} }
|
|
18445
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_errorellipse2_free(ptr, 1));
|
|
17283
18446
|
const FdeSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17284
18447
|
? { register: () => {}, unregister: () => {} }
|
|
17285
18448
|
: new FinalizationRegistry(ptr => wasm.__wbg_fdesolution_free(ptr, 1));
|
|
@@ -17358,6 +18521,12 @@ const LambertTransferFinalization = (typeof FinalizationRegistry === 'undefined'
|
|
|
17358
18521
|
const LeapSecondTableFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17359
18522
|
? { register: () => {}, unregister: () => {} }
|
|
17360
18523
|
: new FinalizationRegistry(ptr => wasm.__wbg_leapsecondtable_free(ptr, 1));
|
|
18524
|
+
const LeastSquaresDropOneReportFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18525
|
+
? { register: () => {}, unregister: () => {} }
|
|
18526
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_leastsquaresdroponereport_free(ptr, 1));
|
|
18527
|
+
const LeastSquaresResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18528
|
+
? { register: () => {}, unregister: () => {} }
|
|
18529
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_leastsquaresresult_free(ptr, 1));
|
|
17361
18530
|
const LinkBudgetFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17362
18531
|
? { register: () => {}, unregister: () => {} }
|
|
17363
18532
|
: new FinalizationRegistry(ptr => wasm.__wbg_linkbudget_free(ptr, 1));
|
|
@@ -17373,6 +18542,12 @@ const LookAnglesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
17373
18542
|
const MappingFactorsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17374
18543
|
? { register: () => {}, unregister: () => {} }
|
|
17375
18544
|
: new FinalizationRegistry(ptr => wasm.__wbg_mappingfactors_free(ptr, 1));
|
|
18545
|
+
const MoonElevationCrossingFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18546
|
+
? { register: () => {}, unregister: () => {} }
|
|
18547
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_moonelevationcrossing_free(ptr, 1));
|
|
18548
|
+
const MoonTransitFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18549
|
+
? { register: () => {}, unregister: () => {} }
|
|
18550
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_moontransit_free(ptr, 1));
|
|
17376
18551
|
const MovingBaselineSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17377
18552
|
? { register: () => {}, unregister: () => {} }
|
|
17378
18553
|
: new FinalizationRegistry(ptr => wasm.__wbg_movingbaselinesolution_free(ptr, 1));
|
|
@@ -17454,6 +18629,12 @@ const PppFixedSolutionFinalization = (typeof FinalizationRegistry === 'undefined
|
|
|
17454
18629
|
const PppFloatSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17455
18630
|
? { register: () => {}, unregister: () => {} }
|
|
17456
18631
|
: new FinalizationRegistry(ptr => wasm.__wbg_pppfloatsolution_free(ptr, 1));
|
|
18632
|
+
const PreciseEphemerisSampleSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18633
|
+
? { register: () => {}, unregister: () => {} }
|
|
18634
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_preciseephemerissamplesource_free(ptr, 1));
|
|
18635
|
+
const PredictBatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18636
|
+
? { register: () => {}, unregister: () => {} }
|
|
18637
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_predictbatch_free(ptr, 1));
|
|
17457
18638
|
const PredictedObservablesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
17458
18639
|
? { register: () => {}, unregister: () => {} }
|
|
17459
18640
|
: new FinalizationRegistry(ptr => wasm.__wbg_predictedobservables_free(ptr, 1));
|