gnss-js 2.0.0 → 2.1.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/dist/{chunk-2CMAFEHI.js → chunk-DWUQRJ37.js} +284 -139
- package/dist/has-BaXnQarR.d.cts +123 -0
- package/dist/has-BaXnQarR.d.ts +123 -0
- package/dist/index.cjs +292 -143
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -1
- package/dist/positioning.cjs +286 -137
- package/dist/positioning.d.cts +161 -2
- package/dist/positioning.d.ts +161 -2
- package/dist/positioning.js +9 -1
- package/dist/sbf.d.cts +2 -123
- package/dist/sbf.d.ts +2 -123
- package/package.json +1 -1
package/dist/positioning.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
4
5
|
import { AntexFile } from './antex.cjs';
|
|
5
6
|
import './ephemeris-BAnBLLB9.cjs';
|
|
6
7
|
import './ecef-CF0uAysr.cjs';
|
|
@@ -706,6 +707,77 @@ declare class SbasProcessor {
|
|
|
706
707
|
private searchIgp;
|
|
707
708
|
}
|
|
708
709
|
|
|
710
|
+
/**
|
|
711
|
+
* Apply SSR / HAS orbit + clock corrections to a broadcast ephemeris to obtain
|
|
712
|
+
* a precise satellite ECEF position and clock offset — the bridge between the
|
|
713
|
+
* decode-only SSR/HAS decoders (`rtcm3/ssr`, `rtcm3/igs-ssr`, `navbits/has`)
|
|
714
|
+
* and a PPP/SPP solve.
|
|
715
|
+
*
|
|
716
|
+
* Convention (internal, "additive"): the orbit deltas are stored in the
|
|
717
|
+
* satellite radial / along-track / cross-track (RAC) frame such that
|
|
718
|
+
*
|
|
719
|
+
* correctedPos = broadcastPos + R·Δ(radial, along, cross)
|
|
720
|
+
* correctedClock = broadcastClock + (c0 + c1·dt + c2·dt²)/c
|
|
721
|
+
*
|
|
722
|
+
* This matches Galileo HAS directly (ICD §7.2–7.3). RTCM-SSR and IGS-SSR use
|
|
723
|
+
* the **opposite** orbit sign, so their adapters negate the orbit deltas when
|
|
724
|
+
* building an {@link OrbitClockCorrection} (see `ssrToOrbitClock`, added with
|
|
725
|
+
* the RTCM/IGS wiring). Clock and bias sign conventions are handled per source
|
|
726
|
+
* in the adapters, not here.
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* A normalized per-satellite orbit + clock correction, ready to apply to a
|
|
731
|
+
* broadcast ephemeris. Additive convention (see file header). Orbit deltas are
|
|
732
|
+
* in the RAC frame in metres, referenced to the broadcast issue-of-data `iod`
|
|
733
|
+
* at `refTimeMs`; optional `dot*` give their linear rate (RTCM/IGS SSR carry
|
|
734
|
+
* these, HAS does not). Clock is a metres polynomial about `refTimeMs`.
|
|
735
|
+
*/
|
|
736
|
+
interface OrbitClockCorrection {
|
|
737
|
+
prn: string;
|
|
738
|
+
/** Broadcast IODE (GPS/…) or IODnav (Galileo) the deltas refer to. */
|
|
739
|
+
iod: number;
|
|
740
|
+
/** Correction reference epoch, GPS-scale ms (matches `computeSatPosition`). */
|
|
741
|
+
refTimeMs: number;
|
|
742
|
+
radial: number;
|
|
743
|
+
along: number;
|
|
744
|
+
cross: number;
|
|
745
|
+
dotRadial?: number;
|
|
746
|
+
dotAlong?: number;
|
|
747
|
+
dotCross?: number;
|
|
748
|
+
/** Clock polynomial (m): c0 + c1·dt + c2·dt². */
|
|
749
|
+
clockC0: number;
|
|
750
|
+
clockC1?: number;
|
|
751
|
+
clockC2?: number;
|
|
752
|
+
/** Additive high-rate clock term (m), when a separate high-rate stream is combined. */
|
|
753
|
+
highRateClock?: number;
|
|
754
|
+
/** Validity window (s) from `refTimeMs`; null = unbounded / unknown. */
|
|
755
|
+
validitySeconds?: number | null;
|
|
756
|
+
}
|
|
757
|
+
/** A corrected satellite state: ECEF position (m) + the clock offset (s) to ADD
|
|
758
|
+
* to the broadcast satellite clock. The caller forms the total clock as
|
|
759
|
+
* `satClockCorrection(eph, t) + clockOffsetS`. */
|
|
760
|
+
interface AppliedOrbitClock {
|
|
761
|
+
x: number;
|
|
762
|
+
y: number;
|
|
763
|
+
z: number;
|
|
764
|
+
clockOffsetS: number;
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Corrected satellite ECEF position + clock offset at emission time `timeMs`,
|
|
768
|
+
* from a broadcast ephemeris and an SSR/HAS orbit-clock correction. Returns
|
|
769
|
+
* null when the correction's IOD doesn't match the ephemeris, the correction
|
|
770
|
+
* has expired, or the orbit can't be computed.
|
|
771
|
+
*/
|
|
772
|
+
declare function applyOrbitClock(eph: Ephemeris, corr: OrbitClockCorrection, timeMs: number): AppliedOrbitClock | null;
|
|
773
|
+
/**
|
|
774
|
+
* Build a normalized {@link OrbitClockCorrection} from a Galileo-HAS orbit
|
|
775
|
+
* correction (+ optional matching clock correction). HAS already uses the
|
|
776
|
+
* additive convention, so no sign flip. Returns null when the orbit deltas are
|
|
777
|
+
* flagged "not available". `refTimeMs` is the message ToH as GPS-scale ms.
|
|
778
|
+
*/
|
|
779
|
+
declare function hasToOrbitClock(orbit: HasOrbitCorrection, clock: HasClockCorrection | undefined, refTimeMs: number, validitySeconds: number | null): OrbitClockCorrection | null;
|
|
780
|
+
|
|
709
781
|
/**
|
|
710
782
|
* ANTEX phase-centre application for PPP: satellite and receiver antenna
|
|
711
783
|
* PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
|
|
@@ -830,6 +902,10 @@ interface PppSatObs {
|
|
|
830
902
|
* the antenna corrections; optional if corrections are off. */
|
|
831
903
|
band1?: string;
|
|
832
904
|
band2?: string;
|
|
905
|
+
/** RINEX-3 tracking codes for the two bands (e.g. '1C','2W'). Used to look
|
|
906
|
+
* up satellite code (OSB) biases from an SSR/HAS source; optional. */
|
|
907
|
+
code1?: string;
|
|
908
|
+
code2?: string;
|
|
833
909
|
/** True if a cycle slip is flagged on either band (LLI or detected). */
|
|
834
910
|
slip: boolean;
|
|
835
911
|
}
|
|
@@ -952,7 +1028,90 @@ interface PppArc {
|
|
|
952
1028
|
startMs: number;
|
|
953
1029
|
endMs: number;
|
|
954
1030
|
}
|
|
955
|
-
|
|
1031
|
+
/** A raw satellite sample at an emission time: ECEF position + velocity
|
|
1032
|
+
* (m, m/s) and the clock offset (s) WITHOUT the periodic relativistic term —
|
|
1033
|
+
* the PPP light-time loop adds relativity + Sagnac. Null when unavailable. */
|
|
1034
|
+
interface SatSample {
|
|
1035
|
+
x: number;
|
|
1036
|
+
y: number;
|
|
1037
|
+
z: number;
|
|
1038
|
+
vx: number;
|
|
1039
|
+
vy: number;
|
|
1040
|
+
vz: number;
|
|
1041
|
+
clkS: number;
|
|
1042
|
+
}
|
|
1043
|
+
/** Supplies precise satellite state to the PPP filter. Implemented by the SP3
|
|
1044
|
+
* path (default) and by an SSR/HAS source (broadcast eph + corrections), so
|
|
1045
|
+
* the same filter runs on precise products or a real-time correction stream. */
|
|
1046
|
+
interface PppEphemerisSource {
|
|
1047
|
+
satState(prn: string, tEmitMs: number): SatSample | null;
|
|
1048
|
+
/** Optional satellite code (OSB) bias (m) for a RINEX-3 tracking code, to
|
|
1049
|
+
* make the pseudorange consistent with the (SSR/HAS) clock reference. The
|
|
1050
|
+
* corrected code is `observed − codeBias`. SP3/CLK sources omit this (the
|
|
1051
|
+
* float ambiguity + broadcast clock reference absorb it). */
|
|
1052
|
+
codeBias?(prn: string, signalCode: string, tEmitMs: number): number | null;
|
|
1053
|
+
}
|
|
1054
|
+
/** Default source: SP3 orbits + clocks, with optional high-rate CLK. Velocity
|
|
1055
|
+
* is a central finite difference (±0.5 s); the clock prefers the high-rate CLK
|
|
1056
|
+
* and falls back to the SP3 5-minute clock — matching the original solver. */
|
|
1057
|
+
declare class Sp3EphemerisSource implements PppEphemerisSource {
|
|
1058
|
+
private readonly sp3;
|
|
1059
|
+
private readonly clk?;
|
|
1060
|
+
constructor(sp3: Sp3File, clk?: ClkFile | undefined);
|
|
1061
|
+
satState(prn: string, tEmitMs: number): SatSample | null;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Streaming float PPP — the forward EKF as a stateful engine fed one epoch at a
|
|
1065
|
+
* time (mirrors {@link RtkFloatEngine}). `process(epoch)` returns that epoch's
|
|
1066
|
+
* result and carries the filter forward; `solution()` finalises the session.
|
|
1067
|
+
* `solvePpp` (below) is a thin batch wrapper. Same estimator as before — a
|
|
1068
|
+
* broadcast/SP3/SSR source supplies satellite state via {@link PppEphemerisSource}.
|
|
1069
|
+
*/
|
|
1070
|
+
declare class PppEngine {
|
|
1071
|
+
private readonly source;
|
|
1072
|
+
private readonly opts;
|
|
1073
|
+
private readonly elevMask;
|
|
1074
|
+
private readonly codeSigma;
|
|
1075
|
+
private readonly phaseSigma;
|
|
1076
|
+
private readonly ztdQ;
|
|
1077
|
+
private readonly kinematic;
|
|
1078
|
+
private readonly corrections?;
|
|
1079
|
+
private readonly truth?;
|
|
1080
|
+
private x;
|
|
1081
|
+
private P;
|
|
1082
|
+
private clkIdx;
|
|
1083
|
+
private clockSeeded;
|
|
1084
|
+
private ambIdx;
|
|
1085
|
+
private lastSeen;
|
|
1086
|
+
private arcs;
|
|
1087
|
+
private arcSnap;
|
|
1088
|
+
private mwState;
|
|
1089
|
+
private series;
|
|
1090
|
+
private ei;
|
|
1091
|
+
private t0;
|
|
1092
|
+
private convergenceSec;
|
|
1093
|
+
private convergedStreak;
|
|
1094
|
+
constructor(opts: PppOptions, source: PppEphemerisSource);
|
|
1095
|
+
/** Reinitialise the filter (fresh session). */
|
|
1096
|
+
reset(): void;
|
|
1097
|
+
private flushArc;
|
|
1098
|
+
/** Detect a cycle slip via the Melbourne–Wübbena wide-lane ambiguity. */
|
|
1099
|
+
private detectSlip;
|
|
1100
|
+
private growState;
|
|
1101
|
+
private dropState;
|
|
1102
|
+
/** State index of a constellation's receiver clock, creating it lazily. */
|
|
1103
|
+
private clockOf;
|
|
1104
|
+
/** Process one epoch, carrying the filter forward; returns its result. */
|
|
1105
|
+
process(epoch: PppEpoch): PppEpochResult;
|
|
1106
|
+
/** Finalise the session: capture the AR state, flush open arcs, assemble. */
|
|
1107
|
+
solution(): PppSolution;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Static/kinematic float PPP over a whole session — a thin batch wrapper that
|
|
1111
|
+
* drives {@link PppEngine} epoch by epoch. Accepts an Sp3File (wrapped as the
|
|
1112
|
+
* default source) or any {@link PppEphemerisSource} (e.g. SSR/HAS-fed).
|
|
1113
|
+
*/
|
|
1114
|
+
declare function solvePpp(epochs: PppEpoch[], sp3OrSource: Sp3File | PppEphemerisSource, opts: PppOptions): PppSolution;
|
|
956
1115
|
|
|
957
1116
|
/**
|
|
958
1117
|
* Troposphere for PPP: a-priori Saastamoinen zenith hydrostatic delay
|
|
@@ -1408,4 +1567,4 @@ declare function sbasProtectionLevels(sats: readonly {
|
|
|
1408
1567
|
*/
|
|
1409
1568
|
declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
|
|
1410
1569
|
|
|
1411
|
-
export { type AntennaOffset, 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 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 SbasCorrectionSource, type SbasIgp, 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, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
|
|
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 };
|
package/dist/positioning.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
4
5
|
import { AntexFile } from './antex.js';
|
|
5
6
|
import './ephemeris-BAnBLLB9.js';
|
|
6
7
|
import './ecef-CF0uAysr.js';
|
|
@@ -706,6 +707,77 @@ declare class SbasProcessor {
|
|
|
706
707
|
private searchIgp;
|
|
707
708
|
}
|
|
708
709
|
|
|
710
|
+
/**
|
|
711
|
+
* Apply SSR / HAS orbit + clock corrections to a broadcast ephemeris to obtain
|
|
712
|
+
* a precise satellite ECEF position and clock offset — the bridge between the
|
|
713
|
+
* decode-only SSR/HAS decoders (`rtcm3/ssr`, `rtcm3/igs-ssr`, `navbits/has`)
|
|
714
|
+
* and a PPP/SPP solve.
|
|
715
|
+
*
|
|
716
|
+
* Convention (internal, "additive"): the orbit deltas are stored in the
|
|
717
|
+
* satellite radial / along-track / cross-track (RAC) frame such that
|
|
718
|
+
*
|
|
719
|
+
* correctedPos = broadcastPos + R·Δ(radial, along, cross)
|
|
720
|
+
* correctedClock = broadcastClock + (c0 + c1·dt + c2·dt²)/c
|
|
721
|
+
*
|
|
722
|
+
* This matches Galileo HAS directly (ICD §7.2–7.3). RTCM-SSR and IGS-SSR use
|
|
723
|
+
* the **opposite** orbit sign, so their adapters negate the orbit deltas when
|
|
724
|
+
* building an {@link OrbitClockCorrection} (see `ssrToOrbitClock`, added with
|
|
725
|
+
* the RTCM/IGS wiring). Clock and bias sign conventions are handled per source
|
|
726
|
+
* in the adapters, not here.
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* A normalized per-satellite orbit + clock correction, ready to apply to a
|
|
731
|
+
* broadcast ephemeris. Additive convention (see file header). Orbit deltas are
|
|
732
|
+
* in the RAC frame in metres, referenced to the broadcast issue-of-data `iod`
|
|
733
|
+
* at `refTimeMs`; optional `dot*` give their linear rate (RTCM/IGS SSR carry
|
|
734
|
+
* these, HAS does not). Clock is a metres polynomial about `refTimeMs`.
|
|
735
|
+
*/
|
|
736
|
+
interface OrbitClockCorrection {
|
|
737
|
+
prn: string;
|
|
738
|
+
/** Broadcast IODE (GPS/…) or IODnav (Galileo) the deltas refer to. */
|
|
739
|
+
iod: number;
|
|
740
|
+
/** Correction reference epoch, GPS-scale ms (matches `computeSatPosition`). */
|
|
741
|
+
refTimeMs: number;
|
|
742
|
+
radial: number;
|
|
743
|
+
along: number;
|
|
744
|
+
cross: number;
|
|
745
|
+
dotRadial?: number;
|
|
746
|
+
dotAlong?: number;
|
|
747
|
+
dotCross?: number;
|
|
748
|
+
/** Clock polynomial (m): c0 + c1·dt + c2·dt². */
|
|
749
|
+
clockC0: number;
|
|
750
|
+
clockC1?: number;
|
|
751
|
+
clockC2?: number;
|
|
752
|
+
/** Additive high-rate clock term (m), when a separate high-rate stream is combined. */
|
|
753
|
+
highRateClock?: number;
|
|
754
|
+
/** Validity window (s) from `refTimeMs`; null = unbounded / unknown. */
|
|
755
|
+
validitySeconds?: number | null;
|
|
756
|
+
}
|
|
757
|
+
/** A corrected satellite state: ECEF position (m) + the clock offset (s) to ADD
|
|
758
|
+
* to the broadcast satellite clock. The caller forms the total clock as
|
|
759
|
+
* `satClockCorrection(eph, t) + clockOffsetS`. */
|
|
760
|
+
interface AppliedOrbitClock {
|
|
761
|
+
x: number;
|
|
762
|
+
y: number;
|
|
763
|
+
z: number;
|
|
764
|
+
clockOffsetS: number;
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Corrected satellite ECEF position + clock offset at emission time `timeMs`,
|
|
768
|
+
* from a broadcast ephemeris and an SSR/HAS orbit-clock correction. Returns
|
|
769
|
+
* null when the correction's IOD doesn't match the ephemeris, the correction
|
|
770
|
+
* has expired, or the orbit can't be computed.
|
|
771
|
+
*/
|
|
772
|
+
declare function applyOrbitClock(eph: Ephemeris, corr: OrbitClockCorrection, timeMs: number): AppliedOrbitClock | null;
|
|
773
|
+
/**
|
|
774
|
+
* Build a normalized {@link OrbitClockCorrection} from a Galileo-HAS orbit
|
|
775
|
+
* correction (+ optional matching clock correction). HAS already uses the
|
|
776
|
+
* additive convention, so no sign flip. Returns null when the orbit deltas are
|
|
777
|
+
* flagged "not available". `refTimeMs` is the message ToH as GPS-scale ms.
|
|
778
|
+
*/
|
|
779
|
+
declare function hasToOrbitClock(orbit: HasOrbitCorrection, clock: HasClockCorrection | undefined, refTimeMs: number, validitySeconds: number | null): OrbitClockCorrection | null;
|
|
780
|
+
|
|
709
781
|
/**
|
|
710
782
|
* ANTEX phase-centre application for PPP: satellite and receiver antenna
|
|
711
783
|
* PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
|
|
@@ -830,6 +902,10 @@ interface PppSatObs {
|
|
|
830
902
|
* the antenna corrections; optional if corrections are off. */
|
|
831
903
|
band1?: string;
|
|
832
904
|
band2?: string;
|
|
905
|
+
/** RINEX-3 tracking codes for the two bands (e.g. '1C','2W'). Used to look
|
|
906
|
+
* up satellite code (OSB) biases from an SSR/HAS source; optional. */
|
|
907
|
+
code1?: string;
|
|
908
|
+
code2?: string;
|
|
833
909
|
/** True if a cycle slip is flagged on either band (LLI or detected). */
|
|
834
910
|
slip: boolean;
|
|
835
911
|
}
|
|
@@ -952,7 +1028,90 @@ interface PppArc {
|
|
|
952
1028
|
startMs: number;
|
|
953
1029
|
endMs: number;
|
|
954
1030
|
}
|
|
955
|
-
|
|
1031
|
+
/** A raw satellite sample at an emission time: ECEF position + velocity
|
|
1032
|
+
* (m, m/s) and the clock offset (s) WITHOUT the periodic relativistic term —
|
|
1033
|
+
* the PPP light-time loop adds relativity + Sagnac. Null when unavailable. */
|
|
1034
|
+
interface SatSample {
|
|
1035
|
+
x: number;
|
|
1036
|
+
y: number;
|
|
1037
|
+
z: number;
|
|
1038
|
+
vx: number;
|
|
1039
|
+
vy: number;
|
|
1040
|
+
vz: number;
|
|
1041
|
+
clkS: number;
|
|
1042
|
+
}
|
|
1043
|
+
/** Supplies precise satellite state to the PPP filter. Implemented by the SP3
|
|
1044
|
+
* path (default) and by an SSR/HAS source (broadcast eph + corrections), so
|
|
1045
|
+
* the same filter runs on precise products or a real-time correction stream. */
|
|
1046
|
+
interface PppEphemerisSource {
|
|
1047
|
+
satState(prn: string, tEmitMs: number): SatSample | null;
|
|
1048
|
+
/** Optional satellite code (OSB) bias (m) for a RINEX-3 tracking code, to
|
|
1049
|
+
* make the pseudorange consistent with the (SSR/HAS) clock reference. The
|
|
1050
|
+
* corrected code is `observed − codeBias`. SP3/CLK sources omit this (the
|
|
1051
|
+
* float ambiguity + broadcast clock reference absorb it). */
|
|
1052
|
+
codeBias?(prn: string, signalCode: string, tEmitMs: number): number | null;
|
|
1053
|
+
}
|
|
1054
|
+
/** Default source: SP3 orbits + clocks, with optional high-rate CLK. Velocity
|
|
1055
|
+
* is a central finite difference (±0.5 s); the clock prefers the high-rate CLK
|
|
1056
|
+
* and falls back to the SP3 5-minute clock — matching the original solver. */
|
|
1057
|
+
declare class Sp3EphemerisSource implements PppEphemerisSource {
|
|
1058
|
+
private readonly sp3;
|
|
1059
|
+
private readonly clk?;
|
|
1060
|
+
constructor(sp3: Sp3File, clk?: ClkFile | undefined);
|
|
1061
|
+
satState(prn: string, tEmitMs: number): SatSample | null;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Streaming float PPP — the forward EKF as a stateful engine fed one epoch at a
|
|
1065
|
+
* time (mirrors {@link RtkFloatEngine}). `process(epoch)` returns that epoch's
|
|
1066
|
+
* result and carries the filter forward; `solution()` finalises the session.
|
|
1067
|
+
* `solvePpp` (below) is a thin batch wrapper. Same estimator as before — a
|
|
1068
|
+
* broadcast/SP3/SSR source supplies satellite state via {@link PppEphemerisSource}.
|
|
1069
|
+
*/
|
|
1070
|
+
declare class PppEngine {
|
|
1071
|
+
private readonly source;
|
|
1072
|
+
private readonly opts;
|
|
1073
|
+
private readonly elevMask;
|
|
1074
|
+
private readonly codeSigma;
|
|
1075
|
+
private readonly phaseSigma;
|
|
1076
|
+
private readonly ztdQ;
|
|
1077
|
+
private readonly kinematic;
|
|
1078
|
+
private readonly corrections?;
|
|
1079
|
+
private readonly truth?;
|
|
1080
|
+
private x;
|
|
1081
|
+
private P;
|
|
1082
|
+
private clkIdx;
|
|
1083
|
+
private clockSeeded;
|
|
1084
|
+
private ambIdx;
|
|
1085
|
+
private lastSeen;
|
|
1086
|
+
private arcs;
|
|
1087
|
+
private arcSnap;
|
|
1088
|
+
private mwState;
|
|
1089
|
+
private series;
|
|
1090
|
+
private ei;
|
|
1091
|
+
private t0;
|
|
1092
|
+
private convergenceSec;
|
|
1093
|
+
private convergedStreak;
|
|
1094
|
+
constructor(opts: PppOptions, source: PppEphemerisSource);
|
|
1095
|
+
/** Reinitialise the filter (fresh session). */
|
|
1096
|
+
reset(): void;
|
|
1097
|
+
private flushArc;
|
|
1098
|
+
/** Detect a cycle slip via the Melbourne–Wübbena wide-lane ambiguity. */
|
|
1099
|
+
private detectSlip;
|
|
1100
|
+
private growState;
|
|
1101
|
+
private dropState;
|
|
1102
|
+
/** State index of a constellation's receiver clock, creating it lazily. */
|
|
1103
|
+
private clockOf;
|
|
1104
|
+
/** Process one epoch, carrying the filter forward; returns its result. */
|
|
1105
|
+
process(epoch: PppEpoch): PppEpochResult;
|
|
1106
|
+
/** Finalise the session: capture the AR state, flush open arcs, assemble. */
|
|
1107
|
+
solution(): PppSolution;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Static/kinematic float PPP over a whole session — a thin batch wrapper that
|
|
1111
|
+
* drives {@link PppEngine} epoch by epoch. Accepts an Sp3File (wrapped as the
|
|
1112
|
+
* default source) or any {@link PppEphemerisSource} (e.g. SSR/HAS-fed).
|
|
1113
|
+
*/
|
|
1114
|
+
declare function solvePpp(epochs: PppEpoch[], sp3OrSource: Sp3File | PppEphemerisSource, opts: PppOptions): PppSolution;
|
|
956
1115
|
|
|
957
1116
|
/**
|
|
958
1117
|
* Troposphere for PPP: a-priori Saastamoinen zenith hydrostatic delay
|
|
@@ -1408,4 +1567,4 @@ declare function sbasProtectionLevels(sats: readonly {
|
|
|
1408
1567
|
*/
|
|
1409
1568
|
declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
|
|
1410
1569
|
|
|
1411
|
-
export { type AntennaOffset, 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 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 SbasCorrectionSource, type SbasIgp, 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, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength };
|
|
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 };
|
package/dist/positioning.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IONO_L1_M_PER_TECU,
|
|
3
|
+
PppEngine,
|
|
3
4
|
RtkFloatEngine,
|
|
4
5
|
SbasProcessor,
|
|
6
|
+
Sp3EphemerisSource,
|
|
7
|
+
applyOrbitClock,
|
|
5
8
|
buildPppAntenna,
|
|
6
9
|
createPppCorrections,
|
|
7
10
|
estimateNarrowlaneFcb,
|
|
@@ -12,6 +15,7 @@ import {
|
|
|
12
15
|
gimSlantIonoDelayL1,
|
|
13
16
|
gimVerticalTec,
|
|
14
17
|
gmst,
|
|
18
|
+
hasToOrbitClock,
|
|
15
19
|
ionoFree,
|
|
16
20
|
klobucharDelay,
|
|
17
21
|
lambdaReduction,
|
|
@@ -32,7 +36,7 @@ import {
|
|
|
32
36
|
sunEcef,
|
|
33
37
|
toRtkEpoch,
|
|
34
38
|
wlWavelength
|
|
35
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-DWUQRJ37.js";
|
|
36
40
|
import "./chunk-WQX354KD.js";
|
|
37
41
|
import "./chunk-JYWYQ7DW.js";
|
|
38
42
|
import "./chunk-HVXYFUCB.js";
|
|
@@ -46,8 +50,11 @@ import "./chunk-V2D5KUKH.js";
|
|
|
46
50
|
import "./chunk-FIEWO4J4.js";
|
|
47
51
|
export {
|
|
48
52
|
IONO_L1_M_PER_TECU,
|
|
53
|
+
PppEngine,
|
|
49
54
|
RtkFloatEngine,
|
|
50
55
|
SbasProcessor,
|
|
56
|
+
Sp3EphemerisSource,
|
|
57
|
+
applyOrbitClock,
|
|
51
58
|
buildPppAntenna,
|
|
52
59
|
createPppCorrections,
|
|
53
60
|
estimateNarrowlaneFcb,
|
|
@@ -58,6 +65,7 @@ export {
|
|
|
58
65
|
gimSlantIonoDelayL1,
|
|
59
66
|
gimVerticalTec,
|
|
60
67
|
gmst,
|
|
68
|
+
hasToOrbitClock,
|
|
61
69
|
ionoFree,
|
|
62
70
|
klobucharDelay,
|
|
63
71
|
lambdaReduction,
|
package/dist/sbf.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { S as SbfAlmanac, a as SbfAlmanacResult, b as SbfGlonassAlmanac, c as SbfKeplerAlmanac, d as SbfNavResult, p as parseSbfAlmanac, e as parseSbfNav } from './nav-BYmYoh9A.cjs';
|
|
2
2
|
import { R as ReceiverPvt } from './receiver-pvt-CVFvi4kT.cjs';
|
|
3
3
|
import { K as KeplerEphemeris, C as CnavEphemeris, G as GlonassEphemeris, E as Ephemeris } from './nav-DImXUdbp.cjs';
|
|
4
|
+
import { H as HasMessage } from './has-BaXnQarR.cjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Septentrio SBF framing shared by the measurement and navigation
|
|
@@ -496,128 +497,6 @@ declare function sbasL5MessageName(type: number): string;
|
|
|
496
497
|
/** True for L5 types that carry actual corrections (vs test/null/spare). */
|
|
497
498
|
declare function isSbasL5Correction(type: number): boolean;
|
|
498
499
|
|
|
499
|
-
/** Constellations HAS corrects: GPS (GNSS ID 0), Galileo (GNSS ID 2). */
|
|
500
|
-
type HasSystem = 'G' | 'E';
|
|
501
|
-
/** One system's satellite/signal mask (ICD §6.4.3). */
|
|
502
|
-
interface HasSystemMask {
|
|
503
|
-
/** GNSS ID as broadcast: 0 GPS, 2 Galileo. */
|
|
504
|
-
gnssId: number;
|
|
505
|
-
system: HasSystem;
|
|
506
|
-
/** Masked satellites in mask order, e.g. ["E03", "E05", ...]. */
|
|
507
|
-
prns: string[];
|
|
508
|
-
/** Set bits of the 16-bit signal mask, ascending. */
|
|
509
|
-
signalIndices: number[];
|
|
510
|
-
/** ICD names for `signalIndices`. */
|
|
511
|
-
signals: string[];
|
|
512
|
-
/**
|
|
513
|
-
* Cell mask, [satellite][signal] in mask order — true when the
|
|
514
|
-
* sat×signal combination carries biases. Null when the cell-mask
|
|
515
|
-
* availability flag is 0 (all combinations available).
|
|
516
|
-
*/
|
|
517
|
-
cellMask: boolean[][] | null;
|
|
518
|
-
/** Nav-message index the corrections refer to (0 = LNAV / I/NAV). */
|
|
519
|
-
navMessage: number;
|
|
520
|
-
}
|
|
521
|
-
/** The satellite/signal mask block of one mask ID. */
|
|
522
|
-
interface HasMasks {
|
|
523
|
-
maskId: number;
|
|
524
|
-
systems: HasSystemMask[];
|
|
525
|
-
}
|
|
526
|
-
/** Orbit correction for one satellite (ICD §6.5). */
|
|
527
|
-
interface HasOrbitCorrection {
|
|
528
|
-
system: HasSystem;
|
|
529
|
-
prn: string;
|
|
530
|
-
/** Broadcast issue of data the deltas refer to (IODE / IODNav). */
|
|
531
|
-
gnssIod: number;
|
|
532
|
-
/** Delta radial in m (LSB 0.0025), null = data not available. */
|
|
533
|
-
deltaRadial: number | null;
|
|
534
|
-
/** Delta in-track in m (LSB 0.008), null = data not available. */
|
|
535
|
-
deltaInTrack: number | null;
|
|
536
|
-
/** Delta cross-track in m (LSB 0.008), null = data not available. */
|
|
537
|
-
deltaCrossTrack: number | null;
|
|
538
|
-
}
|
|
539
|
-
interface HasOrbitBlock {
|
|
540
|
-
validityIndex: number;
|
|
541
|
-
/** Validity interval in s (null = reserved index 15). */
|
|
542
|
-
validitySeconds: number | null;
|
|
543
|
-
corrections: HasOrbitCorrection[];
|
|
544
|
-
}
|
|
545
|
-
/** Clock correction for one satellite (ICD §6.6-6.7). */
|
|
546
|
-
interface HasClockCorrection {
|
|
547
|
-
system: HasSystem;
|
|
548
|
-
prn: string;
|
|
549
|
-
/**
|
|
550
|
-
* Delta clock C0 in m, multiplier folded in; positive means the
|
|
551
|
-
* satellite clock offset grows (add Δclock/c to the broadcast
|
|
552
|
-
* clock). Null when data not available or the satellite is flagged
|
|
553
|
-
* "shall not be used" (see `notUsable`).
|
|
554
|
-
*/
|
|
555
|
-
deltaClock: number | null;
|
|
556
|
-
/** True for the reserved "insufficient accuracy, do not use" value. */
|
|
557
|
-
notUsable: boolean;
|
|
558
|
-
}
|
|
559
|
-
interface HasClockBlock {
|
|
560
|
-
validityIndex: number;
|
|
561
|
-
validitySeconds: number | null;
|
|
562
|
-
/** Delta-clock C0 multiplier per system (1-4), in mask order. */
|
|
563
|
-
multipliers: {
|
|
564
|
-
system: HasSystem;
|
|
565
|
-
multiplier: number;
|
|
566
|
-
}[];
|
|
567
|
-
corrections: HasClockCorrection[];
|
|
568
|
-
}
|
|
569
|
-
/** Code or phase bias of one satellite × signal cell (ICD §6.8-6.9). */
|
|
570
|
-
interface HasSignalBias {
|
|
571
|
-
system: HasSystem;
|
|
572
|
-
prn: string;
|
|
573
|
-
signalIndex: number;
|
|
574
|
-
signal: string;
|
|
575
|
-
/** Bias in m (code, LSB 0.02) or cycles (phase, LSB 0.01); null = N/A. */
|
|
576
|
-
bias: number | null;
|
|
577
|
-
/** Phase-discontinuity indicator (phase biases only). */
|
|
578
|
-
discontinuity?: number;
|
|
579
|
-
}
|
|
580
|
-
interface HasBiasBlock {
|
|
581
|
-
validityIndex: number;
|
|
582
|
-
validitySeconds: number | null;
|
|
583
|
-
biases: HasSignalBias[];
|
|
584
|
-
}
|
|
585
|
-
/** Which sub-blocks the MT1 header flags as present (ICD §6.2). */
|
|
586
|
-
interface HasContentFlags {
|
|
587
|
-
mask: boolean;
|
|
588
|
-
orbit: boolean;
|
|
589
|
-
clockFullSet: boolean;
|
|
590
|
-
clockSubset: boolean;
|
|
591
|
-
codeBias: boolean;
|
|
592
|
-
phaseBias: boolean;
|
|
593
|
-
}
|
|
594
|
-
/** One decoded HAS MT1 message. */
|
|
595
|
-
interface HasMessage {
|
|
596
|
-
/** Receiver time of week (s) of the page completing the message. */
|
|
597
|
-
tow?: number;
|
|
598
|
-
/** HAS status of the carrying pages (0 test, 1 operational). */
|
|
599
|
-
status: number;
|
|
600
|
-
messageId: number;
|
|
601
|
-
/** Message size in pages (= pages used for the RS decode). */
|
|
602
|
-
messageSize: number;
|
|
603
|
-
/** Time of hour of the corrections, s (0-3599, ICD §6.2). */
|
|
604
|
-
toh: number;
|
|
605
|
-
maskId: number;
|
|
606
|
-
iodSetId: number;
|
|
607
|
-
flags: HasContentFlags;
|
|
608
|
-
/** The mask block in force (own or cached, see `maskFromCache`). */
|
|
609
|
-
masks?: HasMasks;
|
|
610
|
-
/** True when `masks` came from an earlier message with this mask ID. */
|
|
611
|
-
maskFromCache: boolean;
|
|
612
|
-
orbit?: HasOrbitBlock;
|
|
613
|
-
clockFullSet?: HasClockBlock;
|
|
614
|
-
clockSubset?: HasClockBlock;
|
|
615
|
-
codeBias?: HasBiasBlock;
|
|
616
|
-
phaseBias?: HasBiasBlock;
|
|
617
|
-
/** Null when fully parsed, else why the sub-blocks are missing. */
|
|
618
|
-
parseError: string | null;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
500
|
/**
|
|
622
501
|
* Septentrio SBF GALRawCNAV (4024) blocks: one 492-bit Galileo E6-B
|
|
623
502
|
* C/NAV page per block (after deinterleaving and Viterbi decoding),
|
|
@@ -731,4 +610,4 @@ interface SbfParseResult {
|
|
|
731
610
|
*/
|
|
732
611
|
declare function parseSbfMeas(data: Uint8Array): SbfParseResult;
|
|
733
612
|
|
|
734
|
-
export { CnavEphemeris, type DfmcCensus, type DfmcMessageCb, type GeoL5Result,
|
|
613
|
+
export { CnavEphemeris, type DfmcCensus, type DfmcMessageCb, type GeoL5Result, HasMessage, ReceiverPvt, SBAS_L5_MT_NAMES, SBAS_L5_PREAMBLE_UW, type SbasMessageCb, type SbfBdsNavResult, type SbfCnavEphemeris, type SbfCnavResult, type SbfGalEphemeris, type SbfGalNavResult, type SbfGeoL5Result, type SbfGeoNavResult, type SbfGloNavResult, type SbfGpsNavResult, type SbfHasMessage, type SbfHasResult, type SbfIonoUtcResult, type SbfMeasEpoch, type SbfMeasurement, type SbfNavCounts, type SbfNavigation, type SbfParseResult, type SbfPvt, type SbfPvtResult, type SbfReceiverSetup, decodeSbfNavigation, feedGeoBlock, feedGeoL5Block, isSbasL1Preamble, isSbasL5Correction, parseSbfBdsNav, parseSbfCnav, parseSbfGalNav, parseSbfGeoL5, parseSbfGeoNav, parseSbfGloNav, parseSbfGpsNav, parseSbfHas, parseSbfIonoUtc, parseSbfMeas, parseSbfPvt, parseSbfReceiverSetup, sbasL5MessageName, sbasL5MessageType, crc16 as sbfCrc16, scanSbfFrames };
|