gnss-js 2.2.0 → 2.4.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.
@@ -1,8 +1,8 @@
1
1
  import { E as Ephemeris } from './nav-DImXUdbp.cjs';
2
2
  import { DopValues } from './orbit.cjs';
3
3
  import { I as IonexGrid, C as ClkFile, S as Sp3File } from './clk-DGVBGRzA.cjs';
4
- import { a as HasOrbitCorrection, b as HasClockCorrection } from './has-BaXnQarR.cjs';
5
4
  import { AntexFile } from './antex.cjs';
5
+ import { a as HasOrbitCorrection, b as HasClockCorrection } from './has-BaXnQarR.cjs';
6
6
  import './ephemeris-BAnBLLB9.cjs';
7
7
  import './ecef-CF0uAysr.cjs';
8
8
  import './nav-BYmYoh9A.cjs';
@@ -83,6 +83,87 @@ declare function gimVerticalTec(grid: IonexGrid, timeMs: number, latDeg: number,
83
83
  */
84
84
  declare function gimSlantIonoDelayL1(grid: IonexGrid, latRad: number, lonRad: number, azRad: number, elRad: number, timeMs: number): number | null;
85
85
 
86
+ /**
87
+ * ANTEX phase-centre application for PPP: satellite and receiver antenna
88
+ * PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
89
+ * combined, with the nominal yaw-steering satellite attitude used to
90
+ * rotate the satellite PCO from the body frame into ECEF.
91
+ */
92
+
93
+ interface AntennaOffset {
94
+ /** IF-combined PCO (m): satellite → body-frame [X,Y,Z]; receiver → ENU. */
95
+ pco: [number, number, number];
96
+ /** IF-combined no-azimuth PCV samples (m) over zenith/nadir angle. */
97
+ pcvZen1Deg: number;
98
+ pcvDzenDeg: number;
99
+ pcvNoazi: number[];
100
+ }
101
+ interface PppAntennaModel {
102
+ satOffset(prn: string, dateMs: number, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
103
+ rcvOffset(antType: string, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
104
+ }
105
+ declare function buildPppAntenna(antex: AntexFile): PppAntennaModel;
106
+
107
+ /**
108
+ * Per-frequency receiver antenna corrections for RTK.
109
+ *
110
+ * RTK forms double differences per signal (L1, L2, … separately), so — unlike
111
+ * PPP, which works on the ionosphere-free combination — it needs the antenna
112
+ * phase-centre offset (PCO) and no-azimuth phase-centre variation (PCV) for
113
+ * each frequency in isolation, not IF-combined. This module is therefore a
114
+ * deliberately separate model from {@link buildPppAntenna}.
115
+ *
116
+ * The satellite antenna cancels in the base↔rover double difference, so only
117
+ * the *receiver* antennas matter — and only when base and rover differ (same
118
+ * antenna type + orientation cancels too). The correction is the same range
119
+ * quantity the PPP receiver term applies (PCO projected on the line of sight +
120
+ * elevation PCV + marker→ARP delta), added to the modelled geometric range.
121
+ */
122
+
123
+ /** A single-frequency receiver antenna offset (PCO in ENU metres + no-azimuth
124
+ * PCV over zenith). Shares {@link AntennaOffset}'s shape so {@link interpPcv}
125
+ * applies directly. */
126
+ type RtkAntennaOffset = AntennaOffset;
127
+ interface RtkAntennaModel {
128
+ /** Receiver PCO + PCV for one ANTEX frequency code (e.g. 'G01', 'E05'), or
129
+ * null when the antenna type or that frequency isn't calibrated. */
130
+ rcvOffset(antType: string, freq: string): RtkAntennaOffset | null;
131
+ }
132
+ /**
133
+ * Build a per-frequency receiver antenna model from an ANTEX file (e.g.
134
+ * igs20.atx). Receiver antennas are keyed by their 20-char type (RINEX header
135
+ * "ANT # / TYPE"); satellite entries are ignored (they cancel in the DD).
136
+ */
137
+ declare function buildRtkAntenna(antex: AntexFile): RtkAntennaModel;
138
+ /**
139
+ * Additive range correction (m) for one receiver observing one satellite,
140
+ * matching the PPP receiver-antenna convention: it is *added to the modelled
141
+ * geometric range* (marker→satellite). `losRcvToSat` is the unit line of sight
142
+ * from the receiver to the satellite; `antDeltaEnu` is the marker→ARP offset
143
+ * in local ENU (m).
144
+ */
145
+ declare function rcvAntennaRangeM(off: RtkAntennaOffset, losRcvToSat: [number, number, number], latRad: number, lonRad: number, elRad: number, antDeltaEnu?: readonly [number, number, number]): number;
146
+ /** Per-receiver antenna configuration for {@link RtkFloatOptions.antenna}. */
147
+ interface RtkReceiverAntenna {
148
+ /** RINEX antenna type (20-char "ANT # / TYPE"), keyed into the model. */
149
+ type: string;
150
+ /** Marker→ARP offset in local ENU (m). RINEX "ANTENNA: DELTA H/E/N" is
151
+ * [Up, East, North] → pass as [E, N, U]. Default [0,0,0]. */
152
+ deltaEnu?: [number, number, number];
153
+ }
154
+ /** RTK antenna configuration: a per-frequency model + the base/rover antennas.
155
+ * Corrections are applied only for a receiver whose antenna is supplied and
156
+ * found in the model; the satellite antenna is never needed (cancels in the
157
+ * double difference). */
158
+ interface RtkAntennaConfig {
159
+ model: RtkAntennaModel;
160
+ base?: RtkReceiverAntenna;
161
+ rover?: RtkReceiverAntenna;
162
+ }
163
+ /** ANTEX frequency code for an RTK signal group ("G1C" → "G01"): system letter
164
+ * + '0' + band digit. */
165
+ declare function antexFreqOfGroup(group: string): string;
166
+
86
167
  /**
87
168
  * RTK positioning, stage 1: epoch-wise double-differenced (DD)
88
169
  * processing of a base/rover receiver pair.
@@ -306,6 +387,14 @@ interface RtkFloatOptions {
306
387
  partialFixing?: boolean;
307
388
  /** Minimum DD ambiguities to attempt/accept a fix. Default 4. */
308
389
  minFixAmbiguities?: number;
390
+ /**
391
+ * Receiver antenna phase-centre corrections (per-frequency PCO + PCV) for
392
+ * the base and rover. Only worthwhile on mixed-antenna baselines — with the
393
+ * same antenna type + orientation at both ends the correction cancels in the
394
+ * double difference. The satellite antenna is never needed (it cancels too).
395
+ * Build the model with {@link buildRtkAntenna}. Default: none.
396
+ */
397
+ antenna?: RtkAntennaConfig | null;
309
398
  }
310
399
  interface RtkFloatSolution {
311
400
  /** Epoch, GPS-scale milliseconds. */
@@ -579,6 +668,8 @@ interface Degradation {
579
668
  cionoRamp: number;
580
669
  rssUdre: boolean;
581
670
  rssIono: boolean;
671
+ /** Cᶜᵒᵛᵃʳⁱᵃⁿᶜᵉ — the MT28 δUDRE quantization term (m), 0 when no MT28. */
672
+ ccovariance: number;
582
673
  }
583
674
  /** A per-satellite SBAS correction, ready to apply in an SPP solve. */
584
675
  interface SbasSatCorrection {
@@ -626,6 +717,10 @@ declare class SbasProcessor {
626
717
  private tlat;
627
718
  private degr;
628
719
  private mt27;
720
+ /** MT28 clock-ephemeris covariance per PRN: the upper-triangular Cholesky
721
+ * factor E (10 elements [E11,E22,E33,E44,E12,E13,E14,E23,E24,E34]) and its
722
+ * scale exponent. Keyed by PRN; cleared on a mask change. */
723
+ private mt28;
629
724
  private ion;
630
725
  /** GEO PRN(s) whose messages have been ingested. */
631
726
  readonly geoPrns: Set<string>;
@@ -650,6 +745,17 @@ declare class SbasProcessor {
650
745
  * set: the highest-priority containing region wins (ties → lower δUDRE),
651
746
  * else the outside value. 1 when no MT27 has been received. */
652
747
  deltaUdre(latDeg: number, lonDeg: number): number;
748
+ /** MT28 clock-ephemeris covariance (ICAO Annex 10 Vol I §3.5.4.7 / Table B-51):
749
+ * two satellites per message, each an upper-triangular Cholesky factor E and a
750
+ * scale exponent that together define the relative clock-ephemeris covariance
751
+ * used for a geometry-dependent δUDRE (§3.5.5.6.2.5). Slots are indexed into
752
+ * the current MT1 mask, so a mismatched IODP is dropped. */
753
+ private decodeMt28;
754
+ /** Geometry-dependent δUDRE multiplier from MT28 (§3.5.5.6.2.5):
755
+ * δUDRE = √(Iᵀ·C·I) + ε_c, with C = Rᵀ·R, R = E·2^(scaleExp−5),
756
+ * I = [î_user→sat, 1], ε_c = C_covariance·2^(scaleExp−5). Since C = RᵀR,
757
+ * Iᵀ·C·I = ‖R·I‖², so we form R·I directly. Null when no MT28 for `prn`. */
758
+ private mt28DeltaUdre;
653
759
  private decodeMixed;
654
760
  private decodeLongCorrHalf;
655
761
  private decodeLong0;
@@ -693,7 +799,11 @@ declare class SbasProcessor {
693
799
  * no valid (unexpired) long-term + fast correction is available. Add `dPos`
694
800
  * to the satellite ECEF position and `dClkS` to its clock bias.
695
801
  */
696
- satCorrection(prn: string, week: number, tow: number, userLatRad?: number, userLonRad?: number): SbasSatCorrection | null;
802
+ satCorrection(prn: string, week: number, tow: number, userLatRad?: number, userLonRad?: number,
803
+ /** Unit line-of-sight vector user→satellite in ECEF, for the MT28
804
+ * geometry-dependent δUDRE (final protection-level pass). When given and
805
+ * MT28 data exists for the PRN, it supersedes the MT27 region δUDRE. */
806
+ losUnitEcef?: readonly [number, number, number]): SbasSatCorrection | null;
697
807
  /** The last-decoded MT10 degradation factors, or null if none seen. */
698
808
  get degradation(): Readonly<Degradation> | null;
699
809
  /**
@@ -778,27 +888,6 @@ declare function applyOrbitClock(eph: Ephemeris, corr: OrbitClockCorrection, tim
778
888
  */
779
889
  declare function hasToOrbitClock(orbit: HasOrbitCorrection, clock: HasClockCorrection | undefined, refTimeMs: number, validitySeconds: number | null): OrbitClockCorrection | null;
780
890
 
781
- /**
782
- * ANTEX phase-centre application for PPP: satellite and receiver antenna
783
- * PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
784
- * combined, with the nominal yaw-steering satellite attitude used to
785
- * rotate the satellite PCO from the body frame into ECEF.
786
- */
787
-
788
- interface AntennaOffset {
789
- /** IF-combined PCO (m): satellite → body-frame [X,Y,Z]; receiver → ENU. */
790
- pco: [number, number, number];
791
- /** IF-combined no-azimuth PCV samples (m) over zenith/nadir angle. */
792
- pcvZen1Deg: number;
793
- pcvDzenDeg: number;
794
- pcvNoazi: number[];
795
- }
796
- interface PppAntennaModel {
797
- satOffset(prn: string, dateMs: number, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
798
- rcvOffset(antType: string, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
799
- }
800
- declare function buildPppAntenna(antex: AntexFile): PppAntennaModel;
801
-
802
891
  /**
803
892
  * Optional PPP range corrections: satellite & receiver antenna phase-centre
804
893
  * offsets, phase wind-up, and solid-earth tides. These take a converged
@@ -1489,7 +1578,10 @@ interface SbasCorrectionSource {
1489
1578
  satCorrection(prn: string, week: number, tow: number,
1490
1579
  /** User geodetic lat/lon (rad) for the MT27 service-region δUDRE, when
1491
1580
  * known (the final protection-level pass). Omitted during iteration. */
1492
- userLatRad?: number, userLonRad?: number): {
1581
+ userLatRad?: number, userLonRad?: number,
1582
+ /** Unit LOS user→satellite (ECEF) for the MT28 geometry-dependent δUDRE
1583
+ * (final protection-level pass). */
1584
+ losUnitEcef?: readonly [number, number, number]): {
1493
1585
  dPos: [number, number, number];
1494
1586
  dClkS: number;
1495
1587
  varM2: number;
@@ -1567,4 +1659,4 @@ declare function sbasProtectionLevels(sats: readonly {
1567
1659
  */
1568
1660
  declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
1569
1661
 
1570
- export { type AntennaOffset, type AppliedOrbitClock, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type Degradation, 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 OrbitClockCorrection, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, PppEngine, type PppEphemerisSource, 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 SatSample, type SbasCorrectionSource, type SbasIgp, type SbasIonoDelay, SbasProcessor, type SbasSatCorrection, Sp3EphemerisSource, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, applyOrbitClock, buildPppAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
1662
+ export { type AntennaOffset, type AppliedOrbitClock, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type Degradation, 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 OrbitClockCorrection, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, PppEngine, type PppEphemerisSource, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppFixState, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkAntennaConfig, type RtkAntennaModel, type RtkAntennaOffset, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type RtkObsEpoch, type RtkObsInput, type RtkPostProcessOptions, type RtkPostProcessResult, type RtkReceiverAntenna, type RtkTrackPoint, type SatGeom, type SatSample, type SbasCorrectionSource, type SbasIgp, type SbasIonoDelay, SbasProcessor, type SbasSatCorrection, Sp3EphemerisSource, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, antexFreqOfGroup, applyOrbitClock, buildPppAntenna, buildRtkAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, rcvAntennaRangeM, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
@@ -1,8 +1,8 @@
1
1
  import { E as Ephemeris } from './nav-DImXUdbp.js';
2
2
  import { DopValues } from './orbit.js';
3
3
  import { I as IonexGrid, C as ClkFile, S as Sp3File } from './clk-DGVBGRzA.js';
4
- import { a as HasOrbitCorrection, b as HasClockCorrection } from './has-BaXnQarR.js';
5
4
  import { AntexFile } from './antex.js';
5
+ import { a as HasOrbitCorrection, b as HasClockCorrection } from './has-BaXnQarR.js';
6
6
  import './ephemeris-BAnBLLB9.js';
7
7
  import './ecef-CF0uAysr.js';
8
8
  import './nav-CN8rxL4h.js';
@@ -83,6 +83,87 @@ declare function gimVerticalTec(grid: IonexGrid, timeMs: number, latDeg: number,
83
83
  */
84
84
  declare function gimSlantIonoDelayL1(grid: IonexGrid, latRad: number, lonRad: number, azRad: number, elRad: number, timeMs: number): number | null;
85
85
 
86
+ /**
87
+ * ANTEX phase-centre application for PPP: satellite and receiver antenna
88
+ * PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
89
+ * combined, with the nominal yaw-steering satellite attitude used to
90
+ * rotate the satellite PCO from the body frame into ECEF.
91
+ */
92
+
93
+ interface AntennaOffset {
94
+ /** IF-combined PCO (m): satellite → body-frame [X,Y,Z]; receiver → ENU. */
95
+ pco: [number, number, number];
96
+ /** IF-combined no-azimuth PCV samples (m) over zenith/nadir angle. */
97
+ pcvZen1Deg: number;
98
+ pcvDzenDeg: number;
99
+ pcvNoazi: number[];
100
+ }
101
+ interface PppAntennaModel {
102
+ satOffset(prn: string, dateMs: number, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
103
+ rcvOffset(antType: string, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
104
+ }
105
+ declare function buildPppAntenna(antex: AntexFile): PppAntennaModel;
106
+
107
+ /**
108
+ * Per-frequency receiver antenna corrections for RTK.
109
+ *
110
+ * RTK forms double differences per signal (L1, L2, … separately), so — unlike
111
+ * PPP, which works on the ionosphere-free combination — it needs the antenna
112
+ * phase-centre offset (PCO) and no-azimuth phase-centre variation (PCV) for
113
+ * each frequency in isolation, not IF-combined. This module is therefore a
114
+ * deliberately separate model from {@link buildPppAntenna}.
115
+ *
116
+ * The satellite antenna cancels in the base↔rover double difference, so only
117
+ * the *receiver* antennas matter — and only when base and rover differ (same
118
+ * antenna type + orientation cancels too). The correction is the same range
119
+ * quantity the PPP receiver term applies (PCO projected on the line of sight +
120
+ * elevation PCV + marker→ARP delta), added to the modelled geometric range.
121
+ */
122
+
123
+ /** A single-frequency receiver antenna offset (PCO in ENU metres + no-azimuth
124
+ * PCV over zenith). Shares {@link AntennaOffset}'s shape so {@link interpPcv}
125
+ * applies directly. */
126
+ type RtkAntennaOffset = AntennaOffset;
127
+ interface RtkAntennaModel {
128
+ /** Receiver PCO + PCV for one ANTEX frequency code (e.g. 'G01', 'E05'), or
129
+ * null when the antenna type or that frequency isn't calibrated. */
130
+ rcvOffset(antType: string, freq: string): RtkAntennaOffset | null;
131
+ }
132
+ /**
133
+ * Build a per-frequency receiver antenna model from an ANTEX file (e.g.
134
+ * igs20.atx). Receiver antennas are keyed by their 20-char type (RINEX header
135
+ * "ANT # / TYPE"); satellite entries are ignored (they cancel in the DD).
136
+ */
137
+ declare function buildRtkAntenna(antex: AntexFile): RtkAntennaModel;
138
+ /**
139
+ * Additive range correction (m) for one receiver observing one satellite,
140
+ * matching the PPP receiver-antenna convention: it is *added to the modelled
141
+ * geometric range* (marker→satellite). `losRcvToSat` is the unit line of sight
142
+ * from the receiver to the satellite; `antDeltaEnu` is the marker→ARP offset
143
+ * in local ENU (m).
144
+ */
145
+ declare function rcvAntennaRangeM(off: RtkAntennaOffset, losRcvToSat: [number, number, number], latRad: number, lonRad: number, elRad: number, antDeltaEnu?: readonly [number, number, number]): number;
146
+ /** Per-receiver antenna configuration for {@link RtkFloatOptions.antenna}. */
147
+ interface RtkReceiverAntenna {
148
+ /** RINEX antenna type (20-char "ANT # / TYPE"), keyed into the model. */
149
+ type: string;
150
+ /** Marker→ARP offset in local ENU (m). RINEX "ANTENNA: DELTA H/E/N" is
151
+ * [Up, East, North] → pass as [E, N, U]. Default [0,0,0]. */
152
+ deltaEnu?: [number, number, number];
153
+ }
154
+ /** RTK antenna configuration: a per-frequency model + the base/rover antennas.
155
+ * Corrections are applied only for a receiver whose antenna is supplied and
156
+ * found in the model; the satellite antenna is never needed (cancels in the
157
+ * double difference). */
158
+ interface RtkAntennaConfig {
159
+ model: RtkAntennaModel;
160
+ base?: RtkReceiverAntenna;
161
+ rover?: RtkReceiverAntenna;
162
+ }
163
+ /** ANTEX frequency code for an RTK signal group ("G1C" → "G01"): system letter
164
+ * + '0' + band digit. */
165
+ declare function antexFreqOfGroup(group: string): string;
166
+
86
167
  /**
87
168
  * RTK positioning, stage 1: epoch-wise double-differenced (DD)
88
169
  * processing of a base/rover receiver pair.
@@ -306,6 +387,14 @@ interface RtkFloatOptions {
306
387
  partialFixing?: boolean;
307
388
  /** Minimum DD ambiguities to attempt/accept a fix. Default 4. */
308
389
  minFixAmbiguities?: number;
390
+ /**
391
+ * Receiver antenna phase-centre corrections (per-frequency PCO + PCV) for
392
+ * the base and rover. Only worthwhile on mixed-antenna baselines — with the
393
+ * same antenna type + orientation at both ends the correction cancels in the
394
+ * double difference. The satellite antenna is never needed (it cancels too).
395
+ * Build the model with {@link buildRtkAntenna}. Default: none.
396
+ */
397
+ antenna?: RtkAntennaConfig | null;
309
398
  }
310
399
  interface RtkFloatSolution {
311
400
  /** Epoch, GPS-scale milliseconds. */
@@ -579,6 +668,8 @@ interface Degradation {
579
668
  cionoRamp: number;
580
669
  rssUdre: boolean;
581
670
  rssIono: boolean;
671
+ /** Cᶜᵒᵛᵃʳⁱᵃⁿᶜᵉ — the MT28 δUDRE quantization term (m), 0 when no MT28. */
672
+ ccovariance: number;
582
673
  }
583
674
  /** A per-satellite SBAS correction, ready to apply in an SPP solve. */
584
675
  interface SbasSatCorrection {
@@ -626,6 +717,10 @@ declare class SbasProcessor {
626
717
  private tlat;
627
718
  private degr;
628
719
  private mt27;
720
+ /** MT28 clock-ephemeris covariance per PRN: the upper-triangular Cholesky
721
+ * factor E (10 elements [E11,E22,E33,E44,E12,E13,E14,E23,E24,E34]) and its
722
+ * scale exponent. Keyed by PRN; cleared on a mask change. */
723
+ private mt28;
629
724
  private ion;
630
725
  /** GEO PRN(s) whose messages have been ingested. */
631
726
  readonly geoPrns: Set<string>;
@@ -650,6 +745,17 @@ declare class SbasProcessor {
650
745
  * set: the highest-priority containing region wins (ties → lower δUDRE),
651
746
  * else the outside value. 1 when no MT27 has been received. */
652
747
  deltaUdre(latDeg: number, lonDeg: number): number;
748
+ /** MT28 clock-ephemeris covariance (ICAO Annex 10 Vol I §3.5.4.7 / Table B-51):
749
+ * two satellites per message, each an upper-triangular Cholesky factor E and a
750
+ * scale exponent that together define the relative clock-ephemeris covariance
751
+ * used for a geometry-dependent δUDRE (§3.5.5.6.2.5). Slots are indexed into
752
+ * the current MT1 mask, so a mismatched IODP is dropped. */
753
+ private decodeMt28;
754
+ /** Geometry-dependent δUDRE multiplier from MT28 (§3.5.5.6.2.5):
755
+ * δUDRE = √(Iᵀ·C·I) + ε_c, with C = Rᵀ·R, R = E·2^(scaleExp−5),
756
+ * I = [î_user→sat, 1], ε_c = C_covariance·2^(scaleExp−5). Since C = RᵀR,
757
+ * Iᵀ·C·I = ‖R·I‖², so we form R·I directly. Null when no MT28 for `prn`. */
758
+ private mt28DeltaUdre;
653
759
  private decodeMixed;
654
760
  private decodeLongCorrHalf;
655
761
  private decodeLong0;
@@ -693,7 +799,11 @@ declare class SbasProcessor {
693
799
  * no valid (unexpired) long-term + fast correction is available. Add `dPos`
694
800
  * to the satellite ECEF position and `dClkS` to its clock bias.
695
801
  */
696
- satCorrection(prn: string, week: number, tow: number, userLatRad?: number, userLonRad?: number): SbasSatCorrection | null;
802
+ satCorrection(prn: string, week: number, tow: number, userLatRad?: number, userLonRad?: number,
803
+ /** Unit line-of-sight vector user→satellite in ECEF, for the MT28
804
+ * geometry-dependent δUDRE (final protection-level pass). When given and
805
+ * MT28 data exists for the PRN, it supersedes the MT27 region δUDRE. */
806
+ losUnitEcef?: readonly [number, number, number]): SbasSatCorrection | null;
697
807
  /** The last-decoded MT10 degradation factors, or null if none seen. */
698
808
  get degradation(): Readonly<Degradation> | null;
699
809
  /**
@@ -778,27 +888,6 @@ declare function applyOrbitClock(eph: Ephemeris, corr: OrbitClockCorrection, tim
778
888
  */
779
889
  declare function hasToOrbitClock(orbit: HasOrbitCorrection, clock: HasClockCorrection | undefined, refTimeMs: number, validitySeconds: number | null): OrbitClockCorrection | null;
780
890
 
781
- /**
782
- * ANTEX phase-centre application for PPP: satellite and receiver antenna
783
- * PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
784
- * combined, with the nominal yaw-steering satellite attitude used to
785
- * rotate the satellite PCO from the body frame into ECEF.
786
- */
787
-
788
- interface AntennaOffset {
789
- /** IF-combined PCO (m): satellite → body-frame [X,Y,Z]; receiver → ENU. */
790
- pco: [number, number, number];
791
- /** IF-combined no-azimuth PCV samples (m) over zenith/nadir angle. */
792
- pcvZen1Deg: number;
793
- pcvDzenDeg: number;
794
- pcvNoazi: number[];
795
- }
796
- interface PppAntennaModel {
797
- satOffset(prn: string, dateMs: number, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
798
- rcvOffset(antType: string, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
799
- }
800
- declare function buildPppAntenna(antex: AntexFile): PppAntennaModel;
801
-
802
891
  /**
803
892
  * Optional PPP range corrections: satellite & receiver antenna phase-centre
804
893
  * offsets, phase wind-up, and solid-earth tides. These take a converged
@@ -1489,7 +1578,10 @@ interface SbasCorrectionSource {
1489
1578
  satCorrection(prn: string, week: number, tow: number,
1490
1579
  /** User geodetic lat/lon (rad) for the MT27 service-region δUDRE, when
1491
1580
  * known (the final protection-level pass). Omitted during iteration. */
1492
- userLatRad?: number, userLonRad?: number): {
1581
+ userLatRad?: number, userLonRad?: number,
1582
+ /** Unit LOS user→satellite (ECEF) for the MT28 geometry-dependent δUDRE
1583
+ * (final protection-level pass). */
1584
+ losUnitEcef?: readonly [number, number, number]): {
1493
1585
  dPos: [number, number, number];
1494
1586
  dClkS: number;
1495
1587
  varM2: number;
@@ -1567,4 +1659,4 @@ declare function sbasProtectionLevels(sats: readonly {
1567
1659
  */
1568
1660
  declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
1569
1661
 
1570
- export { type AntennaOffset, type AppliedOrbitClock, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type Degradation, 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 OrbitClockCorrection, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, PppEngine, type PppEphemerisSource, 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 SatSample, type SbasCorrectionSource, type SbasIgp, type SbasIonoDelay, SbasProcessor, type SbasSatCorrection, Sp3EphemerisSource, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, applyOrbitClock, buildPppAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
1662
+ export { type AntennaOffset, type AppliedOrbitClock, type ArFixedSat, type ArOptions, type ArResult, type ArSat, type CorrectionResult, type Degradation, 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 OrbitClockCorrection, type PppAntennaModel, type PppArc, type PppCorrectionConfig, type PppCorrections, PppEngine, type PppEphemerisSource, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppFixState, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkAntennaConfig, type RtkAntennaModel, type RtkAntennaOffset, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type RtkObsEpoch, type RtkObsInput, type RtkPostProcessOptions, type RtkPostProcessResult, type RtkReceiverAntenna, type RtkTrackPoint, type SatGeom, type SatSample, type SbasCorrectionSource, type SbasIgp, type SbasIonoDelay, SbasProcessor, type SbasSatCorrection, Sp3EphemerisSource, type SppOptions, type SppSolution, type TropoMapping, type WlArc, type WlFcbOptions, type WlFcbResult, type WlObs, antexFreqOfGroup, applyOrbitClock, buildPppAntenna, buildRtkAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, rcvAntennaRangeM, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
@@ -4,8 +4,10 @@ import {
4
4
  RtkFloatEngine,
5
5
  SbasProcessor,
6
6
  Sp3EphemerisSource,
7
+ antexFreqOfGroup,
7
8
  applyOrbitClock,
8
9
  buildPppAntenna,
10
+ buildRtkAntenna,
9
11
  createPppCorrections,
10
12
  estimateNarrowlaneFcb,
11
13
  estimateNetworkFcbs,
@@ -24,6 +26,7 @@ import {
24
26
  niellMapping,
25
27
  nlWavelength,
26
28
  postProcessRtk,
29
+ rcvAntennaRangeM,
27
30
  resolvePppAmbiguities,
28
31
  satClockCorrection,
29
32
  sbasIonoDeg,
@@ -36,7 +39,7 @@ import {
36
39
  sunEcef,
37
40
  toRtkEpoch,
38
41
  wlWavelength
39
- } from "./chunk-DWUQRJ37.js";
42
+ } from "./chunk-B2XWO4RP.js";
40
43
  import "./chunk-WQX354KD.js";
41
44
  import "./chunk-JYWYQ7DW.js";
42
45
  import "./chunk-HVXYFUCB.js";
@@ -54,8 +57,10 @@ export {
54
57
  RtkFloatEngine,
55
58
  SbasProcessor,
56
59
  Sp3EphemerisSource,
60
+ antexFreqOfGroup,
57
61
  applyOrbitClock,
58
62
  buildPppAntenna,
63
+ buildRtkAntenna,
59
64
  createPppCorrections,
60
65
  estimateNarrowlaneFcb,
61
66
  estimateNetworkFcbs,
@@ -74,6 +79,7 @@ export {
74
79
  niellMapping,
75
80
  nlWavelength,
76
81
  postProcessRtk,
82
+ rcvAntennaRangeM,
77
83
  resolvePppAmbiguities,
78
84
  satClockCorrection,
79
85
  sbasIonoDeg,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "2.2.0",
3
+ "version": "2.4.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,