gnss-js 2.8.0 → 2.8.2
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-GLMQRZDL.js → chunk-5OWRCF56.js} +15 -5
- package/dist/{chunk-PHS7OFHN.js → chunk-CLNLOYBX.js} +1 -1
- package/dist/index.cjs +15 -5
- package/dist/index.js +2 -2
- package/dist/orbit.cjs +15 -5
- package/dist/orbit.d.cts +8 -4
- package/dist/orbit.d.ts +8 -4
- package/dist/orbit.js +1 -1
- package/dist/positioning.cjs +15 -5
- package/dist/positioning.js +2 -2
- package/package.json +1 -1
|
@@ -404,17 +404,27 @@ function ecefToAzEl(rxX, rxY, rxZ, satX, satY, satZ) {
|
|
|
404
404
|
const el = Math.atan2(up, Math.sqrt(east * east + north * north));
|
|
405
405
|
return { az: (az + TWO_PI) % TWO_PI, el };
|
|
406
406
|
}
|
|
407
|
+
function dopClock(prn) {
|
|
408
|
+
const sys = prn?.[0] ?? "";
|
|
409
|
+
return sys === "J" || sys === "S" ? "G" : sys;
|
|
410
|
+
}
|
|
407
411
|
function computeDop(satAzEls) {
|
|
408
|
-
const
|
|
409
|
-
const
|
|
412
|
+
const perClock = /* @__PURE__ */ new Map();
|
|
413
|
+
for (const s of satAzEls) {
|
|
414
|
+
const c = dopClock(s.prn);
|
|
415
|
+
perClock.set(c, (perClock.get(c) ?? 0) + 1);
|
|
416
|
+
}
|
|
417
|
+
const sats = perClock.size > 1 ? satAzEls.filter((s) => perClock.get(dopClock(s.prn)) > 1) : satAzEls;
|
|
418
|
+
const n = sats.length;
|
|
419
|
+
const clocks = [...new Set(sats.map((s) => dopClock(s.prn)))];
|
|
410
420
|
const m = 3 + clocks.length;
|
|
411
421
|
if (n < Math.max(4, m)) return null;
|
|
412
422
|
const H = [];
|
|
413
|
-
for (const { az, el, prn } of
|
|
423
|
+
for (const { az, el, prn } of sats) {
|
|
414
424
|
const cosEl = Math.cos(el);
|
|
415
425
|
const row = [cosEl * Math.sin(az), cosEl * Math.cos(az), Math.sin(el)];
|
|
416
|
-
const
|
|
417
|
-
for (const c of clocks) row.push(c ===
|
|
426
|
+
const clock = dopClock(prn);
|
|
427
|
+
for (const c of clocks) row.push(c === clock ? 1 : 0);
|
|
418
428
|
H.push(row);
|
|
419
429
|
}
|
|
420
430
|
const HtH = Array.from({ length: m }, () => new Array(m).fill(0));
|
package/dist/index.cjs
CHANGED
|
@@ -12679,17 +12679,27 @@ function ecefToAzEl(rxX, rxY, rxZ, satX, satY, satZ) {
|
|
|
12679
12679
|
const el = Math.atan2(up, Math.sqrt(east * east + north * north));
|
|
12680
12680
|
return { az: (az + TWO_PI) % TWO_PI, el };
|
|
12681
12681
|
}
|
|
12682
|
+
function dopClock(prn) {
|
|
12683
|
+
const sys = prn?.[0] ?? "";
|
|
12684
|
+
return sys === "J" || sys === "S" ? "G" : sys;
|
|
12685
|
+
}
|
|
12682
12686
|
function computeDop(satAzEls) {
|
|
12683
|
-
const
|
|
12684
|
-
const
|
|
12687
|
+
const perClock = /* @__PURE__ */ new Map();
|
|
12688
|
+
for (const s of satAzEls) {
|
|
12689
|
+
const c = dopClock(s.prn);
|
|
12690
|
+
perClock.set(c, (perClock.get(c) ?? 0) + 1);
|
|
12691
|
+
}
|
|
12692
|
+
const sats = perClock.size > 1 ? satAzEls.filter((s) => perClock.get(dopClock(s.prn)) > 1) : satAzEls;
|
|
12693
|
+
const n = sats.length;
|
|
12694
|
+
const clocks = [...new Set(sats.map((s) => dopClock(s.prn)))];
|
|
12685
12695
|
const m = 3 + clocks.length;
|
|
12686
12696
|
if (n < Math.max(4, m)) return null;
|
|
12687
12697
|
const H3 = [];
|
|
12688
|
-
for (const { az, el, prn } of
|
|
12698
|
+
for (const { az, el, prn } of sats) {
|
|
12689
12699
|
const cosEl = Math.cos(el);
|
|
12690
12700
|
const row = [cosEl * Math.sin(az), cosEl * Math.cos(az), Math.sin(el)];
|
|
12691
|
-
const
|
|
12692
|
-
for (const c of clocks) row.push(c ===
|
|
12701
|
+
const clock = dopClock(prn);
|
|
12702
|
+
for (const c of clocks) row.push(c === clock ? 1 : 0);
|
|
12693
12703
|
H3.push(row);
|
|
12694
12704
|
}
|
|
12695
12705
|
const HtH = Array.from({ length: m }, () => new Array(m).fill(0));
|
package/dist/index.js
CHANGED
|
@@ -213,7 +213,7 @@ import {
|
|
|
213
213
|
sunEcef,
|
|
214
214
|
toRtkEpoch,
|
|
215
215
|
wlWavelength
|
|
216
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-CLNLOYBX.js";
|
|
217
217
|
import "./chunk-WQX354KD.js";
|
|
218
218
|
import {
|
|
219
219
|
almanacEpochMs,
|
|
@@ -235,7 +235,7 @@ import {
|
|
|
235
235
|
navTimesFromEph,
|
|
236
236
|
rangeRate,
|
|
237
237
|
selectEphemeris
|
|
238
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-5OWRCF56.js";
|
|
239
239
|
import {
|
|
240
240
|
getBdsTime,
|
|
241
241
|
getDateFromBdsTime,
|
package/dist/orbit.cjs
CHANGED
|
@@ -565,17 +565,27 @@ function ecefToAzEl(rxX, rxY, rxZ, satX, satY, satZ) {
|
|
|
565
565
|
const el = Math.atan2(up, Math.sqrt(east * east + north * north));
|
|
566
566
|
return { az: (az + TWO_PI) % TWO_PI, el };
|
|
567
567
|
}
|
|
568
|
+
function dopClock(prn) {
|
|
569
|
+
const sys = prn?.[0] ?? "";
|
|
570
|
+
return sys === "J" || sys === "S" ? "G" : sys;
|
|
571
|
+
}
|
|
568
572
|
function computeDop(satAzEls) {
|
|
569
|
-
const
|
|
570
|
-
const
|
|
573
|
+
const perClock = /* @__PURE__ */ new Map();
|
|
574
|
+
for (const s of satAzEls) {
|
|
575
|
+
const c = dopClock(s.prn);
|
|
576
|
+
perClock.set(c, (perClock.get(c) ?? 0) + 1);
|
|
577
|
+
}
|
|
578
|
+
const sats = perClock.size > 1 ? satAzEls.filter((s) => perClock.get(dopClock(s.prn)) > 1) : satAzEls;
|
|
579
|
+
const n = sats.length;
|
|
580
|
+
const clocks = [...new Set(sats.map((s) => dopClock(s.prn)))];
|
|
571
581
|
const m = 3 + clocks.length;
|
|
572
582
|
if (n < Math.max(4, m)) return null;
|
|
573
583
|
const H = [];
|
|
574
|
-
for (const { az, el, prn } of
|
|
584
|
+
for (const { az, el, prn } of sats) {
|
|
575
585
|
const cosEl = Math.cos(el);
|
|
576
586
|
const row = [cosEl * Math.sin(az), cosEl * Math.cos(az), Math.sin(el)];
|
|
577
|
-
const
|
|
578
|
-
for (const c of clocks) row.push(c ===
|
|
587
|
+
const clock = dopClock(prn);
|
|
588
|
+
for (const c of clocks) row.push(c === clock ? 1 : 0);
|
|
579
589
|
H.push(row);
|
|
580
590
|
}
|
|
581
591
|
const HtH = Array.from({ length: m }, () => new Array(m).fill(0));
|
package/dist/orbit.d.cts
CHANGED
|
@@ -161,10 +161,14 @@ declare function ecefToAzEl(rxX: number, rxY: number, rxZ: number, satX: number,
|
|
|
161
161
|
* Compute DOP values from a set of satellite az/el.
|
|
162
162
|
*
|
|
163
163
|
* Satellites tagged with a `prn` get one receiver-clock unknown per
|
|
164
|
-
* constellation
|
|
165
|
-
*
|
|
166
|
-
* time
|
|
167
|
-
*
|
|
164
|
+
* constellation time scale, as a multi-GNSS receiver solves: every extra
|
|
165
|
+
* time scale costs one observation. QZSS and SBAS share the GPS clock —
|
|
166
|
+
* QZSST and SBAS network time are steered to GPST (RTKLIB pntpos does the
|
|
167
|
+
* same) — so a lone SBAS GEO doesn't inflate TDOP/GDOP. A time scale
|
|
168
|
+
* with a single satellite in view is left out: that satellite only fixes
|
|
169
|
+
* its own clock, adding nothing to PDOP/HDOP/VDOP and an unrecoverable ~1
|
|
170
|
+
* to TDOP². Untagged satellites share a single clock (the classic
|
|
171
|
+
* single-system model).
|
|
168
172
|
*
|
|
169
173
|
* @param satAzEls Satellite azimuth/elevation pairs (radians), optionally
|
|
170
174
|
* tagged with their PRN.
|
package/dist/orbit.d.ts
CHANGED
|
@@ -161,10 +161,14 @@ declare function ecefToAzEl(rxX: number, rxY: number, rxZ: number, satX: number,
|
|
|
161
161
|
* Compute DOP values from a set of satellite az/el.
|
|
162
162
|
*
|
|
163
163
|
* Satellites tagged with a `prn` get one receiver-clock unknown per
|
|
164
|
-
* constellation
|
|
165
|
-
*
|
|
166
|
-
* time
|
|
167
|
-
*
|
|
164
|
+
* constellation time scale, as a multi-GNSS receiver solves: every extra
|
|
165
|
+
* time scale costs one observation. QZSS and SBAS share the GPS clock —
|
|
166
|
+
* QZSST and SBAS network time are steered to GPST (RTKLIB pntpos does the
|
|
167
|
+
* same) — so a lone SBAS GEO doesn't inflate TDOP/GDOP. A time scale
|
|
168
|
+
* with a single satellite in view is left out: that satellite only fixes
|
|
169
|
+
* its own clock, adding nothing to PDOP/HDOP/VDOP and an unrecoverable ~1
|
|
170
|
+
* to TDOP². Untagged satellites share a single clock (the classic
|
|
171
|
+
* single-system model).
|
|
168
172
|
*
|
|
169
173
|
* @param satAzEls Satellite azimuth/elevation pairs (radians), optionally
|
|
170
174
|
* tagged with their PRN.
|
package/dist/orbit.js
CHANGED
package/dist/positioning.cjs
CHANGED
|
@@ -437,17 +437,27 @@ function ecefToAzEl(rxX, rxY, rxZ, satX, satY, satZ) {
|
|
|
437
437
|
const el = Math.atan2(up, Math.sqrt(east * east + north * north));
|
|
438
438
|
return { az: (az + TWO_PI) % TWO_PI, el };
|
|
439
439
|
}
|
|
440
|
+
function dopClock(prn) {
|
|
441
|
+
const sys = prn?.[0] ?? "";
|
|
442
|
+
return sys === "J" || sys === "S" ? "G" : sys;
|
|
443
|
+
}
|
|
440
444
|
function computeDop(satAzEls) {
|
|
441
|
-
const
|
|
442
|
-
const
|
|
445
|
+
const perClock = /* @__PURE__ */ new Map();
|
|
446
|
+
for (const s of satAzEls) {
|
|
447
|
+
const c = dopClock(s.prn);
|
|
448
|
+
perClock.set(c, (perClock.get(c) ?? 0) + 1);
|
|
449
|
+
}
|
|
450
|
+
const sats = perClock.size > 1 ? satAzEls.filter((s) => perClock.get(dopClock(s.prn)) > 1) : satAzEls;
|
|
451
|
+
const n = sats.length;
|
|
452
|
+
const clocks = [...new Set(sats.map((s) => dopClock(s.prn)))];
|
|
443
453
|
const m = 3 + clocks.length;
|
|
444
454
|
if (n < Math.max(4, m)) return null;
|
|
445
455
|
const H = [];
|
|
446
|
-
for (const { az, el, prn } of
|
|
456
|
+
for (const { az, el, prn } of sats) {
|
|
447
457
|
const cosEl = Math.cos(el);
|
|
448
458
|
const row = [cosEl * Math.sin(az), cosEl * Math.cos(az), Math.sin(el)];
|
|
449
|
-
const
|
|
450
|
-
for (const c of clocks) row.push(c ===
|
|
459
|
+
const clock = dopClock(prn);
|
|
460
|
+
for (const c of clocks) row.push(c === clock ? 1 : 0);
|
|
451
461
|
H.push(row);
|
|
452
462
|
}
|
|
453
463
|
const HtH = Array.from({ length: m }, () => new Array(m).fill(0));
|
package/dist/positioning.js
CHANGED
|
@@ -40,9 +40,9 @@ import {
|
|
|
40
40
|
sunEcef,
|
|
41
41
|
toRtkEpoch,
|
|
42
42
|
wlWavelength
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-CLNLOYBX.js";
|
|
44
44
|
import "./chunk-WQX354KD.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-5OWRCF56.js";
|
|
46
46
|
import "./chunk-HVXYFUCB.js";
|
|
47
47
|
import "./chunk-CVCTRIWU.js";
|
|
48
48
|
import "./chunk-37QNKGTC.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gnss-js",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
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,
|