gnss-js 1.47.0 → 1.49.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.
@@ -550,6 +550,71 @@ declare function lambdaSearch(a: Float64Array, Q: Float64Array, n: number, m?: n
550
550
  */
551
551
  declare function lambdaReduction(Q: Float64Array, n: number): Float64Array | null;
552
552
 
553
+ /** A per-satellite SBAS correction, ready to apply in an SPP solve. */
554
+ interface SbasSatCorrection {
555
+ /** Long-term ECEF position correction to add to the satellite position (m). */
556
+ dPos: [number, number, number];
557
+ /** Clock correction to add to the satellite clock bias (s) — long-term + fast. */
558
+ dClkS: number;
559
+ /** Pseudorange fast correction alone (m), for reference. */
560
+ prcM: number;
561
+ /** Variance of the correction (m²). */
562
+ varM2: number;
563
+ /** Applied long-term correction IODE (matches the broadcast ephemeris IODE). */
564
+ iode: number;
565
+ }
566
+ /** A slant ionospheric delay at a pierce point from the SBAS grid. */
567
+ interface SbasIonoDelay {
568
+ /** Slant ionospheric delay on L1 (m). */
569
+ delayM: number;
570
+ /** Variance (m²). */
571
+ varM2: number;
572
+ }
573
+ declare class SbasProcessor {
574
+ private sats;
575
+ private satIdx;
576
+ private iodp;
577
+ private tlat;
578
+ private ion;
579
+ /** GEO PRN(s) whose messages have been ingested. */
580
+ readonly geoPrns: Set<string>;
581
+ /**
582
+ * Ingest one decoded SBAS L1 message (250-bit, MSB-first) received at the
583
+ * given GPS week / time-of-week. Returns the message type, or -1 if it was
584
+ * not a recognised/applicable correction message.
585
+ */
586
+ update(msg: Uint8Array, week: number, tow: number, geoPrn?: number): number;
587
+ private decodeMask;
588
+ private decodeFast;
589
+ private decodeIntegrity;
590
+ private decodeDegradation;
591
+ private decodeMixed;
592
+ private decodeLongCorrHalf;
593
+ private decodeLong0;
594
+ private decodeLong1;
595
+ private decodeIgpMask;
596
+ private decodeIgpDelay;
597
+ /** PRNs currently in the correction mask (in mask order). */
598
+ activeSats(): string[];
599
+ /** Number of ionospheric grid points with a valid delay across all bands. */
600
+ ionoGridPoints(): number;
601
+ /**
602
+ * Satellite range/clock correction for a PRN at a GPS week/tow, or null if
603
+ * no valid (unexpired) long-term + fast correction is available. Add `dPos`
604
+ * to the satellite ECEF position and `dClkS` to its clock bias.
605
+ */
606
+ satCorrection(prn: string, week: number, tow: number): SbasSatCorrection | null;
607
+ /**
608
+ * Slant L1 ionospheric delay (m) at the pierce point for a receiver geodetic
609
+ * position (lat/lon rad, height m) and a satellite az/el (rad), interpolated
610
+ * from the SBAS grid — or null if the pierce point isn't covered. RTKLIB
611
+ * `sbsioncorr`.
612
+ */
613
+ ionoDelay(week: number, tow: number, latRad: number, lonRad: number, heightM: number, azRad: number, elRad: number): SbasIonoDelay | null;
614
+ /** Find the four IGPs bracketing a pierce point (RTKLIB `searchigp`). */
615
+ private searchIgp;
616
+ }
617
+
553
618
  /**
554
619
  * ANTEX phase-centre application for PPP: satellite and receiver antenna
555
620
  * PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
@@ -686,6 +751,14 @@ interface PppOptions {
686
751
  /** A priori receiver ECEF position (m). Required — from the RINEX header
687
752
  * approx position or an SPP solution. */
688
753
  aprioriPos: [number, number, number];
754
+ /**
755
+ * Rover dynamics. 'static' (default): the position is a single constant
756
+ * state, so all epochs average into one converged coordinate. 'kinematic':
757
+ * the position is white noise (RTKLIB `PMODE_PPP_KINEMA`) — re-estimated
758
+ * each epoch from that epoch's measurements while the carrier ambiguities
759
+ * (and troposphere) persist, so a moving receiver is tracked epoch by epoch.
760
+ */
761
+ mode?: 'static' | 'kinematic';
689
762
  /** Ground-truth ECEF (m) for reporting ENU error in the series. */
690
763
  groundTruth?: [number, number, number];
691
764
  /** Elevation cutoff (deg). Default 10. */
@@ -1190,4 +1263,4 @@ declare function ionoFree(p1: number, p2: number, f1: number, f2: number): numbe
1190
1263
  */
1191
1264
  declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
1192
1265
 
1193
- export { type AntennaOffset, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type DgnssOptions, type DgnssSolution, type EphemerisSource, type FixedPositionResult, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type NetworkFcbResult, type NetworkFcbSummary, type NlArc, type NlFcbResult, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppFixState, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type RtkObsEpoch, type RtkObsInput, type RtkPostProcessOptions, type RtkPostProcessResult, type RtkTrackPoint, type SatGeom, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, buildPppAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, resolvePppAmbiguities, satClockCorrection, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
1266
+ export { type AntennaOffset, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type DgnssOptions, type DgnssSolution, type EphemerisSource, type FixedPositionResult, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type NetworkFcbResult, type NetworkFcbSummary, type NlArc, type NlFcbResult, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppFixState, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type RtkObsEpoch, type RtkObsInput, type RtkPostProcessOptions, type RtkPostProcessResult, type RtkTrackPoint, type SatGeom, type SbasIonoDelay, SbasProcessor, type SbasSatCorrection, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, buildPppAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, resolvePppAmbiguities, satClockCorrection, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
@@ -550,6 +550,71 @@ declare function lambdaSearch(a: Float64Array, Q: Float64Array, n: number, m?: n
550
550
  */
551
551
  declare function lambdaReduction(Q: Float64Array, n: number): Float64Array | null;
552
552
 
553
+ /** A per-satellite SBAS correction, ready to apply in an SPP solve. */
554
+ interface SbasSatCorrection {
555
+ /** Long-term ECEF position correction to add to the satellite position (m). */
556
+ dPos: [number, number, number];
557
+ /** Clock correction to add to the satellite clock bias (s) — long-term + fast. */
558
+ dClkS: number;
559
+ /** Pseudorange fast correction alone (m), for reference. */
560
+ prcM: number;
561
+ /** Variance of the correction (m²). */
562
+ varM2: number;
563
+ /** Applied long-term correction IODE (matches the broadcast ephemeris IODE). */
564
+ iode: number;
565
+ }
566
+ /** A slant ionospheric delay at a pierce point from the SBAS grid. */
567
+ interface SbasIonoDelay {
568
+ /** Slant ionospheric delay on L1 (m). */
569
+ delayM: number;
570
+ /** Variance (m²). */
571
+ varM2: number;
572
+ }
573
+ declare class SbasProcessor {
574
+ private sats;
575
+ private satIdx;
576
+ private iodp;
577
+ private tlat;
578
+ private ion;
579
+ /** GEO PRN(s) whose messages have been ingested. */
580
+ readonly geoPrns: Set<string>;
581
+ /**
582
+ * Ingest one decoded SBAS L1 message (250-bit, MSB-first) received at the
583
+ * given GPS week / time-of-week. Returns the message type, or -1 if it was
584
+ * not a recognised/applicable correction message.
585
+ */
586
+ update(msg: Uint8Array, week: number, tow: number, geoPrn?: number): number;
587
+ private decodeMask;
588
+ private decodeFast;
589
+ private decodeIntegrity;
590
+ private decodeDegradation;
591
+ private decodeMixed;
592
+ private decodeLongCorrHalf;
593
+ private decodeLong0;
594
+ private decodeLong1;
595
+ private decodeIgpMask;
596
+ private decodeIgpDelay;
597
+ /** PRNs currently in the correction mask (in mask order). */
598
+ activeSats(): string[];
599
+ /** Number of ionospheric grid points with a valid delay across all bands. */
600
+ ionoGridPoints(): number;
601
+ /**
602
+ * Satellite range/clock correction for a PRN at a GPS week/tow, or null if
603
+ * no valid (unexpired) long-term + fast correction is available. Add `dPos`
604
+ * to the satellite ECEF position and `dClkS` to its clock bias.
605
+ */
606
+ satCorrection(prn: string, week: number, tow: number): SbasSatCorrection | null;
607
+ /**
608
+ * Slant L1 ionospheric delay (m) at the pierce point for a receiver geodetic
609
+ * position (lat/lon rad, height m) and a satellite az/el (rad), interpolated
610
+ * from the SBAS grid — or null if the pierce point isn't covered. RTKLIB
611
+ * `sbsioncorr`.
612
+ */
613
+ ionoDelay(week: number, tow: number, latRad: number, lonRad: number, heightM: number, azRad: number, elRad: number): SbasIonoDelay | null;
614
+ /** Find the four IGPs bracketing a pierce point (RTKLIB `searchigp`). */
615
+ private searchIgp;
616
+ }
617
+
553
618
  /**
554
619
  * ANTEX phase-centre application for PPP: satellite and receiver antenna
555
620
  * PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
@@ -686,6 +751,14 @@ interface PppOptions {
686
751
  /** A priori receiver ECEF position (m). Required — from the RINEX header
687
752
  * approx position or an SPP solution. */
688
753
  aprioriPos: [number, number, number];
754
+ /**
755
+ * Rover dynamics. 'static' (default): the position is a single constant
756
+ * state, so all epochs average into one converged coordinate. 'kinematic':
757
+ * the position is white noise (RTKLIB `PMODE_PPP_KINEMA`) — re-estimated
758
+ * each epoch from that epoch's measurements while the carrier ambiguities
759
+ * (and troposphere) persist, so a moving receiver is tracked epoch by epoch.
760
+ */
761
+ mode?: 'static' | 'kinematic';
689
762
  /** Ground-truth ECEF (m) for reporting ENU error in the series. */
690
763
  groundTruth?: [number, number, number];
691
764
  /** Elevation cutoff (deg). Default 10. */
@@ -1190,4 +1263,4 @@ declare function ionoFree(p1: number, p2: number, f1: number, f2: number): numbe
1190
1263
  */
1191
1264
  declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
1192
1265
 
1193
- export { type AntennaOffset, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type DgnssOptions, type DgnssSolution, type EphemerisSource, type FixedPositionResult, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type NetworkFcbResult, type NetworkFcbSummary, type NlArc, type NlFcbResult, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppFixState, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type RtkObsEpoch, type RtkObsInput, type RtkPostProcessOptions, type RtkPostProcessResult, type RtkTrackPoint, type SatGeom, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, buildPppAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, resolvePppAmbiguities, satClockCorrection, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
1266
+ export { type AntennaOffset, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type DgnssOptions, type DgnssSolution, type EphemerisSource, type FixedPositionResult, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type NetworkFcbResult, type NetworkFcbSummary, type NlArc, type NlFcbResult, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppFixState, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type RtkObsEpoch, type RtkObsInput, type RtkPostProcessOptions, type RtkPostProcessResult, type RtkTrackPoint, type SatGeom, type SbasIonoDelay, SbasProcessor, type SbasSatCorrection, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, buildPppAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, resolvePppAmbiguities, satClockCorrection, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  IONO_L1_M_PER_TECU,
3
3
  RtkFloatEngine,
4
+ SbasProcessor,
4
5
  buildPppAntenna,
5
6
  createPppCorrections,
6
7
  estimateNarrowlaneFcb,
@@ -28,18 +29,22 @@ import {
28
29
  sunEcef,
29
30
  toRtkEpoch,
30
31
  wlWavelength
31
- } from "./chunk-75OYCNTY.js";
32
+ } from "./chunk-DWLVCXA6.js";
33
+ import "./chunk-WQX354KD.js";
32
34
  import "./chunk-MHGNKSSH.js";
33
35
  import "./chunk-MIIM4LDY.js";
34
36
  import "./chunk-37QNKGTC.js";
35
37
  import "./chunk-6FAL6P4G.js";
36
38
  import "./chunk-GPEP67TG.js";
39
+ import "./chunk-YUW33VXK.js";
40
+ import "./chunk-V2D5KUKH.js";
37
41
  import "./chunk-HVXYFUCB.js";
38
42
  import "./chunk-LEEU5OIO.js";
39
43
  import "./chunk-FIEWO4J4.js";
40
44
  export {
41
45
  IONO_L1_M_PER_TECU,
42
46
  RtkFloatEngine,
47
+ SbasProcessor,
43
48
  buildPppAntenna,
44
49
  createPppCorrections,
45
50
  estimateNarrowlaneFcb,
package/dist/rinex.js CHANGED
@@ -21,8 +21,6 @@ import {
21
21
  writeRinexNav4,
22
22
  writeRinexObsBlob
23
23
  } from "./chunk-6SWJTN6H.js";
24
- import "./chunk-YUW33VXK.js";
25
- import "./chunk-V2D5KUKH.js";
26
24
  import {
27
25
  SYSTEM_ORDER,
28
26
  crxDecompress,
@@ -38,6 +36,8 @@ import {
38
36
  parseSp3,
39
37
  sp3Position
40
38
  } from "./chunk-GPEP67TG.js";
39
+ import "./chunk-YUW33VXK.js";
40
+ import "./chunk-V2D5KUKH.js";
41
41
  import "./chunk-FIEWO4J4.js";
42
42
  export {
43
43
  EMPTY_WARNINGS,
package/dist/sbf.js CHANGED
@@ -15,9 +15,9 @@ import {
15
15
  parseSbfNav,
16
16
  parseSbfReceiverSetup,
17
17
  scanSbfFrames
18
- } from "./chunk-MEDAWNWM.js";
18
+ } from "./chunk-XFPDTGSV.js";
19
19
  import "./chunk-FA2UTLEQ.js";
20
- import "./chunk-ZIGMN3E5.js";
20
+ import "./chunk-WQX354KD.js";
21
21
  import "./chunk-37QNKGTC.js";
22
22
  import "./chunk-6FAL6P4G.js";
23
23
  import "./chunk-YUW33VXK.js";
package/dist/ubx.cjs CHANGED
@@ -1409,6 +1409,7 @@ function parseUbxRawNav(data, opts = {}) {
1409
1409
  continue;
1410
1410
  }
1411
1411
  if (refWeek === 0) continue;
1412
+ opts.onSbasMessage?.(msg, svId, refWeek, refTow);
1412
1413
  const eph = decodeSbasGeoNav(msg, svId, refWeek, refTow);
1413
1414
  if (eph) {
1414
1415
  const key = `${eph.prn}@${eph.tocDate.getTime()}`;
package/dist/ubx.d.cts CHANGED
@@ -228,6 +228,13 @@ interface UbxRawNavOptions {
228
228
  * week and are decoded regardless); the system clock is never used.
229
229
  */
230
230
  refWeek?: number;
231
+ /**
232
+ * Called for every CRC-valid SBAS L1 C/A message (all types, not only the
233
+ * GEO navigation MT9), with the 250-bit message MSB-first, the GEO PRN, and
234
+ * the reception GPS week / time-of-week. Feed these to an
235
+ * {@link ../positioning/sbas.SbasProcessor} to build SBAS corrections.
236
+ */
237
+ onSbasMessage?: (msg: Uint8Array, prn: number, week: number, tow: number) => void;
231
238
  }
232
239
  interface UbxRawNavResult {
233
240
  /**
package/dist/ubx.d.ts CHANGED
@@ -228,6 +228,13 @@ interface UbxRawNavOptions {
228
228
  * week and are decoded regardless); the system clock is never used.
229
229
  */
230
230
  refWeek?: number;
231
+ /**
232
+ * Called for every CRC-valid SBAS L1 C/A message (all types, not only the
233
+ * GEO navigation MT9), with the 250-bit message MSB-first, the GEO PRN, and
234
+ * the reception GPS week / time-of-week. Feed these to an
235
+ * {@link ../positioning/sbas.SbasProcessor} to build SBAS corrections.
236
+ */
237
+ onSbasMessage?: (msg: Uint8Array, prn: number, week: number, tow: number) => void;
231
238
  }
232
239
  interface UbxRawNavResult {
233
240
  /**
package/dist/ubx.js CHANGED
@@ -5,9 +5,9 @@ import {
5
5
  parseUbxRawNav,
6
6
  parseUbxRawx,
7
7
  ubxFrames
8
- } from "./chunk-EQNC24OB.js";
8
+ } from "./chunk-DEVUKH6A.js";
9
9
  import "./chunk-FA2UTLEQ.js";
10
- import "./chunk-ZIGMN3E5.js";
10
+ import "./chunk-WQX354KD.js";
11
11
  import "./chunk-YUW33VXK.js";
12
12
  import "./chunk-V2D5KUKH.js";
13
13
  import "./chunk-HVXYFUCB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.47.0",
3
+ "version": "1.49.0",
4
4
  "description": "Comprehensive GNSS library for JavaScript — time scales, coordinates, RINEX parsing, RTCM3 decoding, orbit computation, and signal analysis",
5
5
  "type": "module",
6
6
  "sideEffects": false,