@neilberkman/sidereon 0.9.1 → 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.
@@ -3663,6 +3663,29 @@ export class PppFloatSolution {
3663
3663
  readonly ztdResidualM: number | undefined;
3664
3664
  }
3665
3665
 
3666
+ /**
3667
+ * A precise-ephemeris source built from samples rather than parsed SP3 text.
3668
+ *
3669
+ * Implements the same `ObservableEphemerisSource` contract as a parsed [`Sp3`]
3670
+ * product and shares its interpolation substrate, so [`predictRanges`] accepts
3671
+ * either handle. Build one with [`preciseEphemerisSamplesFromSamples`].
3672
+ */
3673
+ export class PreciseEphemerisSampleSource {
3674
+ private constructor();
3675
+ free(): void;
3676
+ [Symbol.dispose](): void;
3677
+ /**
3678
+ * Predict geometric ranges for many requests in one call. See the shared
3679
+ * [`predictRanges`](crate::precise_samples::predict_ranges_over) contract;
3680
+ * this is the sample-source entry point.
3681
+ */
3682
+ predictRanges(requests: any, options: any): any;
3683
+ /**
3684
+ * The satellites this source can interpolate (e.g. `"G01"`), ascending.
3685
+ */
3686
+ readonly satellites: string[];
3687
+ }
3688
+
3666
3689
  /**
3667
3690
  * The per-request results of a batch observable prediction, index-aligned to
3668
3691
  * the input requests. Each request independently either produced observables or
@@ -4324,6 +4347,16 @@ export class Sp3 {
4324
4347
  * coverage gap (the engine refuses to extrapolate).
4325
4348
  */
4326
4349
  interpolate(satellite: string, j2000_seconds: Float64Array): Sp3Interpolation;
4350
+ /**
4351
+ * Predict geometric ranges for many `(satellite, receiver, epoch)` requests
4352
+ * against this ephemeris in one call. `requests` is an array of
4353
+ * `{ sat, receiverEcefM, tRxJ2000S }`; returns an array of
4354
+ * `{ geometricRangeM, satClockS, transmitTimeJ2000S, satPosEcefM }`
4355
+ * index-aligned to `requests`. The same call shape works on a
4356
+ * `PreciseEphemerisSampleSource`. Delegates to the serial reference kernel
4357
+ * `sidereon_core::observables::predict_ranges`.
4358
+ */
4359
+ predictRanges(requests: any, options: any): any;
4327
4360
  /**
4328
4361
  * Run single-point positioning against this ephemeris.
4329
4362
  *
@@ -6483,6 +6516,19 @@ export function phaseMeters(phi_cycles: number, f_hz: number): number;
6483
6516
  */
6484
6517
  export function pppCorrections(sp3: Sp3, epochs: any, receiver_ecef_m: Float64Array, options: any): any;
6485
6518
 
6519
+ /**
6520
+ * Build a sample-backed precise-ephemeris source from an array of samples.
6521
+ *
6522
+ * `samples` is an array of `{ sat, epoch, positionEcefM, clockS?, clockEvent? }`
6523
+ * objects (see the sample field docs). Samples are grouped by satellite in their
6524
+ * supplied order; each satellite needs at least two strictly time-increasing
6525
+ * samples. Throws a `TypeError` for a malformed object or bad satellite token
6526
+ * and a `RangeError` for a non-finite epoch or a source validation failure
6527
+ * (empty input, a single-sample satellite, non-monotonic epochs, a non-finite
6528
+ * sample). Delegates to `sidereon_core::sp3::PreciseEphemerisSamples::from_samples`.
6529
+ */
6530
+ export function preciseEphemerisSamplesFromSamples(samples: any): PreciseEphemerisSampleSource;
6531
+
6486
6532
  /**
6487
6533
  * Predict observables for many `(satellite, receiver, epoch)` requests from a
6488
6534
  * broadcast ephemeris store, serially. See [`predictBatchSp3`] for the argument
@@ -6872,6 +6918,20 @@ export function solveVelocityBroadcast(broadcast: BroadcastEphemeris, observatio
6872
6918
  */
