gnss-js 1.10.0 → 1.12.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.
@@ -3,6 +3,36 @@ import { DopValues } from './orbit.cjs';
3
3
  import './ephemeris-Ohl6NAfw.cjs';
4
4
  import './ecef-CF0uAysr.cjs';
5
5
 
6
+ /**
7
+ * Klobuchar broadcast ionospheric model (IS-GPS-200, 20.3.3.5.2.5).
8
+ *
9
+ * Evaluates the single-frequency vertical→slant ionospheric delay from
10
+ * the eight coefficients broadcast in the GPS navigation message (and
11
+ * carried in RINEX nav headers as GPSA/GPSB, or ION ALPHA/BETA in
12
+ * RINEX 2). The model captures ~50% RMS of the actual delay — crude,
13
+ * but exactly what a single-frequency receiver applies, which makes it
14
+ * both a useful SPP correction and an honest "what broadcast users
15
+ * get" reference against measured or GIM TEC.
16
+ */
17
+ /** The eight Klobuchar coefficients from the navigation message. */
18
+ interface KlobucharCoeffs {
19
+ /** GPSA: alpha0..alpha3 (s, s/sc, s/sc², s/sc³). */
20
+ alpha: number[];
21
+ /** GPSB: beta0..beta3 (s, s/sc, s/sc², s/sc³). */
22
+ beta: number[];
23
+ }
24
+ /**
25
+ * Slant ionospheric group delay on GPS L1, in seconds.
26
+ *
27
+ * @param coeffs Broadcast alpha/beta coefficients
28
+ * @param latRad Receiver geodetic latitude (radians)
29
+ * @param lonRad Receiver geodetic longitude (radians)
30
+ * @param azRad Satellite azimuth (radians)
31
+ * @param elRad Satellite elevation (radians)
32
+ * @param gpsTowSec GPS time of week (seconds)
33
+ */
34
+ declare function klobucharDelay(coeffs: KlobucharCoeffs, latRad: number, lonRad: number, azRad: number, elRad: number, gpsTowSec: number): number;
35
+
6
36
  /**
7
37
  * Single-point positioning (SPP) from pseudoranges and broadcast
8
38
  * ephemerides.
@@ -11,9 +41,11 @@ import './ecef-CF0uAysr.cjs';
11
41
  * constellation (absorbing inter-system time offsets), satellite clock
12
42
  * polynomial + relativistic correction, broadcast group delay
13
43
  * (TGD/BGD), Sagnac (Earth-rotation) correction, elevation
14
- * masking/weighting, and a simple tropospheric model. Ionospheric delay is NOT modelled — use the iono-free
15
- * combination (ionoFree helper) with dual-frequency pseudoranges for
16
- * metre-level results, or expect ~2–10 m of iono bias on L1-only.
44
+ * masking/weighting, and a simple tropospheric model. Ionospheric
45
+ * delay can be modelled from the broadcast Klobuchar coefficients
46
+ * (`iono` option) for single-frequency measurements; for metre-level
47
+ * results prefer the iono-free combination (ionoFree helper) with
48
+ * dual-frequency pseudoranges.
17
49
  */
18
50
 
