@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.
package/pkg/sidereon.js CHANGED
@@ -910,6 +910,22 @@ export class BroadcastEphemeris {
910
910
  }
911
911
  return ret[0] === 0 ? undefined : BroadcastStoreEvaluation.__wrap(ret[0]);
912
912
  }
913
+ /**
914
+ * Run fault detection and exclusion against this broadcast ephemeris.
915
+ *
916
+ * `request` is the SPP solve request plus the RAIM/exclusion options, the
917
+ * same object accepted by `Sp3.fde`. Delegates to
918
+ * `sidereon_core::quality::fde_spp` over the broadcast store.
919
+ * @param {any} request
920
+ * @returns {FdeSolution}
921
+ */
922
+ fde(request) {
923
+ const ret = wasm.broadcastephemeris_fde(this.__wbg_ptr, request);
924
+ if (ret[2]) {
925
+ throw takeFromExternrefTable0(ret[1]);
926
+ }
927
+ return FdeSolution.__wrap(ret[0]);
928
+ }
913
929
  /**
914
930
  * Number of usable GLONASS records.
915
931
  * @returns {number}
@@ -14501,6 +14517,90 @@ export class RinexObsRepair {
14501
14517
  }
14502
14518
  if (Symbol.dispose) RinexObsRepair.prototype[Symbol.dispose] = RinexObsRepair.prototype.free;
14503
14519
 
14520
+ /**
14521
+ * Per-epoch results returned by `solveSppFromRinexObs`.
14522
+ */
14523
+ export class RinexSppSolutionBatch {
14524
+ static __wrap(ptr) {
14525
+ const obj = Object.create(RinexSppSolutionBatch.prototype);
14526
+ obj.__wbg_ptr = ptr;
14527
+ RinexSppSolutionBatchFinalization.register(obj, obj.__wbg_ptr, obj);
14528
+ return obj;
14529
+ }
14530
+ __destroy_into_raw() {
14531
+ const ptr = this.__wbg_ptr;
14532
+ this.__wbg_ptr = 0;
14533
+ RinexSppSolutionBatchFinalization.unregister(this);
14534
+ return ptr;
14535
+ }
14536
+ free() {
14537
+ const ptr = this.__destroy_into_raw();
14538
+ wasm.__wbg_rinexsppsolutionbatch_free(ptr, 0);
14539
+ }
14540
+ /**
14541
+ * Number of assembled RINEX epochs in the batch.
14542
+ * @returns {number}
14543
+ */
14544
+ get count() {
14545
+ const ret = wasm.rinexsppsolutionbatch_count(this.__wbg_ptr);
14546
+ return ret >>> 0;
14547
+ }
14548
+ /**
14549
+ * Original RINEX OBS epoch index for assembled batch item `index`.
14550
+ * @param {number} index
14551
+ * @returns {number}
14552
+ */
14553
+ epochIndex(index) {
14554
+ const ret = wasm.rinexsppsolutionbatch_epochIndex(this.__wbg_ptr, index);
14555
+ if (ret[2]) {
14556
+ throw takeFromExternrefTable0(ret[1]);
14557
+ }
14558
+ return ret[0] >>> 0;
14559
+ }
14560
+ /**
14561
+ * The solve error for assembled batch item `index`, or `undefined`.
14562
+ * @param {number} index
14563
+ * @returns {string | undefined}
14564
+ */
14565
+ error(index) {
14566
+ const ret = wasm.rinexsppsolutionbatch_error(this.__wbg_ptr, index);
14567
+ if (ret[3]) {
14568
+ throw takeFromExternrefTable0(ret[2]);
14569
+ }
14570
+ let v1;
14571
+ if (ret[0] !== 0) {
14572
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
14573
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
14574
+ }
14575
+ return v1;
14576
+ }
14577
+ /**
14578
+ * Whether assembled batch item `index` converged to a solution.
14579
+ * @param {number} index
14580
+ * @returns {boolean}
14581
+ */
14582
+ isOk(index) {
14583
+ const ret = wasm.rinexsppsolutionbatch_isOk(this.__wbg_ptr, index);
14584
+ if (ret[2]) {
14585
+ throw takeFromExternrefTable0(ret[1]);
14586
+ }
14587
+ return ret[0] !== 0;
14588
+ }
14589
+ /**
14590
+ * The SPP solution for assembled batch item `index`.
14591
+ * @param {number} index
14592
+ * @returns {SppSolution}
14593
+ */
14594
+ solution(index) {
14595
+ const ret = wasm.rinexsppsolutionbatch_solution(this.__wbg_ptr, index);
14596
+ if (ret[2]) {
14597
+ throw takeFromExternrefTable0(ret[1]);
14598
+ }
14599
+ return SppSolution.__wrap(ret[0]);
14600
+ }
14601
+ }
14602
+ if (Symbol.dispose) RinexSppSolutionBatch.prototype[Symbol.dispose] = RinexSppSolutionBatch.prototype.free;
14603
+
14504
14604
  /**
14505
14605
  * Stateful MSM lock-time tracker for deriving RINEX LLI continuity bits.
14506
14606
  */