6873
6919
  export function solveWithFallback(precise: Sp3[], broadcast: BroadcastEphemeris, request: any, policy: any): SourcedSolution;
6874
6920
 
6921
+ /**
6922
+ * Extract a parsed SP3 product as the canonical precise-ephemeris samples, one
6923
+ * per real position record in ascending epoch order.
6924
+ *
6925
+ * Returns an array of `{ sat, epoch, positionEcefM, clockS, clockEvent }`
6926
+ * objects. Round-tripping the result back through
6927
+ * [`preciseEphemerisSamplesFromSamples`] rebuilds an interpolatable source that
6928
+ * reproduces the SP3-parsed source's interpolated states and predicted ranges
6929
+ * to the documented round-trip precision (byte-identical for samples whose
6930
+ * meters are the faithful image of the fit nodes; see the core module docs).
6931
+ * Delegates to `sidereon_core::sp3::Sp3::precise_ephemeris_samples`.
6932
+ */
6933
+ export function sp3PreciseEphemerisSamples(sp3: Sp3): any;
6934
+
6875
6935
  /**
6876
6936
  * Continuous seconds since J2000 for a split Julian date.
6877
6937
  */
@@ -9225,6 +9225,59 @@ class PppFloatSolution {
9225
9225
  if (Symbol.dispose) PppFloatSolution.prototype[Symbol.dispose] = PppFloatSolution.prototype.free;
9226
9226
  exports.PppFloatSolution = PppFloatSolution;
9227
9227
 
9228
+ /**
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`].
9234
+ */
9235
+ class PreciseEphemerisSampleSource {
9236
+ static __wrap(ptr) {
9237
+ const obj = Object.create(PreciseEphemerisSampleSource.prototype);
9238
+ obj.__wbg_ptr = ptr;
9239
+ PreciseEphemerisSampleSourceFinalization.register(obj, obj.__wbg_ptr, obj);
9240
+ return obj;
9241
+ }
9242
+ __destroy_into_raw() {
9243
+ const ptr = this.__wbg_ptr;
9244
+ this.__wbg_ptr = 0;
9245
+ PreciseEphemerisSampleSourceFinalization.unregister(this);
9246
+ return ptr;
9247
+ }
9248
+ free() {
9249
+ const ptr = this.__destroy_into_raw();
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
+
9228
9281
  /**
9229
9282
  * The per-request results of a batch observable prediction, index-aligned to
9230
9283
  * the input requests. Each request independently either produced observables or
@@ -10847,6 +10900,25 @@ class Sp3 {
10847
10900
  }
10848
10901
  return Sp3Interpolation.__wrap(ret[0]);
10849
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
+ }
10850
10922
  /**
10851
10923
  * Satellite tokens present in the product (e.g. `"G01"`), ascending.
10852
10924
  * @returns {string[]}
@@ -16272,6 +16344,28 @@ function pppCorrections(sp3, epochs, receiver_ecef_m, options) {
16272
16344
  }
16273
16345
  exports.pppCorrections = pppCorrections;
16274
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
+
16275
16369
  /**
16276
16370
  * Predict observables for many `(satellite, receiver, epoch)` requests from a
16277
16371
  * broadcast ephemeris store, serially. See [`predictBatchSp3`] for the argument
@@ -17258,6 +17352,30 @@ function solveWithFallback(precise, broadcast, request, policy) {
17258
17352
  }
17259
17353
  exports.solveWithFallback = solveWithFallback;
17260
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
+
17261
17379
  /**
17262
17380
  * Continuous seconds since J2000 for a split Julian date.
17263
17381
  * @param {number} jd_whole
@@ -18511,6 +18629,9 @@ const PppFixedSolutionFinalization = (typeof FinalizationRegistry === 'undefined
18511
18629
  const PppFloatSolutionFinalization = (typeof FinalizationRegistry === 'undefined')
18512
18630
  ? { register: () => {}, unregister: () => {} }
18513
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));
18514
18635
  const PredictBatchFinalization = (typeof FinalizationRegistry === 'undefined')
18515
18636
  ? { register: () => {}, unregister: () => {} }
18516
18637
  : new FinalizationRegistry(ptr => wasm.__wbg_predictbatch_free(ptr, 1));
Binary file