@neilberkman/sidereon 0.24.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.
@@ -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
@@ -27042,6 +27223,26 @@ function raimFdeDesign(rows, options) {
27042
27223
  }
27043
27224
  exports.raimFdeDesign = raimFdeDesign;
27044
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
+
27045
27246
  /**
27046
27247
  * Convert a pseudorange rate in metres per second to Doppler shift in hertz.
27047
27248
  * @param {number} range_rate_m_s
@@ -28383,6 +28584,29 @@ function solveRtkFloat(config) {
28383
28584
  }
28384
28585
  exports.solveRtkFloat = solveRtkFloat;
28385
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
+
28386
28610
  /**
28387
28611
  * Solve SPP using an SBAS-corrected broadcast source and optional SBAS iono.
28388
28612
  *
@@ -28750,6 +28974,28 @@ function splitJdToJ2000Seconds(jd_whole, jd_fraction) {
28750
28974
  }
28751
28975
  exports.splitJdToJ2000Seconds = splitJdToJ2000Seconds;
28752
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
+
28753
28999
  /**
28754
29000
  * @param {BroadcastEphemeris} broadcast
28755
29001
  * @param {SsrCorrectionStore} store
@@ -30413,6 +30659,9 @@ const RinexObsFinalization = (typeof FinalizationRegistry === 'undefined')
30413
30659
  const RinexObsRepairFinalization = (typeof FinalizationRegistry === 'undefined')
30414
30660
  ? { register: () => {}, unregister: () => {} }
30415
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));
30416
30665
  const RtcmLockTimeTrackerFinalization = (typeof FinalizationRegistry === 'undefined')
30417
30666
  ? { register: () => {}, unregister: () => {} }
30418
30667
  : new FinalizationRegistry(ptr => wasm.__wbg_rtcmlocktimetracker_free(ptr, 1));
Binary file