gnss-js 1.47.0 → 1.48.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.
@@ -1722,11 +1722,13 @@ var IDX_Z = 2;
1722
1722
  var IDX_ZWD = 3;
1723
1723
  var NBASE = 4;
1724
1724
  var CLK_VAR = 1e10;
1725
+ var POS_VAR = 60 * 60;
1725
1726
  function solvePpp(epochs, sp3, opts) {
1726
1727
  const elevMask = (opts.elevationMaskDeg ?? 10) * Math.PI / 180;
1727
1728
  const codeSigma = opts.codeSigma ?? 3;
1728
1729
  const phaseSigma = opts.phaseSigma ?? 0.01;
1729
1730
  const ztdQ = opts.ztdProcessNoise ?? 1e-8;
1731
+ const kinematic = opts.mode === "kinematic";
1730
1732
  const corrections = opts.corrections;
1731
1733
  const x = [
1732
1734
  opts.aprioriPos[0],
@@ -1822,6 +1824,15 @@ function solvePpp(epochs, sp3, opts) {
1822
1824
  let convergedStreak = 0;
1823
1825
  for (let ei = 0; ei < epochs.length; ei++) {
1824
1826
  const epoch = epochs[ei];
1827
+ if (kinematic && ei > 0) {
1828
+ for (const p of [IDX_X, IDX_Y, IDX_Z]) {
1829
+ for (let j = 0; j < x.length; j++) {
1830
+ P[p][j] = 0;
1831
+ P[j][p] = 0;
1832
+ }
1833
+ P[p][p] = POS_VAR;
1834
+ }
1835
+ }
1825
1836
  for (const ci of clkIdx.values()) P[ci][ci] = CLK_VAR;
1826
1837
  P[IDX_ZWD][IDX_ZWD] += ztdQ * (ei > 0 ? 1 : 0);
1827
1838
  const rcv = [x[IDX_X], x[IDX_Y], x[IDX_Z]];
package/dist/index.cjs CHANGED
@@ -13655,11 +13655,13 @@ var IDX_Z = 2;
13655
13655
  var IDX_ZWD = 3;
13656
13656
  var NBASE = 4;
13657
13657
  var CLK_VAR = 1e10;
13658
+ var POS_VAR = 60 * 60;
13658
13659
  function solvePpp(epochs, sp3, opts) {
13659
13660
  const elevMask = (opts.elevationMaskDeg ?? 10) * Math.PI / 180;
13660
13661
  const codeSigma = opts.codeSigma ?? 3;
13661
13662
  const phaseSigma = opts.phaseSigma ?? 0.01;
13662
13663
  const ztdQ = opts.ztdProcessNoise ?? 1e-8;
13664
+ const kinematic = opts.mode === "kinematic";
13663
13665
  const corrections = opts.corrections;
13664
13666
  const x = [
13665
13667
  opts.aprioriPos[0],
@@ -13755,6 +13757,15 @@ function solvePpp(epochs, sp3, opts) {
13755
13757
  let convergedStreak = 0;
13756
13758
  for (let ei = 0; ei < epochs.length; ei++) {
13757
13759
  const epoch = epochs[ei];
13760
+ if (kinematic && ei > 0) {
13761
+ for (const p of [IDX_X, IDX_Y, IDX_Z]) {
13762
+ for (let j = 0; j < x.length; j++) {
13763
+ P[p][j] = 0;
13764
+ P[j][p] = 0;
13765
+ }
13766
+ P[p][p] = POS_VAR;
13767
+ }
13768
+ }
13758
13769
  for (const ci of clkIdx.values()) P[ci][ci] = CLK_VAR;
13759
13770
  P[IDX_ZWD][IDX_ZWD] += ztdQ * (ei > 0 ? 1 : 0);
13760
13771
  const rcv = [x[IDX_X], x[IDX_Y], x[IDX_Z]];
package/dist/index.js CHANGED
@@ -164,7 +164,7 @@ import {
164
164
  sunEcef,
165
165
  toRtkEpoch,
166
166
  wlWavelength
167
- } from "./chunk-75OYCNTY.js";
167
+ } from "./chunk-KRXX4UGR.js";
168
168
  import {
169
169
  almanacEpochMs,
170
170
  almanacSatPosition,
@@ -2250,11 +2250,13 @@ var IDX_Z = 2;
2250
2250
  var IDX_ZWD = 3;
2251
2251
  var NBASE = 4;
2252
2252
  var CLK_VAR = 1e10;
2253
+ var POS_VAR = 60 * 60;
2253
2254
  function solvePpp(epochs, sp3, opts) {
2254
2255
  const elevMask = (opts.elevationMaskDeg ?? 10) * Math.PI / 180;
2255
2256
  const codeSigma = opts.codeSigma ?? 3;
2256
2257
  const phaseSigma = opts.phaseSigma ?? 0.01;
2257
2258
  const ztdQ = opts.ztdProcessNoise ?? 1e-8;
2259
+ const kinematic = opts.mode === "kinematic";
2258
2260
  const corrections = opts.corrections;
2259
2261
  const x = [
2260
2262
  opts.aprioriPos[0],
@@ -2350,6 +2352,15 @@ function solvePpp(epochs, sp3, opts) {
2350
2352
  let convergedStreak = 0;
2351
2353
  for (let ei = 0; ei < epochs.length; ei++) {
2352
2354
  const epoch = epochs[ei];
2355
+ if (kinematic && ei > 0) {
2356
+ for (const p of [IDX_X, IDX_Y, IDX_Z]) {
2357
+ for (let j = 0; j < x.length; j++) {
2358
+ P[p][j] = 0;
2359
+ P[j][p] = 0;
2360
+ }
2361
+ P[p][p] = POS_VAR;
2362
+ }
2363
+ }
2353
2364
  for (const ci of clkIdx.values()) P[ci][ci] = CLK_VAR;
2354
2365
  P[IDX_ZWD][IDX_ZWD] += ztdQ * (ei > 0 ? 1 : 0);
2355
2366
  const rcv = [x[IDX_X], x[IDX_Y], x[IDX_Z]];
@@ -686,6 +686,14 @@ interface PppOptions {
686
686
  /** A priori receiver ECEF position (m). Required — from the RINEX header
687
687
  * approx position or an SPP solution. */
688
688
  aprioriPos: [number, number, number];
689
+ /**
690
+ * Rover dynamics. 'static' (default): the position is a single constant
691
+ * state, so all epochs average into one converged coordinate. 'kinematic':
692
+ * the position is white noise (RTKLIB `PMODE_PPP_KINEMA`) — re-estimated
693
+ * each epoch from that epoch's measurements while the carrier ambiguities
694
+ * (and troposphere) persist, so a moving receiver is tracked epoch by epoch.
695
+ */
696
+ mode?: 'static' | 'kinematic';
689
697
  /** Ground-truth ECEF (m) for reporting ENU error in the series. */
690
698
  groundTruth?: [number, number, number];
691
699
  /** Elevation cutoff (deg). Default 10. */
@@ -686,6 +686,14 @@ interface PppOptions {
686
686
  /** A priori receiver ECEF position (m). Required — from the RINEX header
687
687
  * approx position or an SPP solution. */
688
688
  aprioriPos: [number, number, number];
689
+ /**
690
+ * Rover dynamics. 'static' (default): the position is a single constant
691
+ * state, so all epochs average into one converged coordinate. 'kinematic':
692
+ * the position is white noise (RTKLIB `PMODE_PPP_KINEMA`) — re-estimated
693
+ * each epoch from that epoch's measurements while the carrier ambiguities
694
+ * (and troposphere) persist, so a moving receiver is tracked epoch by epoch.
695
+ */
696
+ mode?: 'static' | 'kinematic';
689
697
  /** Ground-truth ECEF (m) for reporting ENU error in the series. */
690
698
  groundTruth?: [number, number, number];
691
699
  /** Elevation cutoff (deg). Default 10. */
@@ -28,7 +28,7 @@ import {
28
28
  sunEcef,
29
29
  toRtkEpoch,
30
30
  wlWavelength
31
- } from "./chunk-75OYCNTY.js";
31
+ } from "./chunk-KRXX4UGR.js";
32
32
  import "./chunk-MHGNKSSH.js";
33
33
  import "./chunk-MIIM4LDY.js";
34
34
  import "./chunk-37QNKGTC.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.47.0",
3
+ "version": "1.48.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,