19
51
  interface SppOptions {
@@ -25,6 +57,14 @@ interface SppOptions {
25
57
  maxIterations?: number;
26
58
  /** Convergence threshold on the position update (m). Default 1e-4. */
27
59
  convergenceM?: number;
60
+ /**
61
+ * Broadcast Klobuchar coefficients (RINEX nav header GPSA/GPSB —
62
+ * `NavResult.header.ionoCorrections`). When given, the modelled
63
+ * slant delay is removed from every single-frequency pseudorange,
64
+ * scaled to each system's primary frequency. Omit when feeding
65
+ * iono-free combinations.
66
+ */
67
+ iono?: KlobucharCoeffs;
28
68
  /**
29
69
  * Apply the broadcast group-delay correction (GPS TGD, Galileo
30
70
  * BGD E5a/E1, BeiDou TGD1) to the satellite clock. Correct for
@@ -73,4 +113,4 @@ declare function ionoFree(p1: number, p2: number, f1: number, f2: number): numbe
73
113
  */
74
114
  declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
75
115
 
76
- export { type SppOptions, type SppSolution, ionoFree, satClockCorrection, solveSpp };
116
+ export { type KlobucharCoeffs, type SppOptions, type SppSolution, ionoFree, klobucharDelay, satClockCorrection, solveSpp };
@@ -3,6 +3,36 @@ import { DopValues } from './orbit.js';
3
3
  import './ephemeris-Ohl6NAfw.js';
4
4
  import './ecef-CF0uAysr.js';
5
5
 
6
+ /**
7
+ * Klobuchar broadcast ionospheric model (IS-GPS-200, 20.3.3.5.2.5).
8
+ *
9
+ * Evaluates the single-frequency vertical→slant ionospheric delay from
10
+ * the eight coefficients broadcast in the GPS navigation message (and
11
+ * carried in RINEX nav headers as GPSA/GPSB, or ION ALPHA/BETA in
12
+ * RINEX 2). The model captures ~50% RMS of the actual delay — crude,
13
+ * but exactly what a single-frequency receiver applies, which makes it
14
+ * both a useful SPP correction and an honest "what broadcast users
15
+ * get" reference against measured or GIM TEC.
16
+ */
17
+ /** The eight Klobuchar coefficients from the navigation message. */
18
+ interface KlobucharCoeffs {
19
+ /** GPSA: alpha0..alpha3 (s, s/sc, s/sc², s/sc³). */
20
+ alpha: number[];
21
+ /** GPSB: beta0..beta3 (s, s/sc, s/sc², s/sc³). */
22
+ beta: number[];
23
+ }
24
+ /**
25
+ * Slant ionospheric group delay on GPS L1, in seconds.
26
+ *
27
+ * @param coeffs Broadcast alpha/beta coefficients
28
+ * @param latRad Receiver geodetic latitude (radians)
29
+ * @param lonRad Receiver geodetic longitude (radians)
30
+ * @param azRad Satellite azimuth (radians)
31
+ * @param elRad Satellite elevation (radians)
32
+ * @param gpsTowSec GPS time of week (seconds)
33
+ */
34
+ declare function klobucharDelay(coeffs: KlobucharCoeffs, latRad: number, lonRad: number, azRad: number, elRad: number, gpsTowSec: number): number;
35
+
6
36
  /**
7
37
  * Single-point positioning (SPP) from pseudoranges and broadcast
8
38
  * ephemerides.
@@ -11,9 +41,11 @@ import './ecef-CF0uAysr.js';
11
41
  * constellation (absorbing inter-system time offsets), satellite clock
12
42
  * polynomial + relativistic correction, broadcast group delay
13
43
  * (TGD/BGD), Sagnac (Earth-rotation) correction, elevation
14
- * masking/weighting, and a simple tropospheric model. Ionospheric delay is NOT modelled — use the iono-free
15
- * combination (ionoFree helper) with dual-frequency pseudoranges for
16
- * metre-level results, or expect ~2–10 m of iono bias on L1-only.
44
+ * masking/weighting, and a simple tropospheric model. Ionospheric
45
+ * delay can be modelled from the broadcast Klobuchar coefficients
46
+ * (`iono` option) for single-frequency measurements; for metre-level
47
+ * results prefer the iono-free combination (ionoFree helper) with
48
+ * dual-frequency pseudoranges.
17
49
  */
18
50
 
19
51
  interface SppOptions {
@@ -25,6 +57,14 @@ interface SppOptions {
25
57
  maxIterations?: number;
26
58
  /** Convergence threshold on the position update (m). Default 1e-4. */
27
59
  convergenceM?: number;
60
+ /**
61
+ * Broadcast Klobuchar coefficients (RINEX nav header GPSA/GPSB —
62
+ * `NavResult.header.ionoCorrections`). When given, the modelled
63
+ * slant delay is removed from every single-frequency pseudorange,
64
+ * scaled to each system's primary frequency. Omit when feeding
65
+ * iono-free combinations.
66
+ */
67
+ iono?: KlobucharCoeffs;
28
68
  /**
29
69
  * Apply the broadcast group-delay correction (GPS TGD, Galileo
30
70
  * BGD E5a/E1, BeiDou TGD1) to the satellite clock. Correct for
@@ -73,4 +113,4 @@ declare function ionoFree(p1: number, p2: number, f1: number, f2: number): numbe
73
113
  */
74
114
  declare function solveSpp(pseudoranges: Map<string, number>, ephemerides: Map<string, Ephemeris>, timeMs: number, opts?: SppOptions): SppSolution | null;
75
115
 
76
- export { type SppOptions, type SppSolution, ionoFree, satClockCorrection, solveSpp };
116
+ export { type KlobucharCoeffs, type SppOptions, type SppSolution, ionoFree, klobucharDelay, satClockCorrection, solveSpp };
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  ionoFree,
3
+ klobucharDelay,
3
4
  satClockCorrection,
4
5
  solveSpp
5
- } from "./chunk-ZTFKRZMM.js";
6
- import "./chunk-AK6LNWZX.js";
6
+ } from "./chunk-LKFSXVIZ.js";
7
+ import "./chunk-DMNFB7Q6.js";
7
8
  import "./chunk-HVXYFUCB.js";
8
9
  import "./chunk-37QNKGTC.js";
9
10
  import "./chunk-6FAL6P4G.js";
@@ -11,6 +12,7 @@ import "./chunk-LEEU5OIO.js";
11
12
  import "./chunk-FIEWO4J4.js";
12
13
  export {
13
14
  ionoFree,
15
+ klobucharDelay,
14
16
  satClockCorrection,
15
17
  solveSpp
16
18
  };