gnss-js 1.49.0 → 1.50.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.
@@ -3099,6 +3099,7 @@ function solveSpp(pseudoranges, ephemerides, timeMs, opts = {}) {
3099
3099
  );
3100
3100
  const Htv = new Array(dim).fill(0);
3101
3101
  let rows = 0;
3102
+ const sysRows = new Map(systems.map((s) => [s, 0]));
3102
3103
  for (const k of Object.keys(residuals2)) delete residuals2[k];
3103
3104
  const positionSaneIter = x9 * x9 + y2 * y2 + z2 * z2 > 1e12;
3104
3105
  const [rxLat, rxLon, rxHgt] = positionSaneIter ? ecefToGeodetic(x9, y2, z2) : [0, 0, 0];
@@ -3158,8 +3159,19 @@ function solveSpp(pseudoranges, ephemerides, timeMs, opts = {}) {
3158
3159
  }
3159
3160
  residuals2[prn] = v;
3160
3161
  rows++;
3162
+ sysRows.set(sys, sysRows.get(sys) + 1);
3161
3163
  }
3162
- if (rows < dim) return null;
3164
+ let activeSystems = 0;
3165
+ for (const s of systems) {
3166
+ if (sysRows.get(s) === 0) {
3167
+ const idx = sysIndex.get(s);
3168
+ HtH[idx][idx] = 1;
3169
+ Htv[idx] = 0;
3170
+ } else {
3171
+ activeSystems++;
3172
+ }
3173
+ }
3174
+ if (rows < 3 + activeSystems) return null;
3163
3175
  const dx = solveLinear(HtH, Htv);
3164
3176
  if (!dx) return null;
3165
3177
  x9 += dx[0];
package/dist/index.cjs CHANGED
@@ -15027,6 +15027,7 @@ function solveSpp(pseudoranges, ephemerides, timeMs, opts = {}) {
15027
15027
  );
15028
15028
  const Htv = new Array(dim).fill(0);
15029
15029
  let rows = 0;
15030
+ const sysRows = new Map(systems.map((s) => [s, 0]));
15030
15031
  for (const k of Object.keys(residuals2)) delete residuals2[k];
15031
15032
  const positionSaneIter = x9 * x9 + y2 * y2 + z2 * z2 > 1e12;
15032
15033
  const [rxLat, rxLon, rxHgt] = positionSaneIter ? ecefToGeodetic(x9, y2, z2) : [0, 0, 0];
@@ -15086,8 +15087,19 @@ function solveSpp(pseudoranges, ephemerides, timeMs, opts = {}) {
15086
15087
  }
15087
15088
  residuals2[prn] = v;
15088
15089
  rows++;
15090
+ sysRows.set(sys, sysRows.get(sys) + 1);
15089
15091
  }
15090
- if (rows < dim) return null;
15092
+ let activeSystems = 0;
15093
+ for (const s of systems) {
15094
+ if (sysRows.get(s) === 0) {
15095
+ const idx = sysIndex.get(s);
15096
+ HtH[idx][idx] = 1;
15097
+ Htv[idx] = 0;
15098
+ } else {
15099
+ activeSystems++;
15100
+ }
15101
+ }
15102
+ if (rows < 3 + activeSystems) return null;
15091
15103
  const dx = solveLinear(HtH, Htv);
15092
15104
  if (!dx) return null;
15093
15105
  x9 += dx[0];
package/dist/index.js CHANGED
@@ -164,7 +164,7 @@ import {
164
164
  sunEcef,
165
165
  toRtkEpoch,
166
166
  wlWavelength
167
- } from "./chunk-DWLVCXA6.js";
167
+ } from "./chunk-VYC2FRDV.js";
168
168
  import "./chunk-WQX354KD.js";
169
169
  import {
170
170
  almanacEpochMs,
@@ -3644,6 +3644,7 @@ function solveSpp(pseudoranges, ephemerides, timeMs, opts = {}) {
3644
3644
  );
3645
3645
  const Htv = new Array(dim).fill(0);
3646
3646
  let rows = 0;
3647
+ const sysRows = new Map(systems.map((s) => [s, 0]));
3647
3648
  for (const k of Object.keys(residuals2)) delete residuals2[k];
3648
3649
  const positionSaneIter = x9 * x9 + y2 * y2 + z2 * z2 > 1e12;
3649
3650
  const [rxLat, rxLon, rxHgt] = positionSaneIter ? ecefToGeodetic(x9, y2, z2) : [0, 0, 0];
@@ -3703,8 +3704,19 @@ function solveSpp(pseudoranges, ephemerides, timeMs, opts = {}) {
3703
3704
  }
3704
3705
  residuals2[prn] = v;
3705
3706
  rows++;
3707
+ sysRows.set(sys, sysRows.get(sys) + 1);
3706
3708
  }
3707
- if (rows < dim) return null;
3709
+ let activeSystems = 0;
3710
+ for (const s of systems) {
3711
+ if (sysRows.get(s) === 0) {
3712
+ const idx = sysIndex.get(s);
3713
+ HtH[idx][idx] = 1;
3714
+ Htv[idx] = 0;
3715
+ } else {
3716
+ activeSystems++;
3717
+ }
3718
+ }
3719
+ if (rows < 3 + activeSystems) return null;
3708
3720
  const dx = solveLinear(HtH, Htv);
3709
3721
  if (!dx) return null;
3710
3722
  x9 += dx[0];
@@ -29,7 +29,7 @@ import {
29
29
  sunEcef,
30
30
  toRtkEpoch,
31
31
  wlWavelength
32
- } from "./chunk-DWLVCXA6.js";
32
+ } from "./chunk-VYC2FRDV.js";
33
33
  import "./chunk-WQX354KD.js";
34
34
  import "./chunk-MHGNKSSH.js";
35
35
  import "./chunk-MIIM4LDY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.49.0",
3
+ "version": "1.50.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,