@@ -20985,6 +21085,20 @@ export function atmosphereSpaceWeatherDefaults() {
20985
21085
  return SpaceWeatherDefaults.__wrap(ret);
20986
21086
  }
20987
21087
 
21088
+ /**
21089
+ * Circular autocorrelation over all lags for a bipolar code vector.
21090
+ * @param {Int8Array} code
21091
+ * @returns {Int32Array}
21092
+ */
21093
+ export function autocorrelation(code) {
21094
+ const ptr0 = passArray8ToWasm0(code, wasm.__wbindgen_malloc);
21095
+ const len0 = WASM_VECTOR_LEN;
21096
+ const ret = wasm.autocorrelation(ptr0, len0);
21097
+ var v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice();
21098
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
21099
+ return v2;
21100
+ }
21101
+
20988
21102
  /**
20989
21103
  * Solar beta angle in degrees from orbit normal and Sun vectors.
20990
21104
  * @param {Float64Array} orbit_normal
@@ -21429,6 +21543,48 @@ export function correlate(iq, prn, options) {
21429
21543
  return CorrelationResult.__wrap(ret[0]);
21430
21544
  }
21431
21545
 
21546
+ /**
21547
+ * Coherently correlate interleaved IQ samples against an explicit bipolar code.
21548
+ *
21549
+ * `iq` is `[i0, q0, i1, q1, ...]`. The coherent sum follows the core
21550
+ * `zip(iq, code)` semantics and therefore uses the shorter non-empty input.
21551
+ * @param {Float64Array} iq
21552
+ * @param {Int8Array} code
21553
+ * @param {number} sample_rate_hz
21554
+ * @param {number} doppler_hz
21555
+ * @returns {CorrelationResult}
21556
+ */
21557
+ export function correlateAgainst(iq, code, sample_rate_hz, doppler_hz) {
21558
+ const ptr0 = passArrayF64ToWasm0(iq, wasm.__wbindgen_malloc);
21559
+ const len0 = WASM_VECTOR_LEN;
21560
+ const ptr1 = passArray8ToWasm0(code, wasm.__wbindgen_malloc);
21561
+ const len1 = WASM_VECTOR_LEN;
21562
+ const ret = wasm.correlateAgainst(ptr0, len0, ptr1, len1, sample_rate_hz, doppler_hz);
21563
+ if (ret[2]) {
21564
+ throw takeFromExternrefTable0(ret[1]);
21565
+ }
21566
+ return CorrelationResult.__wrap(ret[0]);
21567
+ }
21568
+
21569
+ /**
21570
+ * Single-lag circular correlation for two equal-length bipolar codes.
21571
+ * @param {Int8Array} code_a
21572
+ * @param {Int8Array} code_b
21573
+ * @param {bigint} lag
21574
+ * @returns {number}
21575
+ */
21576
+ export function correlationAt(code_a, code_b, lag) {
21577
+ const ptr0 = passArray8ToWasm0(code_a, wasm.__wbindgen_malloc);
21578
+ const len0 = WASM_VECTOR_LEN;
21579
+ const ptr1 = passArray8ToWasm0(code_b, wasm.__wbindgen_malloc);
21580
+ const len1 = WASM_VECTOR_LEN;
21581
+ const ret = wasm.correlationAt(ptr0, len0, ptr1, len1, lag);
21582
+ if (ret[2]) {
21583
+ throw takeFromExternrefTable0(ret[1]);
21584
+ }
21585
+ return ret[0];
21586
+ }
21587
+
21432
21588
  /**
21433
21589
  * Fitted parameter covariance from a converged solve, scaling `(J^T J)^-1` by
21434
21590
  * the post-fit reduced chi-square `s_sq = 2 * cost / (m - n)` (the same scale
@@ -21512,6 +21668,26 @@ export function coverageLookAngles(satellites, stations, epoch_unix_us) {
21512
21668
  return CoverageGrid.__wrap(ret[0]);
21513
21669
  }
21514
21670
 
21671
+ /**
21672
+ * Circular cross-correlation over all lags for two equal-length bipolar codes.
21673
+ * @param {Int8Array} code_a
21674
+ * @param {Int8Array} code_b
21675
+ * @returns {Int32Array}
21676
+ */
21677
+ export function crossCorrelation(code_a, code_b) {
21678
+ const ptr0 = passArray8ToWasm0(code_a, wasm.__wbindgen_malloc);
21679
+ const len0 = WASM_VECTOR_LEN;
21680
+ const ptr1 = passArray8ToWasm0(code_b, wasm.__wbindgen_malloc);
21681
+ const len1 = WASM_VECTOR_LEN;
21682
+ const ret = wasm.crossCorrelation(ptr0, len0, ptr1, len1);
21683
+ if (ret[3]) {
21684
+ throw takeFromExternrefTable0(ret[2]);
21685
+ }
21686
+ var v3 = getArrayI32FromWasm0(ret[0], ret[1]).slice();
21687
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
21688
+ return v3;
21689
+ }
21690
+
21515
21691
  /**
21516
21692
  * @param {any} rel
21517
21693
  * @param {number} n_rad_s
@@ -26498,6 +26674,25 @@ export function raimFdeDesign(rows, options) {
26498
26674
  return takeFromExternrefTable0(ret[0]);
26499
26675
  }
26500
26676
 
26677
+ /**
26678
+ * Run residual chi-square RAIM directly over an existing SPP solution.
26679
+ *
26680
+ * `solution` is a `SppSolution` from `solveSpp`, `solveBroadcast`, fallback,
26681
+ * or a RINEX OBS convenience result. `options` is the same `RaimOptions` object
26682
+ * accepted by `raim`; omit it for the core defaults.
26683
+ * @param {SppSolution} solution
26684
+ * @param {any} options
26685
+ * @returns {any}
26686
+ */
26687
+ export function raimForSolution(solution, options) {
26688
+ _assertClass(solution, SppSolution);
26689
+ const ret = wasm.raimForSolution(solution.__wbg_ptr, options);
26690
+ if (ret[2]) {
26691
+ throw takeFromExternrefTable0(ret[1]);
26692
+ }
26693
+ return takeFromExternrefTable0(ret[0]);
26694
+ }
26695
+
26501
26696
  /**
26502
26697
  * Convert a pseudorange rate in metres per second to Doppler shift in hertz.
26503
26698
  * @param {number} range_rate_m_s
@@ -27771,6 +27966,28 @@ export function solveRtkFloat(config) {
27771
27966
  return RtkFloatSolution.__wrap(ret[0]);
27772
27967
  }
27773
27968
 
27969
+ /**
27970
+ * Solve parsed RINEX OBS epochs serially against a broadcast ephemeris store.
27971
+ *
27972
+ * `rinexOptions` controls observation assembly; `solveOptions` accepts
27973
+ * `withGeodetic`, `maxPdop`, and `coarseSearchSeeds`. The returned batch keeps
27974
+ * per-epoch solve failures, so use `isOk(index)` before `solution(index)`.
27975
+ * @param {BroadcastEphemeris} source
27976
+ * @param {RinexObs} obs
27977
+ * @param {any} rinex_options
27978
+ * @param {any} solve_options
27979
+ * @returns {RinexSppSolutionBatch}
27980
+ */
27981
+ export function solveSppFromRinexObs(source, obs, rinex_options, solve_options) {
27982
+ _assertClass(source, BroadcastEphemeris);
27983
+ _assertClass(obs, RinexObs);
27984
+ const ret = wasm.solveSppFromRinexObs(source.__wbg_ptr, obs.__wbg_ptr, rinex_options, solve_options);
27985
+ if (ret[2]) {
27986
+ throw takeFromExternrefTable0(ret[1]);
27987
+ }
27988
+ return RinexSppSolutionBatch.__wrap(ret[0]);
27989
+ }
27990
+
27774
27991
  /**
27775
27992
  * Solve SPP using an SBAS-corrected broadcast source and optional SBAS iono.
27776
27993
  *
@@ -28120,6 +28337,27 @@ export function splitJdToJ2000Seconds(jd_whole, jd_fraction) {
28120
28337
  return ret;
28121
28338
  }
28122
28339
 
28340
+ /**
28341
+ * Assemble parsed RINEX OBS epochs into broadcast-backed SPP solve inputs.
28342
+ *
28343
+ * `source` is a parsed RINEX NAV broadcast store. `options` accepts
28344
+ * `signalPolicy`, `corrections`, `initialGuess`, `satellites`, `met`, and
28345
+ * `robust`; omit it for the core default policy for the observation file.
28346
+ * @param {BroadcastEphemeris} source
28347
+ * @param {RinexObs} obs
28348
+ * @param {any} options
28349
+ * @returns {any}
28350
+ */
28351
+ export function sppInputsFromRinexObs(source, obs, options) {
28352
+ _assertClass(source, BroadcastEphemeris);
28353
+ _assertClass(obs, RinexObs);
28354
+ const ret = wasm.sppInputsFromRinexObs(source.__wbg_ptr, obs.__wbg_ptr, options);
28355
+ if (ret[2]) {
28356
+ throw takeFromExternrefTable0(ret[1]);
28357
+ }
28358
+ return takeFromExternrefTable0(ret[0]);
28359
+ }
28360
+
28123
28361
  /**
28124
28362
  * @param {BroadcastEphemeris} broadcast
28125
28363
  * @param {SsrCorrectionStore} store
@@ -29743,6 +29981,9 @@ const RinexObsFinalization = (typeof FinalizationRegistry === 'undefined')
29743
29981
  const RinexObsRepairFinalization = (typeof FinalizationRegistry === 'undefined')
29744
29982
  ? { register: () => {}, unregister: () => {} }
29745
29983
  : new FinalizationRegistry(ptr => wasm.__wbg_rinexobsrepair_free(ptr, 1));
29984
+ const RinexSppSolutionBatchFinalization = (typeof FinalizationRegistry === 'undefined')
29985
+ ? { register: () => {}, unregister: () => {} }
29986
+ : new FinalizationRegistry(ptr => wasm.__wbg_rinexsppsolutionbatch_free(ptr, 1));
29746
29987
  const RtcmLockTimeTrackerFinalization = (typeof FinalizationRegistry === 'undefined')
29747
29988
  ? { register: () => {}, unregister: () => {} }
29748
29989
  : new FinalizationRegistry(ptr => wasm.__wbg_rtcmlocktimetracker_free(ptr, 1));
Binary file