@neilberkman/sidereon 0.23.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -13
- package/package.json +1 -1
- package/pkg/sidereon.d.ts +2291 -1628
- package/pkg/sidereon.js +265 -3
- package/pkg/sidereon_bg.wasm +0 -0
- package/pkg/sidereon_bg.wasm.d.ts +1748 -1733
- package/pkg-node/sidereon.d.ts +721 -73
- package/pkg-node/sidereon.js +274 -3
- package/pkg-node/sidereon_bg.wasm +0 -0
- package/pkg-node/sidereon_bg.wasm.d.ts +1748 -1733
package/pkg-node/sidereon.js
CHANGED
|
@@ -920,6 +920,22 @@ class BroadcastEphemeris {
|
|
|
920
920
|
}
|
|
921
921
|
return ret[0] === 0 ? undefined : BroadcastStoreEvaluation.__wrap(ret[0]);
|
|
922
922
|
}
|
|
923
|
+
/**
|
|
924
|
+
* Run fault detection and exclusion against this broadcast ephemeris.
|
|
925
|
+
*
|
|
926
|
+
* `request` is the SPP solve request plus the RAIM/exclusion options, the
|
|
927
|
+
* same object accepted by `Sp3.fde`. Delegates to
|
|
928
|
+
* `sidereon_core::quality::fde_spp` over the broadcast store.
|
|
929
|
+
* @param {any} request
|
|
930
|
+
* @returns {FdeSolution}
|
|
931
|
+
*/
|
|
932
|
+
fde(request) {
|
|
933
|
+
const ret = wasm.broadcastephemeris_fde(this.__wbg_ptr, request);
|
|
934
|
+
if (ret[2]) {
|
|
935
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
936
|
+
}
|
|
937
|
+
return FdeSolution.__wrap(ret[0]);
|
|
938
|
+
}
|
|
923
939
|
/**
|
|
924
940
|
* Number of usable GLONASS records.
|
|
925
941
|
* @returns {number}
|
|
@@ -14664,6 +14680,91 @@ class RinexObsRepair {
|
|
|
14664
14680
|
if (Symbol.dispose) RinexObsRepair.prototype[Symbol.dispose] = RinexObsRepair.prototype.free;
|
|
14665
14681
|
exports.RinexObsRepair = RinexObsRepair;
|
|
14666
14682
|
|
|
14683
|
+
/**
|
|
14684
|
+
* Per-epoch results returned by `solveSppFromRinexObs`.
|
|
14685
|
+
*/
|
|
14686
|
+
class RinexSppSolutionBatch {
|
|
14687
|
+
static __wrap(ptr) {
|
|
14688
|
+
const obj = Object.create(RinexSppSolutionBatch.prototype);
|
|
14689
|
+
obj.__wbg_ptr = ptr;
|
|
14690
|
+
RinexSppSolutionBatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
14691
|
+
return obj;
|
|
14692
|
+
}
|
|
14693
|
+
__destroy_into_raw() {
|
|
14694
|
+
const ptr = this.__wbg_ptr;
|
|
14695
|
+
this.__wbg_ptr = 0;
|
|
14696
|
+
RinexSppSolutionBatchFinalization.unregister(this);
|
|
14697
|
+
return ptr;
|
|
14698
|
+
}
|
|
14699
|
+
free() {
|
|
14700
|
+
const ptr = this.__destroy_into_raw();
|
|
14701
|
+
wasm.__wbg_rinexsppsolutionbatch_free(ptr, 0);
|
|
14702
|
+
}
|
|
14703
|
+
/**
|
|
14704
|
+
* Number of assembled RINEX epochs in the batch.
|
|
14705
|
+
* @returns {number}
|
|
14706
|
+
*/
|
|
14707
|
+
get count() {
|
|
14708
|
+
const ret = wasm.rinexsppsolutionbatch_count(this.__wbg_ptr);
|
|
14709
|
+
return ret >>> 0;
|
|
14710
|
+
}
|
|
14711
|
+
/**
|
|
14712
|
+
* Original RINEX OBS epoch index for assembled batch item `index`.
|
|
14713
|
+
* @param {number} index
|
|
14714
|
+
* @returns {number}
|
|
14715
|
+
*/
|
|
14716
|
+
epochIndex(index) {
|
|
14717
|
+
const ret = wasm.rinexsppsolutionbatch_epochIndex(this.__wbg_ptr, index);
|
|
14718
|
+
if (ret[2]) {
|
|
14719
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14720
|
+
}
|
|
14721
|
+
return ret[0] >>> 0;
|
|
14722
|
+
}
|
|
14723
|
+
/**
|
|
14724
|
+
* The solve error for assembled batch item `index`, or `undefined`.
|
|
14725
|
+
* @param {number} index
|
|
14726
|
+
* @returns {string | undefined}
|
|
14727
|
+
*/
|
|
14728
|
+
error(index) {
|
|
14729
|
+
const ret = wasm.rinexsppsolutionbatch_error(this.__wbg_ptr, index);
|
|
14730
|
+
if (ret[3]) {
|
|
14731
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
14732
|
+
}
|
|
14733
|
+
let v1;
|
|
14734
|
+
if (ret[0] !== 0) {
|
|
14735
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
14736
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
14737
|
+
}
|
|
14738
|
+
return v1;
|
|
14739
|
+
}
|
|
14740
|
+
/**
|
|
14741
|
+
* Whether assembled batch item `index` converged to a solution.
|
|
14742
|
+
* @param {number} index
|
|
14743
|
+
* @returns {boolean}
|
|
14744
|
+
*/
|
|
14745
|
+
isOk(index) {
|
|
14746
|
+
const ret = wasm.rinexsppsolutionbatch_isOk(this.__wbg_ptr, index);
|
|
14747
|
+
if (ret[2]) {
|
|
14748
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14749
|
+
}
|
|
14750
|
+
return ret[0] !== 0;
|
|
14751
|
+
}
|
|
14752
|
+
/**
|
|
14753
|
+
* The SPP solution for assembled batch item `index`.
|
|
14754
|
+
* @param {number} index
|
|
14755
|
+
* @returns {SppSolution}
|
|
14756
|
+
*/
|
|
14757
|
+
solution(index) {
|
|
14758
|
+
const ret = wasm.rinexsppsolutionbatch_solution(this.__wbg_ptr, index);
|
|
14759
|
+
if (ret[2]) {
|
|
14760
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14761
|
+
}
|
|
14762
|
+
return SppSolution.__wrap(ret[0]);
|
|
14763
|
+
}
|
|
14764
|
+
}
|
|
14765
|
+
if (Symbol.dispose) RinexSppSolutionBatch.prototype[Symbol.dispose] = RinexSppSolutionBatch.prototype.free;
|
|
14766
|
+
exports.RinexSppSolutionBatch = RinexSppSolutionBatch;
|
|
14767
|
+
|
|
14667
14768
|
/**
|
|
14668
14769
|
* Stateful MSM lock-time tracker for deriving RINEX LLI continuity bits.
|
|
14669
14770
|
*/
|
|
@@ -21235,6 +21336,21 @@ function atmosphereSpaceWeatherDefaults() {
|
|
|
21235
21336
|
}
|
|
21236
21337
|
exports.atmosphereSpaceWeatherDefaults = atmosphereSpaceWeatherDefaults;
|
|
21237
21338
|
|
|
21339
|
+
/**
|
|
21340
|
+
* Circular autocorrelation over all lags for a bipolar code vector.
|
|
21341
|
+
* @param {Int8Array} code
|
|
21342
|
+
* @returns {Int32Array}
|
|
21343
|
+
*/
|
|
21344
|
+
function autocorrelation(code) {
|
|
21345
|
+
const ptr0 = passArray8ToWasm0(code, wasm.__wbindgen_malloc);
|
|
21346
|
+
const len0 = WASM_VECTOR_LEN;
|
|
21347
|
+
const ret = wasm.autocorrelation(ptr0, len0);
|
|
21348
|
+
var v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice();
|
|
21349
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
21350
|
+
return v2;
|
|
21351
|
+
}
|
|
21352
|
+
exports.autocorrelation = autocorrelation;
|
|
21353
|
+
|
|
21238
21354
|
/**
|
|
21239
21355
|
* Solar beta angle in degrees from orbit normal and Sun vectors.
|
|
21240
21356
|
* @param {Float64Array} orbit_normal
|
|
@@ -21705,6 +21821,50 @@ function correlate(iq, prn, options) {
|
|
|
21705
21821
|
}
|
|
21706
21822
|
exports.correlate = correlate;
|
|
21707
21823
|
|
|
21824
|
+
/**
|
|
21825
|
+
* Coherently correlate interleaved IQ samples against an explicit bipolar code.
|
|
21826
|
+
*
|
|
21827
|
+
* `iq` is `[i0, q0, i1, q1, ...]`. The coherent sum follows the core
|
|
21828
|
+
* `zip(iq, code)` semantics and therefore uses the shorter non-empty input.
|
|
21829
|
+
* @param {Float64Array} iq
|
|
21830
|
+
* @param {Int8Array} code
|
|
21831
|
+
* @param {number} sample_rate_hz
|
|
21832
|
+
* @param {number} doppler_hz
|
|
21833
|
+
* @returns {CorrelationResult}
|
|
21834
|
+
*/
|
|
21835
|
+
function correlateAgainst(iq, code, sample_rate_hz, doppler_hz) {
|
|
21836
|
+
const ptr0 = passArrayF64ToWasm0(iq, wasm.__wbindgen_malloc);
|
|
21837
|
+
const len0 = WASM_VECTOR_LEN;
|
|
21838
|
+
const ptr1 = passArray8ToWasm0(code, wasm.__wbindgen_malloc);
|
|
21839
|
+
const len1 = WASM_VECTOR_LEN;
|
|
21840
|
+
const ret = wasm.correlateAgainst(ptr0, len0, ptr1, len1, sample_rate_hz, doppler_hz);
|
|
21841
|
+
if (ret[2]) {
|
|
21842
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
21843
|
+
}
|
|
21844
|
+
return CorrelationResult.__wrap(ret[0]);
|
|
21845
|
+
}
|
|
21846
|
+
exports.correlateAgainst = correlateAgainst;
|
|
21847
|
+
|
|
21848
|
+
/**
|
|
21849
|
+
* Single-lag circular correlation for two equal-length bipolar codes.
|
|
21850
|
+
* @param {Int8Array} code_a
|
|
21851
|
+
* @param {Int8Array} code_b
|
|
21852
|
+
* @param {bigint} lag
|
|
21853
|
+
* @returns {number}
|
|
21854
|
+
*/
|
|
21855
|
+
function correlationAt(code_a, code_b, lag) {
|
|
21856
|
+
const ptr0 = passArray8ToWasm0(code_a, wasm.__wbindgen_malloc);
|
|
21857
|
+
const len0 = WASM_VECTOR_LEN;
|
|
21858
|
+
const ptr1 = passArray8ToWasm0(code_b, wasm.__wbindgen_malloc);
|
|
21859
|
+
const len1 = WASM_VECTOR_LEN;
|
|
21860
|
+
const ret = wasm.correlationAt(ptr0, len0, ptr1, len1, lag);
|
|
21861
|
+
if (ret[2]) {
|
|
21862
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
21863
|
+
}
|
|
21864
|
+
return ret[0];
|
|
21865
|
+
}
|
|
21866
|
+
exports.correlationAt = correlationAt;
|
|
21867
|
+
|
|
21708
21868
|
/**
|
|
21709
21869
|
* Fitted parameter covariance from a converged solve, scaling `(J^T J)^-1` by
|
|
21710
21870
|
* the post-fit reduced chi-square `s_sq = 2 * cost / (m - n)` (the same scale
|
|
@@ -21792,6 +21952,27 @@ function coverageLookAngles(satellites, stations, epoch_unix_us) {
|
|
|
21792
21952
|
}
|
|
21793
21953
|
exports.coverageLookAngles = coverageLookAngles;
|
|
21794
21954
|
|
|
21955
|
+
/**
|
|
21956
|
+
* Circular cross-correlation over all lags for two equal-length bipolar codes.
|
|
21957
|
+
* @param {Int8Array} code_a
|
|
21958
|
+
* @param {Int8Array} code_b
|
|
21959
|
+
* @returns {Int32Array}
|
|
21960
|
+
*/
|
|
21961
|
+
function crossCorrelation(code_a, code_b) {
|
|
21962
|
+
const ptr0 = passArray8ToWasm0(code_a, wasm.__wbindgen_malloc);
|
|
21963
|
+
const len0 = WASM_VECTOR_LEN;
|
|
21964
|
+
const ptr1 = passArray8ToWasm0(code_b, wasm.__wbindgen_malloc);
|
|
21965
|
+
const len1 = WASM_VECTOR_LEN;
|
|
21966
|
+
const ret = wasm.crossCorrelation(ptr0, len0, ptr1, len1);
|
|
21967
|
+
if (ret[3]) {
|
|
21968
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
21969
|
+
}
|
|
21970
|
+
var v3 = getArrayI32FromWasm0(ret[0], ret[1]).slice();
|
|
21971
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
21972
|
+
return v3;
|
|
21973
|
+
}
|
|
21974
|
+
exports.crossCorrelation = crossCorrelation;
|
|
21975
|
+
|
|
21795
21976
|
/**
|
|
21796
21977
|
* @param {any} rel
|
|
21797
21978
|
* @param {number} n_rad_s
|
|
@@ -26996,6 +27177,27 @@ function pseudorangeVariance(elevation_deg, options) {
|
|
|
26996
27177
|
}
|
|
26997
27178
|
exports.pseudorangeVariance = pseudorangeVariance;
|
|
26998
27179
|
|
|
27180
|
+
/**
|
|
27181
|
+
* Run direct post-solve residual RAIM.
|
|
27182
|
+
*
|
|
27183
|
+
* `input` is `{ usedSats, residualsM }`. Use `options` fields `pFa`,
|
|
27184
|
+
* `nSystems`, and either `weights` or `weightEntries` with `varianceOptions`.
|
|
27185
|
+
* The result has the fault flag, chi-square statistic, threshold, largest
|
|
27186
|
+
* normalized residual satellite, reduced chi-square, normalized residual map,
|
|
27187
|
+
* RMS residual, and degrees of freedom.
|
|
27188
|
+
* @param {any} input
|
|
27189
|
+
* @param {any} options
|
|
27190
|
+
* @returns {any}
|
|
27191
|
+
*/
|
|
27192
|
+
function raim(input, options) {
|
|
27193
|
+
const ret = wasm.raim(input, options);
|
|
27194
|
+
if (ret[2]) {
|
|
27195
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
27196
|
+
}
|
|
27197
|
+
return takeFromExternrefTable0(ret[0]);
|
|
27198
|
+
}
|
|
27199
|
+
exports.raim = raim;
|
|
27200
|
+
|
|
26999
27201
|
/**
|
|
27000
27202
|
* Run standalone range RAIM/FDE over a linearized measurement set.
|
|
27001
27203
|
*
|
|
@@ -27004,9 +27206,10 @@ exports.pseudorangeVariance = pseudorangeVariance;
|
|
|
27004
27206
|
* estimated state dimension). `options` is an optional `{ pFa?, maxExclusions?,
|
|
27005
27207
|
* minRedundancy? }` object (pass `undefined` for the core defaults). Returns the
|
|
27006
27208
|
* protected state correction, covariance, global chi-square test, the excluded
|
|
27007
|
-
* ids, the per-measurement diagnostics, and the exclusion count.
|
|
27008
|
-
* `sidereon_core::quality::raim_fde_design`.
|
|
27009
|
-
* input
|
|
27209
|
+
* ids, the per-measurement diagnostics, and the exclusion count. FDE
|
|
27210
|
+
* computation runs in `sidereon_core::quality::raim_fde_design`.
|
|
27211
|
+
* Malformed input throws a `TypeError`; a rank-deficient or rejected set throws
|
|
27212
|
+
* an `Error`.
|
|
27010
27213
|
* @param {any} rows
|
|
27011
27214
|
* @param {any} options
|
|
27012
27215
|
* @returns {any}
|
|
@@ -27020,6 +27223,26 @@ function raimFdeDesign(rows, options) {
|
|
|
27020
27223
|
}
|
|
27021
27224
|
exports.raimFdeDesign = raimFdeDesign;
|
|
27022
27225
|
|
|
27226
|
+
/**
|
|
27227
|
+
* Run residual chi-square RAIM directly over an existing SPP solution.
|
|
27228
|
+
*
|
|
27229
|
+
* `solution` is a `SppSolution` from `solveSpp`, `solveBroadcast`, fallback,
|
|
27230
|
+
* or a RINEX OBS convenience result. `options` is the same `RaimOptions` object
|
|
27231
|
+
* accepted by `raim`; omit it for the core defaults.
|
|
27232
|
+
* @param {SppSolution} solution
|
|
27233
|
+
* @param {any} options
|
|
27234
|
+
* @returns {any}
|
|
27235
|
+
*/
|
|
27236
|
+
function raimForSolution(solution, options) {
|
|
27237
|
+
_assertClass(solution, SppSolution);
|
|
27238
|
+
const ret = wasm.raimForSolution(solution.__wbg_ptr, options);
|
|
27239
|
+
if (ret[2]) {
|
|
27240
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
27241
|
+
}
|
|
27242
|
+
return takeFromExternrefTable0(ret[0]);
|
|
27243
|
+
}
|
|
27244
|
+
exports.raimForSolution = raimForSolution;
|
|
27245
|
+
|
|
27023
27246
|
/**
|
|
27024
27247
|
* Convert a pseudorange rate in metres per second to Doppler shift in hertz.
|
|
27025
27248
|
* @param {number} range_rate_m_s
|
|
@@ -28361,6 +28584,29 @@ function solveRtkFloat(config) {
|
|
|
28361
28584
|
}
|
|
28362
28585
|
exports.solveRtkFloat = solveRtkFloat;
|
|
28363
28586
|
|
|
28587
|
+
/**
|
|
28588
|
+
* Solve parsed RINEX OBS epochs serially against a broadcast ephemeris store.
|
|
28589
|
+
*
|
|
28590
|
+
* `rinexOptions` controls observation assembly; `solveOptions` accepts
|
|
28591
|
+
* `withGeodetic`, `maxPdop`, and `coarseSearchSeeds`. The returned batch keeps
|
|
28592
|
+
* per-epoch solve failures, so use `isOk(index)` before `solution(index)`.
|
|
28593
|
+
* @param {BroadcastEphemeris} source
|
|
28594
|
+
* @param {RinexObs} obs
|
|
28595
|
+
* @param {any} rinex_options
|
|
28596
|
+
* @param {any} solve_options
|
|
28597
|
+
* @returns {RinexSppSolutionBatch}
|
|
28598
|
+
*/
|
|
28599
|
+
function solveSppFromRinexObs(source, obs, rinex_options, solve_options) {
|
|
28600
|
+
_assertClass(source, BroadcastEphemeris);
|
|
28601
|
+
_assertClass(obs, RinexObs);
|
|
28602
|
+
const ret = wasm.solveSppFromRinexObs(source.__wbg_ptr, obs.__wbg_ptr, rinex_options, solve_options);
|
|
28603
|
+
if (ret[2]) {
|
|
28604
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
28605
|
+
}
|
|
28606
|
+
return RinexSppSolutionBatch.__wrap(ret[0]);
|
|
28607
|
+
}
|
|
28608
|
+
exports.solveSppFromRinexObs = solveSppFromRinexObs;
|
|
28609
|
+
|
|
28364
28610
|
/**
|
|
28365
28611
|
* Solve SPP using an SBAS-corrected broadcast source and optional SBAS iono.
|
|
28366
28612
|
*
|
|
@@ -28728,6 +28974,28 @@ function splitJdToJ2000Seconds(jd_whole, jd_fraction) {
|
|
|
28728
28974
|
}
|
|
28729
28975
|
exports.splitJdToJ2000Seconds = splitJdToJ2000Seconds;
|
|
28730
28976
|
|
|
28977
|
+
/**
|
|
28978
|
+
* Assemble parsed RINEX OBS epochs into broadcast-backed SPP solve inputs.
|
|
28979
|
+
*
|
|
28980
|
+
* `source` is a parsed RINEX NAV broadcast store. `options` accepts
|
|
28981
|
+
* `signalPolicy`, `corrections`, `initialGuess`, `satellites`, `met`, and
|
|
28982
|
+
* `robust`; omit it for the core default policy for the observation file.
|
|
28983
|
+
* @param {BroadcastEphemeris} source
|
|
28984
|
+
* @param {RinexObs} obs
|
|
28985
|
+
* @param {any} options
|
|
28986
|
+
* @returns {any}
|
|
28987
|
+
*/
|
|
28988
|
+
function sppInputsFromRinexObs(source, obs, options) {
|
|
28989
|
+
_assertClass(source, BroadcastEphemeris);
|
|
28990
|
+
_assertClass(obs, RinexObs);
|
|
28991
|
+
const ret = wasm.sppInputsFromRinexObs(source.__wbg_ptr, obs.__wbg_ptr, options);
|
|
28992
|
+
if (ret[2]) {
|
|
28993
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
28994
|
+
}
|
|
28995
|
+
return takeFromExternrefTable0(ret[0]);
|
|
28996
|
+
}
|
|
28997
|
+
exports.sppInputsFromRinexObs = sppInputsFromRinexObs;
|
|
28998
|
+
|
|
28731
28999
|
/**
|
|
28732
29000
|
* @param {BroadcastEphemeris} broadcast
|
|
28733
29001
|
* @param {SsrCorrectionStore} store
|
|
@@ -30391,6 +30659,9 @@ const RinexObsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
30391
30659
|
const RinexObsRepairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
30392
30660
|
? { register: () => {}, unregister: () => {} }
|
|
30393
30661
|
: new FinalizationRegistry(ptr => wasm.__wbg_rinexobsrepair_free(ptr, 1));
|
|
30662
|
+
const RinexSppSolutionBatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
30663
|
+
? { register: () => {}, unregister: () => {} }
|
|
30664
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rinexsppsolutionbatch_free(ptr, 1));
|
|
30394
30665
|
const RtcmLockTimeTrackerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
30395
30666
|
? { register: () => {}, unregister: () => {} }
|
|
30396
30667
|
: new FinalizationRegistry(ptr => wasm.__wbg_rtcmlocktimetracker_free(ptr, 1));
|
|
Binary file
|