gnss-js 1.27.0 → 1.29.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-4KMWWCUR.js +120 -0
- package/dist/{chunk-4XGKCVE3.js → chunk-5WHKMKIB.js} +827 -2
- package/dist/{chunk-QVNNHACQ.js → chunk-6GTS5MVI.js} +0 -118
- package/dist/index.cjs +847 -19
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -4
- package/dist/positioning.cjs +900 -1
- package/dist/positioning.d.cts +231 -2
- package/dist/positioning.d.ts +231 -2
- package/dist/positioning.js +18 -1
- package/dist/rinex.d.cts +2 -49
- package/dist/rinex.d.ts +2 -49
- package/dist/rinex.js +5 -3
- package/dist/sp3-BAq8l39b.d.cts +70 -0
- package/dist/sp3-BAq8l39b.d.ts +70 -0
- package/package.json +1 -1
- package/dist/ionex-DaW5x9nq.d.cts +0 -23
- package/dist/ionex-DaW5x9nq.d.ts +0 -23
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
|
-
import { I as IonexGrid } from './
|
|
3
|
+
import { I as IonexGrid, S as Sp3File } from './sp3-BAq8l39b.cjs';
|
|
4
|
+
import { AntexFile } from './antex.cjs';
|
|
4
5
|
import './ephemeris-Ohl6NAfw.cjs';
|
|
5
6
|
import './ecef-CF0uAysr.cjs';
|
|
6
7
|
import './nav-BYmYoh9A.cjs';
|
|
@@ -480,6 +481,234 @@ declare function lambdaSearch(a: Float64Array, Q: Float64Array, n: number, m?: n
|
|
|
480
481
|
*/
|
|
481
482
|
declare function lambdaReduction(Q: Float64Array, n: number): Float64Array | null;
|
|
482
483
|
|
|
484
|
+
/**
|
|
485
|
+
* ANTEX phase-centre application for PPP: satellite and receiver antenna
|
|
486
|
+
* PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
|
|
487
|
+
* combined, with the nominal yaw-steering satellite attitude used to
|
|
488
|
+
* rotate the satellite PCO from the body frame into ECEF.
|
|
489
|
+
*/
|
|
490
|
+
|
|
491
|
+
interface AntennaOffset {
|
|
492
|
+
/** IF-combined PCO (m): satellite → body-frame [X,Y,Z]; receiver → ENU. */
|
|
493
|
+
pco: [number, number, number];
|
|
494
|
+
/** IF-combined no-azimuth PCV samples (m) over zenith/nadir angle. */
|
|
495
|
+
pcvZen1Deg: number;
|
|
496
|
+
pcvDzenDeg: number;
|
|
497
|
+
pcvNoazi: number[];
|
|
498
|
+
}
|
|
499
|
+
interface PppAntennaModel {
|
|
500
|
+
satOffset(prn: string, dateMs: number, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
|
|
501
|
+
rcvOffset(antType: string, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
|
|
502
|
+
}
|
|
503
|
+
declare function buildPppAntenna(antex: AntexFile): PppAntennaModel;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Optional PPP range corrections: satellite & receiver antenna phase-centre
|
|
507
|
+
* offsets, phase wind-up, and solid-earth tides. These take a converged
|
|
508
|
+
* float PPP solution from ~decimetre toward centimetre.
|
|
509
|
+
*
|
|
510
|
+
* Everything here is opt-in via `PppOptions.corrections`; the core solver
|
|
511
|
+
* runs without it. Corrections needing Sun/Moon geometry are computed once
|
|
512
|
+
* per epoch in `epochContext` and reused across satellites.
|
|
513
|
+
*/
|
|
514
|
+
/** Per-satellite geometry handed to the correction models. */
|
|
515
|
+
interface SatGeom {
|
|
516
|
+
prn: string;
|
|
517
|
+
satEcef: [number, number, number];
|
|
518
|
+
rcvEcef: [number, number, number];
|
|
519
|
+
/** Unit line of sight, receiver → satellite. */
|
|
520
|
+
los: [number, number, number];
|
|
521
|
+
elRad: number;
|
|
522
|
+
azRad: number;
|
|
523
|
+
f1: number;
|
|
524
|
+
f2: number;
|
|
525
|
+
/** ANTEX frequency codes for the two bands (e.g. 'G01','G02'). */
|
|
526
|
+
band1?: string;
|
|
527
|
+
band2?: string;
|
|
528
|
+
/** Iono-free coefficient g = f1²/(f1²−f2²). */
|
|
529
|
+
g: number;
|
|
530
|
+
}
|
|
531
|
+
/** Epoch-level context (Sun/Moon positions, tide displacement). */
|
|
532
|
+
interface PppEpochContext {
|
|
533
|
+
timeMs: number;
|
|
534
|
+
/** Sun position, ECEF (m). */
|
|
535
|
+
sun: [number, number, number];
|
|
536
|
+
/** Moon position, ECEF (m). */
|
|
537
|
+
moon: [number, number, number];
|
|
538
|
+
/** Solid-earth-tide receiver displacement, ECEF (m). */
|
|
539
|
+
tideDisp: [number, number, number];
|
|
540
|
+
}
|
|
541
|
+
interface CorrectionResult {
|
|
542
|
+
/** Additive range correction applied to BOTH code and phase (m). */
|
|
543
|
+
rangeM: number;
|
|
544
|
+
/** Additional phase-only correction (wind-up), metres. */
|
|
545
|
+
phaseWindupM: number;
|
|
546
|
+
}
|
|
547
|
+
/** Correction configuration + hooks. Supplied by the caller. */
|
|
548
|
+
interface PppCorrections {
|
|
549
|
+
/** Build the per-epoch Sun/Moon/tide context. */
|
|
550
|
+
epochContext?: (timeMs: number, rcvEcef: [number, number, number]) => PppEpochContext;
|
|
551
|
+
/** Per-satellite correction evaluator. */
|
|
552
|
+
evaluate?: (geom: SatGeom, ctx: PppEpochContext | null) => CorrectionResult;
|
|
553
|
+
}
|
|
554
|
+
interface PppCorrectionConfig {
|
|
555
|
+
antenna: PppAntennaModel;
|
|
556
|
+
/** Receiver antenna type (RINEX header "ANT # / TYPE"). */
|
|
557
|
+
rcvAntType: string;
|
|
558
|
+
/** Marker→ARP offset in local ENU (m). RINEX "ANTENNA: DELTA H/E/N"
|
|
559
|
+
* is [Up, East, North] → pass as [E, N, U]. */
|
|
560
|
+
antDeltaEnu?: [number, number, number];
|
|
561
|
+
satPco?: boolean;
|
|
562
|
+
rcvPco?: boolean;
|
|
563
|
+
tides?: boolean;
|
|
564
|
+
windup?: boolean;
|
|
565
|
+
}
|
|
566
|
+
/** Wire satellite/receiver antenna + tides + wind-up into a PppCorrections. */
|
|
567
|
+
declare function createPppCorrections(cfg: PppCorrectionConfig): PppCorrections;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Static float Precise Point Positioning (PPP).
|
|
571
|
+
*
|
|
572
|
+
* Dual-frequency ionosphere-free code + carrier phase, precise satellite
|
|
573
|
+
* orbits and clocks (SP3), a forward Extended Kalman Filter estimating
|
|
574
|
+
* [position, receiver clock, zenith wet troposphere, one float ambiguity
|
|
575
|
+
* per satellite arc]. No base station — absolute cm–dm coordinates from a
|
|
576
|
+
* single observation file.
|
|
577
|
+
*
|
|
578
|
+
* Corrections applied (see PppOptions to toggle the optional ones):
|
|
579
|
+
* - precise satellite orbit + clock (SP3, Lagrange / linear)
|
|
580
|
+
* - periodic relativistic satellite-clock term (−2·r·v/c²)
|
|
581
|
+
* - Earth-rotation (Sagnac) during signal transit
|
|
582
|
+
* - dry troposphere (Saastamoinen ZHD, a priori) + estimated wet ZWD,
|
|
583
|
+
* mapped by the Niell mapping function
|
|
584
|
+
* - elevation-dependent weighting, cycle-slip re-initialisation
|
|
585
|
+
* - (optional, added by the caller supplying products) satellite &
|
|
586
|
+
* receiver antenna phase-centre offsets, phase wind-up, solid-earth tides
|
|
587
|
+
*
|
|
588
|
+
* The ionosphere-free combination removes the first-order ionosphere; the
|
|
589
|
+
* float ambiguity absorbs the phase biases and the integer cycles.
|
|
590
|
+
*/
|
|
591
|
+
|
|
592
|
+
/** One satellite's dual-frequency observation at an epoch. */
|
|
593
|
+
interface PppSatObs {
|
|
594
|
+
prn: string;
|
|
595
|
+
/** Band-1 / band-2 centre frequencies (Hz). */
|
|
596
|
+
f1: number;
|
|
597
|
+
f2: number;
|
|
598
|
+
/** Pseudorange on band 1 / band 2 (metres). */
|
|
599
|
+
c1: number;
|
|
600
|
+
c2: number;
|
|
601
|
+
/** Carrier phase on band 1 / band 2 (cycles). */
|
|
602
|
+
l1: number;
|
|
603
|
+
l2: number;
|
|
604
|
+
/** ANTEX frequency codes for the two bands (e.g. 'G01','G02'). Used by
|
|
605
|
+
* the antenna corrections; optional if corrections are off. */
|
|
606
|
+
band1?: string;
|
|
607
|
+
band2?: string;
|
|
608
|
+
/** True if a cycle slip is flagged on either band (LLI or detected). */
|
|
609
|
+
slip: boolean;
|
|
610
|
+
}
|
|
611
|
+
interface PppEpoch {
|
|
612
|
+
/** GPS-scale epoch time (ms). */
|
|
613
|
+
timeMs: number;
|
|
614
|
+
obs: PppSatObs[];
|
|
615
|
+
}
|
|
616
|
+
interface PppOptions {
|
|
617
|
+
/** A priori receiver ECEF position (m). Required — from the RINEX header
|
|
618
|
+
* approx position or an SPP solution. */
|
|
619
|
+
aprioriPos: [number, number, number];
|
|
620
|
+
/** Ground-truth ECEF (m) for reporting ENU error in the series. */
|
|
621
|
+
groundTruth?: [number, number, number];
|
|
622
|
+
/** Elevation cutoff (deg). Default 10. */
|
|
623
|
+
elevationMaskDeg?: number;
|
|
624
|
+
/** Optional corrections (antenna PCO/PCV, wind-up, tides). */
|
|
625
|
+
corrections?: PppCorrections;
|
|
626
|
+
/** IF code σ at zenith (m). Default 3.0 (already IF-inflated). */
|
|
627
|
+
codeSigma?: number;
|
|
628
|
+
/** IF phase σ at zenith (m). Default 0.01. */
|
|
629
|
+
phaseSigma?: number;
|
|
630
|
+
/** Wet-troposphere random-walk process noise (m²/epoch). Default 1e-8. */
|
|
631
|
+
ztdProcessNoise?: number;
|
|
632
|
+
/** Model + estimate the troposphere. Default true. */
|
|
633
|
+
troposphere?: boolean;
|
|
634
|
+
}
|
|
635
|
+
interface PppEpochResult {
|
|
636
|
+
timeMs: number;
|
|
637
|
+
/** ENU error vs ground truth (m), if truth given. */
|
|
638
|
+
enu: [number, number, number] | null;
|
|
639
|
+
/** 3D error vs ground truth (m), if truth given. */
|
|
640
|
+
error3d: number | null;
|
|
641
|
+
position: [number, number, number];
|
|
642
|
+
nSats: number;
|
|
643
|
+
/** Estimated zenith wet delay (m). */
|
|
644
|
+
ztdWet: number;
|
|
645
|
+
/** RMS of post-fit phase residuals this epoch (m). */
|
|
646
|
+
phaseResRms: number;
|
|
647
|
+
}
|
|
648
|
+
interface PppSolution {
|
|
649
|
+
/** Final estimated ECEF position (m). */
|
|
650
|
+
position: [number, number, number];
|
|
651
|
+
/** Final geodetic [latDeg, lonDeg, heightM]. */
|
|
652
|
+
llh: [number, number, number];
|
|
653
|
+
/** Per-epoch series (convergence). */
|
|
654
|
+
series: PppEpochResult[];
|
|
655
|
+
/** Estimated zenith wet delay at the end (m). */
|
|
656
|
+
ztdWet: number;
|
|
657
|
+
/** Epochs processed. */
|
|
658
|
+
epochsUsed: number;
|
|
659
|
+
/** Seconds from first epoch until 3D error first stays < 0.1 m
|
|
660
|
+
* (null if never, or no ground truth). */
|
|
661
|
+
convergenceSec: number | null;
|
|
662
|
+
/** Final 3D error vs ground truth (m), if given. */
|
|
663
|
+
finalError3d: number | null;
|
|
664
|
+
}
|
|
665
|
+
declare function solvePpp(epochs: PppEpoch[], sp3: Sp3File, opts: PppOptions): PppSolution;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Troposphere for PPP: a-priori Saastamoinen zenith hydrostatic delay
|
|
669
|
+
* (ZHD) and the Niell (NMF) hydrostatic + wet mapping functions.
|
|
670
|
+
*
|
|
671
|
+
* The estimator carries the zenith WET delay as a state; the dry (ZHD)
|
|
672
|
+
* part is fixed from the standard atmosphere. Niell 1996 ("Global mapping
|
|
673
|
+
* functions for the atmosphere delay at radio wavelengths", JGR 101).
|
|
674
|
+
*/
|
|
675
|
+
interface TropoMapping {
|
|
676
|
+
/** A-priori zenith hydrostatic delay (m). */
|
|
677
|
+
zhd: number;
|
|
678
|
+
/** Hydrostatic mapping factor at the elevation. */
|
|
679
|
+
mh: number;
|
|
680
|
+
/** Wet mapping factor at the elevation. */
|
|
681
|
+
mw: number;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Saastamoinen ZHD + Niell hydrostatic/wet mapping at an elevation.
|
|
685
|
+
* @param elRad elevation (rad), @param latRad geodetic latitude (rad),
|
|
686
|
+
* @param heightM ellipsoidal height (m), @param timeMs epoch (GPS ms).
|
|
687
|
+
*/
|
|
688
|
+
declare function niellMapping(elRad: number, latRad: number, heightM: number, timeMs: number): TropoMapping;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Low-precision Sun/Moon ephemerides, sidereal time, and the IERS degree-2
|
|
692
|
+
* solid-earth tide — enough for the PPP corrections (satellite attitude,
|
|
693
|
+
* solid-earth tides, phase wind-up) at the millimetre–centimetre level.
|
|
694
|
+
*
|
|
695
|
+
* Sun ~0.01°, Moon ~0.1–0.3° accuracy; solid-earth-tide step-1 (in-phase)
|
|
696
|
+
* displacement good to ~mm. Precession/nutation/polar-motion are neglected
|
|
697
|
+
* (their effect on the Sun/Moon *direction* used here is well below the
|
|
698
|
+
* correction accuracy needed).
|
|
699
|
+
*/
|
|
700
|
+
/** Greenwich mean sidereal time (rad). */
|
|
701
|
+
declare function gmst(timeMs: number): number;
|
|
702
|
+
/** Sun position in ECEF (m). Low-precision almanac (Meeus). */
|
|
703
|
+
declare function sunEcef(timeMs: number): [number, number, number];
|
|
704
|
+
/** Moon position in ECEF (m). Low-precision series (Montenbruck & Gill). */
|
|
705
|
+
declare function moonEcef(timeMs: number): [number, number, number];
|
|
706
|
+
/**
|
|
707
|
+
* Solid-earth-tide displacement of a station (ECEF, m). IERS conventions
|
|
708
|
+
* step-1 (degree 2, in-phase) — the dominant few-cm/dm periodic term.
|
|
709
|
+
*/
|
|
710
|
+
declare function solidEarthTide(rcv: [number, number, number], sun: [number, number, number], moon: [number, number, number]): [number, number, number];
|
|
711
|
+
|
|
483
712
|
/**
|
|
484
713
|
* Single-point positioning (SPP) from pseudoranges and broadcast
|
|
485
714
|
* ephemerides.
|
|
@@ -569,4 +798,4 @@ declare function ionoFree(p1: number, p2: number, f1: number, f2: number): numbe
|
|
|
569
798
|
*/
|
|
570
799
|
declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
|
|
571
800
|
|
|
572
|
-
export { type DgnssOptions, type DgnssSolution, type EphemerisSource, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type SppOptions, type SppSolution, gimSlantIonoDelayL1, gimVerticalTec, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, satClockCorrection, solveDgnss, solveSpp, toRtkEpoch };
|
|
801
|
+
export { type AntennaOffset, type CorrectionResult, type DgnssOptions, type DgnssSolution, type EphemerisSource, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type PppAntennaModel, type PppCorrectionConfig, type PppCorrections, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type SatGeom, type SppOptions, type SppSolution, type TropoMapping, buildPppAntenna, createPppCorrections, gimSlantIonoDelayL1, gimVerticalTec, gmst, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, satClockCorrection, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch };
|
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
|
-
import { I as IonexGrid } from './
|
|
3
|
+
import { I as IonexGrid, S as Sp3File } from './sp3-BAq8l39b.js';
|
|
4
|
+
import { AntexFile } from './antex.js';
|
|
4
5
|
import './ephemeris-Ohl6NAfw.js';
|
|
5
6
|
import './ecef-CF0uAysr.js';
|
|
6
7
|
import './nav-CN8rxL4h.js';
|
|
@@ -480,6 +481,234 @@ declare function lambdaSearch(a: Float64Array, Q: Float64Array, n: number, m?: n
|
|
|
480
481
|
*/
|
|
481
482
|
declare function lambdaReduction(Q: Float64Array, n: number): Float64Array | null;
|
|
482
483
|
|
|
484
|
+
/**
|
|
485
|
+
* ANTEX phase-centre application for PPP: satellite and receiver antenna
|
|
486
|
+
* PCO (offset) + PCV (elevation-dependent variation), ionosphere-free
|
|
487
|
+
* combined, with the nominal yaw-steering satellite attitude used to
|
|
488
|
+
* rotate the satellite PCO from the body frame into ECEF.
|
|
489
|
+
*/
|
|
490
|
+
|
|
491
|
+
interface AntennaOffset {
|
|
492
|
+
/** IF-combined PCO (m): satellite → body-frame [X,Y,Z]; receiver → ENU. */
|
|
493
|
+
pco: [number, number, number];
|
|
494
|
+
/** IF-combined no-azimuth PCV samples (m) over zenith/nadir angle. */
|
|
495
|
+
pcvZen1Deg: number;
|
|
496
|
+
pcvDzenDeg: number;
|
|
497
|
+
pcvNoazi: number[];
|
|
498
|
+
}
|
|
499
|
+
interface PppAntennaModel {
|
|
500
|
+
satOffset(prn: string, dateMs: number, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
|
|
501
|
+
rcvOffset(antType: string, band1: string, band2: string, f1: number, f2: number): AntennaOffset | null;
|
|
502
|
+
}
|
|
503
|
+
declare function buildPppAntenna(antex: AntexFile): PppAntennaModel;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Optional PPP range corrections: satellite & receiver antenna phase-centre
|
|
507
|
+
* offsets, phase wind-up, and solid-earth tides. These take a converged
|
|
508
|
+
* float PPP solution from ~decimetre toward centimetre.
|
|
509
|
+
*
|
|
510
|
+
* Everything here is opt-in via `PppOptions.corrections`; the core solver
|
|
511
|
+
* runs without it. Corrections needing Sun/Moon geometry are computed once
|
|
512
|
+
* per epoch in `epochContext` and reused across satellites.
|
|
513
|
+
*/
|
|
514
|
+
/** Per-satellite geometry handed to the correction models. */
|
|
515
|
+
interface SatGeom {
|
|
516
|
+
prn: string;
|
|
517
|
+
satEcef: [number, number, number];
|
|
518
|
+
rcvEcef: [number, number, number];
|
|
519
|
+
/** Unit line of sight, receiver → satellite. */
|
|
520
|
+
los: [number, number, number];
|
|
521
|
+
elRad: number;
|
|
522
|
+
azRad: number;
|
|
523
|
+
f1: number;
|
|
524
|
+
f2: number;
|
|
525
|
+
/** ANTEX frequency codes for the two bands (e.g. 'G01','G02'). */
|
|
526
|
+
band1?: string;
|
|
527
|
+
band2?: string;
|
|
528
|
+
/** Iono-free coefficient g = f1²/(f1²−f2²). */
|
|
529
|
+
g: number;
|
|
530
|
+
}
|
|
531
|
+
/** Epoch-level context (Sun/Moon positions, tide displacement). */
|
|
532
|
+
interface PppEpochContext {
|
|
533
|
+
timeMs: number;
|
|
534
|
+
/** Sun position, ECEF (m). */
|
|
535
|
+
sun: [number, number, number];
|
|
536
|
+
/** Moon position, ECEF (m). */
|
|
537
|
+
moon: [number, number, number];
|
|
538
|
+
/** Solid-earth-tide receiver displacement, ECEF (m). */
|
|
539
|
+
tideDisp: [number, number, number];
|
|
540
|
+
}
|
|
541
|
+
interface CorrectionResult {
|
|
542
|
+
/** Additive range correction applied to BOTH code and phase (m). */
|
|
543
|
+
rangeM: number;
|
|
544
|
+
/** Additional phase-only correction (wind-up), metres. */
|
|
545
|
+
phaseWindupM: number;
|
|
546
|
+
}
|
|
547
|
+
/** Correction configuration + hooks. Supplied by the caller. */
|
|
548
|
+
interface PppCorrections {
|
|
549
|
+
/** Build the per-epoch Sun/Moon/tide context. */
|
|
550
|
+
epochContext?: (timeMs: number, rcvEcef: [number, number, number]) => PppEpochContext;
|
|
551
|
+
/** Per-satellite correction evaluator. */
|
|
552
|
+
evaluate?: (geom: SatGeom, ctx: PppEpochContext | null) => CorrectionResult;
|
|
553
|
+
}
|
|
554
|
+
interface PppCorrectionConfig {
|
|
555
|
+
antenna: PppAntennaModel;
|
|
556
|
+
/** Receiver antenna type (RINEX header "ANT # / TYPE"). */
|
|
557
|
+
rcvAntType: string;
|
|
558
|
+
/** Marker→ARP offset in local ENU (m). RINEX "ANTENNA: DELTA H/E/N"
|
|
559
|
+
* is [Up, East, North] → pass as [E, N, U]. */
|
|
560
|
+
antDeltaEnu?: [number, number, number];
|
|
561
|
+
satPco?: boolean;
|
|
562
|
+
rcvPco?: boolean;
|
|
563
|
+
tides?: boolean;
|
|
564
|
+
windup?: boolean;
|
|
565
|
+
}
|
|
566
|
+
/** Wire satellite/receiver antenna + tides + wind-up into a PppCorrections. */
|
|
567
|
+
declare function createPppCorrections(cfg: PppCorrectionConfig): PppCorrections;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Static float Precise Point Positioning (PPP).
|
|
571
|
+
*
|
|
572
|
+
* Dual-frequency ionosphere-free code + carrier phase, precise satellite
|
|
573
|
+
* orbits and clocks (SP3), a forward Extended Kalman Filter estimating
|
|
574
|
+
* [position, receiver clock, zenith wet troposphere, one float ambiguity
|
|
575
|
+
* per satellite arc]. No base station — absolute cm–dm coordinates from a
|
|
576
|
+
* single observation file.
|
|
577
|
+
*
|
|
578
|
+
* Corrections applied (see PppOptions to toggle the optional ones):
|
|
579
|
+
* - precise satellite orbit + clock (SP3, Lagrange / linear)
|
|
580
|
+
* - periodic relativistic satellite-clock term (−2·r·v/c²)
|
|
581
|
+
* - Earth-rotation (Sagnac) during signal transit
|
|
582
|
+
* - dry troposphere (Saastamoinen ZHD, a priori) + estimated wet ZWD,
|
|
583
|
+
* mapped by the Niell mapping function
|
|
584
|
+
* - elevation-dependent weighting, cycle-slip re-initialisation
|
|
585
|
+
* - (optional, added by the caller supplying products) satellite &
|
|
586
|
+
* receiver antenna phase-centre offsets, phase wind-up, solid-earth tides
|
|
587
|
+
*
|
|
588
|
+
* The ionosphere-free combination removes the first-order ionosphere; the
|
|
589
|
+
* float ambiguity absorbs the phase biases and the integer cycles.
|
|
590
|
+
*/
|
|
591
|
+
|
|
592
|
+
/** One satellite's dual-frequency observation at an epoch. */
|
|
593
|
+
interface PppSatObs {
|
|
594
|
+
prn: string;
|
|
595
|
+
/** Band-1 / band-2 centre frequencies (Hz). */
|
|
596
|
+
f1: number;
|
|
597
|
+
f2: number;
|
|
598
|
+
/** Pseudorange on band 1 / band 2 (metres). */
|
|
599
|
+
c1: number;
|
|
600
|
+
c2: number;
|
|
601
|
+
/** Carrier phase on band 1 / band 2 (cycles). */
|
|
602
|
+
l1: number;
|
|
603
|
+
l2: number;
|
|
604
|
+
/** ANTEX frequency codes for the two bands (e.g. 'G01','G02'). Used by
|
|
605
|
+
* the antenna corrections; optional if corrections are off. */
|
|
606
|
+
band1?: string;
|
|
607
|
+
band2?: string;
|
|
608
|
+
/** True if a cycle slip is flagged on either band (LLI or detected). */
|
|
609
|
+
slip: boolean;
|
|
610
|
+
}
|
|
611
|
+
interface PppEpoch {
|
|
612
|
+
/** GPS-scale epoch time (ms). */
|
|
613
|
+
timeMs: number;
|
|
614
|
+
obs: PppSatObs[];
|
|
615
|
+
}
|
|
616
|
+
interface PppOptions {
|
|
617
|
+
/** A priori receiver ECEF position (m). Required — from the RINEX header
|
|
618
|
+
* approx position or an SPP solution. */
|
|
619
|
+
aprioriPos: [number, number, number];
|
|
620
|
+
/** Ground-truth ECEF (m) for reporting ENU error in the series. */
|
|
621
|
+
groundTruth?: [number, number, number];
|
|
622
|
+
/** Elevation cutoff (deg). Default 10. */
|
|
623
|
+
elevationMaskDeg?: number;
|
|
624
|
+
/** Optional corrections (antenna PCO/PCV, wind-up, tides). */
|
|
625
|
+
corrections?: PppCorrections;
|
|
626
|
+
/** IF code σ at zenith (m). Default 3.0 (already IF-inflated). */
|
|
627
|
+
codeSigma?: number;
|
|
628
|
+
/** IF phase σ at zenith (m). Default 0.01. */
|
|
629
|
+
phaseSigma?: number;
|
|
630
|
+
/** Wet-troposphere random-walk process noise (m²/epoch). Default 1e-8. */
|
|
631
|
+
ztdProcessNoise?: number;
|
|
632
|
+
/** Model + estimate the troposphere. Default true. */
|
|
633
|
+
troposphere?: boolean;
|
|
634
|
+
}
|
|
635
|
+
interface PppEpochResult {
|
|
636
|
+
timeMs: number;
|
|
637
|
+
/** ENU error vs ground truth (m), if truth given. */
|
|
638
|
+
enu: [number, number, number] | null;
|
|
639
|
+
/** 3D error vs ground truth (m), if truth given. */
|
|
640
|
+
error3d: number | null;
|
|
641
|
+
position: [number, number, number];
|
|
642
|
+
nSats: number;
|
|
643
|
+
/** Estimated zenith wet delay (m). */
|
|
644
|
+
ztdWet: number;
|
|
645
|
+
/** RMS of post-fit phase residuals this epoch (m). */
|
|
646
|
+
phaseResRms: number;
|
|
647
|
+
}
|
|
648
|
+
interface PppSolution {
|
|
649
|
+
/** Final estimated ECEF position (m). */
|
|
650
|
+
position: [number, number, number];
|
|
651
|
+
/** Final geodetic [latDeg, lonDeg, heightM]. */
|
|
652
|
+
llh: [number, number, number];
|
|
653
|
+
/** Per-epoch series (convergence). */
|
|
654
|
+
series: PppEpochResult[];
|
|
655
|
+
/** Estimated zenith wet delay at the end (m). */
|
|
656
|
+
ztdWet: number;
|
|
657
|
+
/** Epochs processed. */
|
|
658
|
+
epochsUsed: number;
|
|
659
|
+
/** Seconds from first epoch until 3D error first stays < 0.1 m
|
|
660
|
+
* (null if never, or no ground truth). */
|
|
661
|
+
convergenceSec: number | null;
|
|
662
|
+
/** Final 3D error vs ground truth (m), if given. */
|
|
663
|
+
finalError3d: number | null;
|
|
664
|
+
}
|
|
665
|
+
declare function solvePpp(epochs: PppEpoch[], sp3: Sp3File, opts: PppOptions): PppSolution;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Troposphere for PPP: a-priori Saastamoinen zenith hydrostatic delay
|
|
669
|
+
* (ZHD) and the Niell (NMF) hydrostatic + wet mapping functions.
|
|
670
|
+
*
|
|
671
|
+
* The estimator carries the zenith WET delay as a state; the dry (ZHD)
|
|
672
|
+
* part is fixed from the standard atmosphere. Niell 1996 ("Global mapping
|
|
673
|
+
* functions for the atmosphere delay at radio wavelengths", JGR 101).
|
|
674
|
+
*/
|
|
675
|
+
interface TropoMapping {
|
|
676
|
+
/** A-priori zenith hydrostatic delay (m). */
|
|
677
|
+
zhd: number;
|
|
678
|
+
/** Hydrostatic mapping factor at the elevation. */
|
|
679
|
+
mh: number;
|
|
680
|
+
/** Wet mapping factor at the elevation. */
|
|
681
|
+
mw: number;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Saastamoinen ZHD + Niell hydrostatic/wet mapping at an elevation.
|
|
685
|
+
* @param elRad elevation (rad), @param latRad geodetic latitude (rad),
|
|
686
|
+
* @param heightM ellipsoidal height (m), @param timeMs epoch (GPS ms).
|
|
687
|
+
*/
|
|
688
|
+
declare function niellMapping(elRad: number, latRad: number, heightM: number, timeMs: number): TropoMapping;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Low-precision Sun/Moon ephemerides, sidereal time, and the IERS degree-2
|
|
692
|
+
* solid-earth tide — enough for the PPP corrections (satellite attitude,
|
|
693
|
+
* solid-earth tides, phase wind-up) at the millimetre–centimetre level.
|
|
694
|
+
*
|
|
695
|
+
* Sun ~0.01°, Moon ~0.1–0.3° accuracy; solid-earth-tide step-1 (in-phase)
|
|
696
|
+
* displacement good to ~mm. Precession/nutation/polar-motion are neglected
|
|
697
|
+
* (their effect on the Sun/Moon *direction* used here is well below the
|
|
698
|
+
* correction accuracy needed).
|
|
699
|
+
*/
|
|
700
|
+
/** Greenwich mean sidereal time (rad). */
|
|
701
|
+
declare function gmst(timeMs: number): number;
|
|
702
|
+
/** Sun position in ECEF (m). Low-precision almanac (Meeus). */
|
|
703
|
+
declare function sunEcef(timeMs: number): [number, number, number];
|
|
704
|
+
/** Moon position in ECEF (m). Low-precision series (Montenbruck & Gill). */
|
|
705
|
+
declare function moonEcef(timeMs: number): [number, number, number];
|
|
706
|
+
/**
|
|
707
|
+
* Solid-earth-tide displacement of a station (ECEF, m). IERS conventions
|
|
708
|
+
* step-1 (degree 2, in-phase) — the dominant few-cm/dm periodic term.
|
|
709
|
+
*/
|
|
710
|
+
declare function solidEarthTide(rcv: [number, number, number], sun: [number, number, number], moon: [number, number, number]): [number, number, number];
|
|
711
|
+
|
|
483
712
|
/**
|
|
484
713
|
* Single-point positioning (SPP) from pseudoranges and broadcast
|
|
485
714
|
* ephemerides.
|
|
@@ -569,4 +798,4 @@ declare function ionoFree(p1: number, p2: number, f1: number, f2: number): numbe
|
|
|
569
798
|
*/
|
|
570
799
|
declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
|
|
571
800
|
|
|
572
|
-
export { type DgnssOptions, type DgnssSolution, type EphemerisSource, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type SppOptions, type SppSolution, gimSlantIonoDelayL1, gimVerticalTec, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, satClockCorrection, solveDgnss, solveSpp, toRtkEpoch };
|
|
801
|
+
export { type AntennaOffset, type CorrectionResult, type DgnssOptions, type DgnssSolution, type EphemerisSource, IONO_L1_M_PER_TECU, type KlobucharCoeffs, type LambdaResult, type PppAntennaModel, type PppCorrectionConfig, type PppCorrections, type PppEpoch, type PppEpochContext, type PppEpochResult, type PppOptions, type PppSatObs, type PppSolution, type RawObservation, type RtkEpochMeasurements, RtkFloatEngine, type RtkFloatOptions, type RtkFloatSolution, type RtkMeasurement, type SatGeom, type SppOptions, type SppSolution, type TropoMapping, buildPppAntenna, createPppCorrections, gimSlantIonoDelayL1, gimVerticalTec, gmst, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, satClockCorrection, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch };
|
package/dist/positioning.js
CHANGED
|
@@ -1,34 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IONO_L1_M_PER_TECU,
|
|
3
3
|
RtkFloatEngine,
|
|
4
|
+
buildPppAntenna,
|
|
5
|
+
createPppCorrections,
|
|
4
6
|
gimSlantIonoDelayL1,
|
|
5
7
|
gimVerticalTec,
|
|
8
|
+
gmst,
|
|
6
9
|
ionoFree,
|
|
7
10
|
klobucharDelay,
|
|
8
11
|
lambdaReduction,
|
|
9
12
|
lambdaSearch,
|
|
13
|
+
moonEcef,
|
|
14
|
+
niellMapping,
|
|
10
15
|
satClockCorrection,
|
|
16
|
+
solidEarthTide,
|
|
11
17
|
solveDgnss,
|
|
18
|
+
solvePpp,
|
|
12
19
|
solveSpp,
|
|
20
|
+
sunEcef,
|
|
13
21
|
toRtkEpoch
|
|
14
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-5WHKMKIB.js";
|
|
15
23
|
import "./chunk-MHGNKSSH.js";
|
|
16
24
|
import "./chunk-37QNKGTC.js";
|
|
17
25
|
import "./chunk-6FAL6P4G.js";
|
|
26
|
+
import "./chunk-4KMWWCUR.js";
|
|
18
27
|
import "./chunk-HVXYFUCB.js";
|
|
19
28
|
import "./chunk-LEEU5OIO.js";
|
|
20
29
|
import "./chunk-FIEWO4J4.js";
|
|
21
30
|
export {
|
|
22
31
|
IONO_L1_M_PER_TECU,
|
|
23
32
|
RtkFloatEngine,
|
|
33
|
+
buildPppAntenna,
|
|
34
|
+
createPppCorrections,
|
|
24
35
|
gimSlantIonoDelayL1,
|
|
25
36
|
gimVerticalTec,
|
|
37
|
+
gmst,
|
|
26
38
|
ionoFree,
|
|
27
39
|
klobucharDelay,
|
|
28
40
|
lambdaReduction,
|
|
29
41
|
lambdaSearch,
|
|
42
|
+
moonEcef,
|
|
43
|
+
niellMapping,
|
|
30
44
|
satClockCorrection,
|
|
45
|
+
solidEarthTide,
|
|
31
46
|
solveDgnss,
|
|
47
|
+
solvePpp,
|
|
32
48
|
solveSpp,
|
|
49
|
+
sunEcef,
|
|
33
50
|
toRtkEpoch
|
|
34
51
|
};
|
package/dist/rinex.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { R as RinexHeader } from './parser-JPjjFgeP.cjs';
|
|
|
2
2
|
export { E as EpochSummary, P as ParseOptions, a as RinexResult, b as RinexStats, S as SYSTEM_ORDER, c as SatObsCallback, p as parseRinexStream, s as systemCmp, d as systemName } from './parser-JPjjFgeP.cjs';
|
|
3
3
|
import { a as NavResult, N as NavHeader, E as Ephemeris, R as RinexCnavEphemeris } from './nav-DImXUdbp.cjs';
|
|
4
4
|
export { G as GlonassEphemeris, K as KeplerEphemeris, p as parseNavFile } from './nav-DImXUdbp.cjs';
|
|
5
|
-
export { I as IonexGrid, p as parseIonex } from './
|
|
5
|
+
export { I as IonexGrid, S as Sp3File, a as Sp3Sample, p as parseIonex, b as parseSp3, s as sp3Position } from './sp3-BAq8l39b.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Compact RINEX (Hatanaka / CRX) decompression utilities.
|
|
@@ -182,53 +182,6 @@ interface Nav4Input {
|
|
|
182
182
|
*/
|
|
183
183
|
declare function writeRinexNav4(nav: Nav4Input): string;
|
|
184
184
|
|
|
185
|
-
/**
|
|
186
|
-
* SP3-c/-d precise orbit and clock parser, with Lagrange interpolation
|
|
187
|
-
* for evaluating positions between the tabulated epochs.
|
|
188
|
-
*
|
|
189
|
-
* Positions are converted to meters (SP3 tabulates km), clocks to
|
|
190
|
-
* seconds (SP3 tabulates microseconds). Missing positions (all-zero
|
|
191
|
-
* coordinates) and the 999999.999999 bad-clock sentinel become null.
|
|
192
|
-
* Epoch tags are read in the file's own time scale (GPS for IGS/MGEX
|
|
193
|
-
* products) as epoch milliseconds, matching the convention of the
|
|
194
|
-
* RINEX parsers in this library.
|
|
195
|
-
*/
|
|
196
|
-
interface Sp3Sample {
|
|
197
|
-
/** ECEF meters. */
|
|
198
|
-
x: number;
|
|
199
|
-
y: number;
|
|
200
|
-
z: number;
|
|
201
|
-
/** Satellite clock offset in seconds, or null when flagged bad. */
|
|
202
|
-
clk: number | null;
|
|
203
|
-
}
|
|
204
|
-
interface Sp3File {
|
|
205
|
-
version: string;
|
|
206
|
-
/** Epoch timestamps (ms). */
|
|
207
|
-
epochs: number[];
|
|
208
|
-
/** Tabulated interval in seconds (from the ## header line). */
|
|
209
|
-
intervalSec: number;
|
|
210
|
-
/** Time system from the %c line, e.g. 'GPS'. */
|
|
211
|
-
timeSystem: string;
|
|
212
|
-
/** prn → per-epoch samples (null where the satellite is missing). */
|
|
213
|
-
satellites: Record<string, (Sp3Sample | null)[]>;
|
|
214
|
-
}
|
|
215
|
-
declare function parseSp3(text: string): Sp3File;
|
|
216
|
-
/**
|
|
217
|
-
* Satellite position at an arbitrary time by Lagrange interpolation
|
|
218
|
-
* over the `order` nearest tabulated samples (default 9, the standard
|
|
219
|
-
* choice for 5–15 min SP3 tables; centimetre-level between nodes).
|
|
220
|
-
* Clock is interpolated linearly between the bracketing samples.
|
|
221
|
-
*
|
|
222
|
-
* Returns null outside the covered span, near data gaps, or when the
|
|
223
|
-
* satellite is absent.
|
|
224
|
-
*/
|
|
225
|
-
declare function sp3Position(sp3: Sp3File, prn: string, tMs: number, order?: number): {
|
|
226
|
-
x: number;
|
|
227
|
-
y: number;
|
|
228
|
-
z: number;
|
|
229
|
-
clk: number | null;
|
|
230
|
-
} | null;
|
|
231
|
-
|
|
232
185
|
/**
|
|
233
186
|
* RINEX 3.04 / 4.01 observation file writer.
|
|
234
187
|
*
|
|
@@ -310,4 +263,4 @@ declare function createGzipLineSink(): {
|
|
|
310
263
|
*/
|
|
311
264
|
declare function stationHeaderLines(header: RinexHeader): string[];
|
|
312
265
|
|
|
313
|
-
export { type CompactEpoch, type CrxField, type DiffState, EMPTY_WARNINGS, Ephemeris, type Nav4Input, NavHeader, NavResult, RinexCnavEphemeris, RinexHeader, type RinexWarning, type RinexWarnings,
|
|
266
|
+
export { type CompactEpoch, type CrxField, type DiffState, EMPTY_WARNINGS, Ephemeris, type Nav4Input, NavHeader, NavResult, RinexCnavEphemeris, RinexHeader, type RinexWarning, type RinexWarnings, WarningAccumulator, type WarningSeverity, type WriteCrxOptions, createGzipLineSink, crxDecompress, crxRepair, fmtD, fmtF, hdrLine, padL, padR, parseCrxDataLine, stationHeaderLines, writeCrx, writeModernObsBlob, writeRinex2ObsBlob, writeRinex4ObsBlob, writeRinexNav, writeRinexNav4, writeRinexObsBlob };
|