gnss-js 1.3.1 → 1.4.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/analysis.cjs +201 -5
- package/dist/analysis.d.cts +68 -3
- package/dist/analysis.d.ts +68 -3
- package/dist/analysis.js +5 -3
- package/dist/{chunk-5SPJH4MG.js → chunk-2K3FCJBX.js} +1 -1
- package/dist/{chunk-OZCYOM5D.js → chunk-3U5AX7PY.js} +1 -1
- package/dist/{chunk-G3N4S3DM.js → chunk-3ZAFWOT6.js} +202 -7
- package/dist/{chunk-7EEWQ5DU.js → chunk-65CQINSB.js} +6 -1
- package/dist/{chunk-W5WKEV7U.js → chunk-FIEWO4J4.js} +2 -0
- package/dist/{chunk-CC2R4JGS.js → chunk-PQYBTE42.js} +3 -1
- package/dist/{chunk-USHP4IND.js → chunk-PX7TPPTQ.js} +4 -4
- package/dist/constants.cjs +3 -0
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +3 -1
- package/dist/{gnss-BT6ulR17.d.cts → gnss-BtXrG3zH.d.cts} +3 -1
- package/dist/{gnss-C-tgoYNa.d.ts → gnss-DhnEr0Dy.d.ts} +3 -1
- package/dist/index.cjs +210 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -7
- package/dist/orbit.cjs +3 -1
- package/dist/orbit.js +2 -1
- package/dist/positioning.cjs +5 -6
- package/dist/positioning.js +3 -3
- package/dist/rinex.js +2 -2
- package/dist/rtcm3.cjs +5 -0
- package/dist/rtcm3.js +2 -2
- package/dist/signals.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseRinexStream
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3U5AX7PY.js";
|
|
4
4
|
import {
|
|
5
5
|
ARC_GAP_FACTOR,
|
|
6
6
|
BAND_LABELS,
|
|
@@ -11,10 +11,18 @@ import {
|
|
|
11
11
|
buildGloChannelMap,
|
|
12
12
|
buildObsIndices,
|
|
13
13
|
getFreq
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FIEWO4J4.js";
|
|
15
15
|
|
|
16
16
|
// src/analysis/multipath.ts
|
|
17
17
|
var MIN_ARC_LENGTH = 10;
|
|
18
|
+
var MP_JUMP_M = 1.25;
|
|
19
|
+
var MP_JUMP_WINDOW = 5;
|
|
20
|
+
var MP_EDIT_SIGMA = 3;
|
|
21
|
+
function median(values) {
|
|
22
|
+
const s = [...values].sort((a, b) => a - b);
|
|
23
|
+
const m = s.length >> 1;
|
|
24
|
+
return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
|
|
25
|
+
}
|
|
18
26
|
var MultipathAccumulator = class {
|
|
19
27
|
state = /* @__PURE__ */ new Map();
|
|
20
28
|
results = [];
|
|
@@ -71,6 +79,11 @@ var MultipathAccumulator = class {
|
|
|
71
79
|
const gap = bandState.lastTime > 0 ? (time - bandState.lastTime) / 1e3 : 0;
|
|
72
80
|
if (bandState.lastTime > 0 && gap > this.interval * ARC_GAP_FACTOR) {
|
|
73
81
|
this.closeArc(prn, band, refBand, bandState);
|
|
82
|
+
} else if (bandState.arc.rawMp.length > 0) {
|
|
83
|
+
const recent = bandState.arc.rawMp.slice(-MP_JUMP_WINDOW);
|
|
84
|
+
if (Math.abs(mp - median(recent)) > MP_JUMP_M) {
|
|
85
|
+
this.closeArc(prn, band, refBand, bandState);
|
|
86
|
+
}
|
|
74
87
|
}
|
|
75
88
|
bandState.arc.times.push(time);
|
|
76
89
|
bandState.arc.rawMp.push(mp);
|
|
@@ -90,13 +103,25 @@ var MultipathAccumulator = class {
|
|
|
90
103
|
closeArc(prn, band, refBand, state) {
|
|
91
104
|
const arc = state.arc;
|
|
92
105
|
if (arc.times.length >= MIN_ARC_LENGTH) {
|
|
93
|
-
|
|
106
|
+
let keep = arc.times.map((_, i) => i);
|
|
107
|
+
let mean = 0;
|
|
108
|
+
for (let pass = 0; pass < 3; pass++) {
|
|
109
|
+
mean = keep.reduce((s, i) => s + arc.rawMp[i], 0) / keep.length;
|
|
110
|
+
const sigma = Math.sqrt(
|
|
111
|
+
keep.reduce((s, i) => s + (arc.rawMp[i] - mean) ** 2, 0) / keep.length
|
|
112
|
+
);
|
|
113
|
+
const kept = keep.filter(
|
|
114
|
+
(i) => Math.abs(arc.rawMp[i] - mean) <= MP_EDIT_SIGMA * sigma
|
|
115
|
+
);
|
|
116
|
+
if (kept.length === keep.length || kept.length < MIN_ARC_LENGTH) break;
|
|
117
|
+
keep = kept;
|
|
118
|
+
}
|
|
94
119
|
const sys = prn[0];
|
|
95
120
|
const bLabel = BAND_LABELS[sys]?.[band] ?? band;
|
|
96
121
|
const rLabel = BAND_LABELS[sys]?.[refBand] ?? refBand;
|
|
97
122
|
const label = `${prn} MP ${bLabel}-${rLabel}`;
|
|
98
|
-
const points =
|
|
99
|
-
time:
|
|
123
|
+
const points = keep.map((i) => ({
|
|
124
|
+
time: arc.times[i],
|
|
100
125
|
mp: arc.rawMp[i] - mean
|
|
101
126
|
}));
|
|
102
127
|
const rms = Math.sqrt(
|
|
@@ -150,7 +175,7 @@ var MultipathAccumulator = class {
|
|
|
150
175
|
refBand,
|
|
151
176
|
rms,
|
|
152
177
|
count,
|
|
153
|
-
satellites: seriesList.
|
|
178
|
+
satellites: new Set(seriesList.map((s) => s.prn)).size
|
|
154
179
|
});
|
|
155
180
|
}
|
|
156
181
|
const sysOrder = "GRECIJS";
|
|
@@ -468,11 +493,178 @@ var CompletenessAccumulator = class {
|
|
|
468
493
|
}
|
|
469
494
|
};
|
|
470
495
|
|
|
496
|
+
// src/analysis/ionosphere.ts
|
|
497
|
+
var TEC_FACTOR = 403e15;
|
|
498
|
+
var GF_JUMP_M = 0.15;
|
|
499
|
+
var MIN_ARC_LENGTH2 = 10;
|
|
500
|
+
function median2(values) {
|
|
501
|
+
const s = [...values].sort((a, b) => a - b);
|
|
502
|
+
const m = s.length >> 1;
|
|
503
|
+
return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
|
|
504
|
+
}
|
|
505
|
+
var IonoAccumulator = class {
|
|
506
|
+
state = /* @__PURE__ */ new Map();
|
|
507
|
+
closed = /* @__PURE__ */ new Map();
|
|
508
|
+
interval;
|
|
509
|
+
obsIndices;
|
|
510
|
+
gloChannels;
|
|
511
|
+
pairLabel = /* @__PURE__ */ new Map();
|
|
512
|
+
constructor(header) {
|
|
513
|
+
this.interval = header.interval ?? 30;
|
|
514
|
+
this.obsIndices = buildObsIndices(header);
|
|
515
|
+
this.gloChannels = buildGloChannelMap(header.glonassSlots);
|
|
516
|
+
}
|
|
517
|
+
/** Observation callback — wire this into parseRinexStream. */
|
|
518
|
+
onObservation = (time, prn, _codes, values) => {
|
|
519
|
+
const sys = prn[0];
|
|
520
|
+
const bandMap = this.obsIndices.get(sys) ?? this.obsIndices.get("_v2");
|
|
521
|
+
if (!bandMap) return;
|
|
522
|
+
const bandData = /* @__PURE__ */ new Map();
|
|
523
|
+
for (const [band, { C, L }] of bandMap) {
|
|
524
|
+
if (C === null) continue;
|
|
525
|
+
const cVal = values[C];
|
|
526
|
+
const lVal = values[L];
|
|
527
|
+
const freq = getFreq(this.gloChannels, prn, band);
|
|
528
|
+
if (cVal != null && cVal !== 0 && lVal != null && lVal !== 0 && freq) {
|
|
529
|
+
bandData.set(band, { C: cVal, L: lVal, f: freq });
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
if (bandData.size < 2) return;
|
|
533
|
+
const pairs = DUAL_FREQ_PAIRS[sys] ?? [];
|
|
534
|
+
for (const [bi, bj] of pairs) {
|
|
535
|
+
const di = bandData.get(bi);
|
|
536
|
+
const dj = bandData.get(bj);
|
|
537
|
+
if (!di || !dj) continue;
|
|
538
|
+
const \u03BBi = C_LIGHT / di.f;
|
|
539
|
+
const \u03BBj = C_LIGHT / dj.f;
|
|
540
|
+
const gamma = di.f * di.f / (dj.f * dj.f);
|
|
541
|
+
const l4 = di.L * \u03BBi - dj.L * \u03BBj;
|
|
542
|
+
const p4 = dj.C - di.C;
|
|
543
|
+
const pairKey = `${bi}-${bj}`;
|
|
544
|
+
if (!this.pairLabel.has(`${sys}:${pairKey}`)) {
|
|
545
|
+
const bLabel = BAND_LABELS[sys]?.[bi] ?? bi;
|
|
546
|
+
const rLabel = BAND_LABELS[sys]?.[bj] ?? bj;
|
|
547
|
+
this.pairLabel.set(`${sys}:${pairKey}`, `${bLabel}-${rLabel}`);
|
|
548
|
+
}
|
|
549
|
+
this.push(prn, pairKey, time, l4, p4, di.f, gamma);
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
push(prn, pairKey, time, l4, p4, fi, gamma) {
|
|
554
|
+
if (!isFinite(l4) || !isFinite(p4)) return;
|
|
555
|
+
let satStates = this.state.get(prn);
|
|
556
|
+
if (!satStates) {
|
|
557
|
+
satStates = /* @__PURE__ */ new Map();
|
|
558
|
+
this.state.set(prn, satStates);
|
|
559
|
+
}
|
|
560
|
+
let ps = satStates.get(pairKey);
|
|
561
|
+
if (!ps) {
|
|
562
|
+
ps = {
|
|
563
|
+
arc: { times: [], l4: [], p4: [], fi, gamma },
|
|
564
|
+
lastTime: 0,
|
|
565
|
+
lastL4: 0
|
|
566
|
+
};
|
|
567
|
+
satStates.set(pairKey, ps);
|
|
568
|
+
}
|
|
569
|
+
const gap = ps.lastTime > 0 ? (time - ps.lastTime) / 1e3 : 0;
|
|
570
|
+
if (ps.lastTime > 0 && gap > this.interval * ARC_GAP_FACTOR) {
|
|
571
|
+
this.closeArc(prn, pairKey, ps);
|
|
572
|
+
} else if (ps.arc.times.length > 0 && Math.abs(l4 - ps.lastL4) > GF_JUMP_M) {
|
|
573
|
+
this.closeArc(prn, pairKey, ps);
|
|
574
|
+
}
|
|
575
|
+
if (ps.arc.times.length === 0) {
|
|
576
|
+
ps.arc.fi = fi;
|
|
577
|
+
ps.arc.gamma = gamma;
|
|
578
|
+
}
|
|
579
|
+
ps.arc.times.push(time);
|
|
580
|
+
ps.arc.l4.push(l4);
|
|
581
|
+
ps.arc.p4.push(p4);
|
|
582
|
+
ps.lastTime = time;
|
|
583
|
+
ps.lastL4 = l4;
|
|
584
|
+
}
|
|
585
|
+
/** External cycle-slip notification — close affected arcs. */
|
|
586
|
+
notifySlip(_time, prn, bands) {
|
|
587
|
+
const satStates = this.state.get(prn);
|
|
588
|
+
if (!satStates) return;
|
|
589
|
+
for (const [pairKey, ps] of satStates) {
|
|
590
|
+
const [bi, bj] = pairKey.split("-");
|
|
591
|
+
if (bands.has(bi) || bands.has(bj)) {
|
|
592
|
+
this.closeArc(prn, pairKey, ps);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
closeArc(prn, pairKey, ps) {
|
|
597
|
+
const arc = ps.arc;
|
|
598
|
+
if (arc.times.length >= MIN_ARC_LENGTH2) {
|
|
599
|
+
const level = median2(arc.l4.map((v, k) => v - arc.p4[k]));
|
|
600
|
+
const toTecu = arc.fi * arc.fi / TEC_FACTOR / (arc.gamma - 1);
|
|
601
|
+
let satArcs = this.closed.get(prn);
|
|
602
|
+
if (!satArcs) {
|
|
603
|
+
satArcs = /* @__PURE__ */ new Map();
|
|
604
|
+
this.closed.set(prn, satArcs);
|
|
605
|
+
}
|
|
606
|
+
let points = satArcs.get(pairKey);
|
|
607
|
+
if (!points) {
|
|
608
|
+
points = [];
|
|
609
|
+
satArcs.set(pairKey, points);
|
|
610
|
+
}
|
|
611
|
+
for (let k = 0; k < arc.times.length; k++) {
|
|
612
|
+
points.push({
|
|
613
|
+
time: arc.times[k],
|
|
614
|
+
stec: (arc.l4[k] - level) * toTecu
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
ps.arc = { times: [], l4: [], p4: [], fi: arc.fi, gamma: arc.gamma };
|
|
619
|
+
}
|
|
620
|
+
/** Finalize: close remaining arcs, keep one pair per satellite. */
|
|
621
|
+
finalize() {
|
|
622
|
+
for (const [prn, satStates] of this.state) {
|
|
623
|
+
for (const [pairKey, ps] of satStates) {
|
|
624
|
+
this.closeArc(prn, pairKey, ps);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
const series = [];
|
|
628
|
+
let sum = 0;
|
|
629
|
+
let count = 0;
|
|
630
|
+
let maxStec = 0;
|
|
631
|
+
for (const [prn, satArcs] of this.closed) {
|
|
632
|
+
let bestKey = null;
|
|
633
|
+
let bestLen = 0;
|
|
634
|
+
for (const [pairKey, points2] of satArcs) {
|
|
635
|
+
if (points2.length > bestLen) {
|
|
636
|
+
bestLen = points2.length;
|
|
637
|
+
bestKey = pairKey;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
if (!bestKey) continue;
|
|
641
|
+
const points = satArcs.get(bestKey);
|
|
642
|
+
points.sort((a, b) => a.time - b.time);
|
|
643
|
+
const sys = prn[0];
|
|
644
|
+
for (const p of points) {
|
|
645
|
+
sum += p.stec;
|
|
646
|
+
count++;
|
|
647
|
+
if (p.stec > maxStec) maxStec = p.stec;
|
|
648
|
+
}
|
|
649
|
+
series.push({
|
|
650
|
+
prn,
|
|
651
|
+
system: sys,
|
|
652
|
+
label: this.pairLabel.get(`${sys}:${bestKey}`) ?? bestKey,
|
|
653
|
+
points
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
series.sort((a, b) => a.prn.localeCompare(b.prn));
|
|
657
|
+
return { series, maxStec, meanStec: count > 0 ? sum / count : 0 };
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
|
|
471
661
|
// src/analysis/quality-analysis.ts
|
|
472
662
|
async function analyzeQuality(file, header, onProgress, signal) {
|
|
473
663
|
const mpAccum = new MultipathAccumulator(header);
|
|
664
|
+
const ionoAccum = new IonoAccumulator(header);
|
|
474
665
|
const csAccum = new CycleSlipAccumulator(header, (time, prn, bands) => {
|
|
475
666
|
mpAccum.notifySlip(time, prn, bands);
|
|
667
|
+
ionoAccum.notifySlip(time, prn, bands);
|
|
476
668
|
});
|
|
477
669
|
const compAccum = new CompletenessAccumulator(header);
|
|
478
670
|
await parseRinexStream(
|
|
@@ -482,6 +674,7 @@ async function analyzeQuality(file, header, onProgress, signal) {
|
|
|
482
674
|
(time, prn, codes, values) => {
|
|
483
675
|
csAccum.onObservation(time, prn, codes, values);
|
|
484
676
|
mpAccum.onObservation(time, prn, codes, values);
|
|
677
|
+
ionoAccum.onObservation(time, prn, codes, values);
|
|
485
678
|
compAccum.onObservation(time, prn, codes, values);
|
|
486
679
|
},
|
|
487
680
|
true
|
|
@@ -490,7 +683,8 @@ async function analyzeQuality(file, header, onProgress, signal) {
|
|
|
490
683
|
return {
|
|
491
684
|
cycleSlips: csAccum.finalize(),
|
|
492
685
|
completeness: compAccum.finalize(),
|
|
493
|
-
multipath: mpAccum.finalize()
|
|
686
|
+
multipath: mpAccum.finalize(),
|
|
687
|
+
iono: ionoAccum.finalize()
|
|
494
688
|
};
|
|
495
689
|
}
|
|
496
690
|
|
|
@@ -498,5 +692,6 @@ export {
|
|
|
498
692
|
MultipathAccumulator,
|
|
499
693
|
CycleSlipAccumulator,
|
|
500
694
|
CompletenessAccumulator,
|
|
695
|
+
IonoAccumulator,
|
|
501
696
|
analyzeQuality
|
|
502
697
|
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
GLO_F1_STEP,
|
|
11
11
|
GLO_F2_BASE,
|
|
12
12
|
GLO_F2_STEP
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FIEWO4J4.js";
|
|
14
14
|
|
|
15
15
|
// src/rtcm3/decoder.ts
|
|
16
16
|
var debugHandler = null;
|
|
@@ -1258,6 +1258,7 @@ var RTCM3_MESSAGE_NAMES = {
|
|
|
1258
1258
|
1031: "GLONASS Network RTK Residual",
|
|
1259
1259
|
1032: "Physical Reference Station",
|
|
1260
1260
|
1033: "Receiver+Antenna Descriptor",
|
|
1261
|
+
1041: "NavIC Ephemeris",
|
|
1261
1262
|
1042: "BeiDou Ephemeris",
|
|
1262
1263
|
1043: "SBAS Ephemeris",
|
|
1263
1264
|
1044: "QZSS Ephemeris",
|
|
@@ -1322,6 +1323,8 @@ var RTCM3_MESSAGE_NAMES = {
|
|
|
1322
1323
|
1064: "GLONASS SSR Clock",
|
|
1323
1324
|
1065: "GLONASS SSR Code Bias",
|
|
1324
1325
|
1066: "GLONASS SSR Orbit+Clock",
|
|
1326
|
+
// Biases
|
|
1327
|
+
1230: "GLONASS Code-Phase Biases",
|
|
1325
1328
|
// IGS SSR
|
|
1326
1329
|
4076: "IGS SSR"
|
|
1327
1330
|
};
|
|
@@ -1330,6 +1333,7 @@ function rtcm3Constellation(msgType) {
|
|
|
1330
1333
|
if (msgType >= 1009 && msgType <= 1012) return "GLONASS";
|
|
1331
1334
|
if (msgType === 1019) return "GPS";
|
|
1332
1335
|
if (msgType === 1020) return "GLONASS";
|
|
1336
|
+
if (msgType === 1041) return "NavIC";
|
|
1333
1337
|
if (msgType === 1042) return "BeiDou";
|
|
1334
1338
|
if (msgType === 1043) return "SBAS";
|
|
1335
1339
|
if (msgType === 1044) return "QZSS";
|
|
@@ -1341,6 +1345,7 @@ function rtcm3Constellation(msgType) {
|
|
|
1341
1345
|
if (msgType >= 1111 && msgType <= 1117) return "QZSS";
|
|
1342
1346
|
if (msgType >= 1121 && msgType <= 1127) return "BeiDou";
|
|
1343
1347
|
if (msgType >= 1131 && msgType <= 1137) return "NavIC";
|
|
1348
|
+
if (msgType === 1230) return "GLONASS";
|
|
1344
1349
|
return null;
|
|
1345
1350
|
}
|
|
1346
1351
|
function createStreamStats() {
|
|
@@ -18,6 +18,7 @@ var SYS_SHORT = {
|
|
|
18
18
|
S: "SBS"
|
|
19
19
|
};
|
|
20
20
|
var C_LIGHT = 299792458;
|
|
21
|
+
var OMEGA_E = 72921151467e-15;
|
|
21
22
|
var FREQ = {
|
|
22
23
|
G: { "1": 157542e4, "2": 12276e5, "5": 117645e4 },
|
|
23
24
|
// R bands 4/6 are the CDMA L1OC/L2OC center frequencies
|
|
@@ -249,6 +250,7 @@ export {
|
|
|
249
250
|
SYSTEM_NAMES,
|
|
250
251
|
SYS_SHORT,
|
|
251
252
|
C_LIGHT,
|
|
253
|
+
OMEGA_E,
|
|
252
254
|
FREQ,
|
|
253
255
|
BAND_LABELS,
|
|
254
256
|
DUAL_FREQ_PAIRS,
|
|
@@ -8,13 +8,15 @@ import {
|
|
|
8
8
|
START_BDS_TIME,
|
|
9
9
|
START_GPS_TIME
|
|
10
10
|
} from "./chunk-LEEU5OIO.js";
|
|
11
|
+
import {
|
|
12
|
+
OMEGA_E
|
|
13
|
+
} from "./chunk-FIEWO4J4.js";
|
|
11
14
|
|
|
12
15
|
// src/orbit/index.ts
|
|
13
16
|
var GM_GPS = 3986005e8;
|
|
14
17
|
var GM_GAL = 3986004418e5;
|
|
15
18
|
var GM_BDS = 3986004418e5;
|
|
16
19
|
var GM_GLO = 39860044e7;
|
|
17
|
-
var OMEGA_E = 72921151467e-15;
|
|
18
20
|
var BDS_GEO_MAX_INCLINATION_RAD = 0.1;
|
|
19
21
|
var BDS_GEO_MIN_SEMIMAJOR_AXIS_M = 4e7;
|
|
20
22
|
var AE_GLO = 6378136;
|
|
@@ -2,10 +2,11 @@ import {
|
|
|
2
2
|
computeDop,
|
|
3
3
|
computeSatPosition,
|
|
4
4
|
ecefToAzEl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PQYBTE42.js";
|
|
6
6
|
import {
|
|
7
|
-
C_LIGHT
|
|
8
|
-
|
|
7
|
+
C_LIGHT,
|
|
8
|
+
OMEGA_E
|
|
9
|
+
} from "./chunk-FIEWO4J4.js";
|
|
9
10
|
|
|
10
11
|
// src/positioning/index.ts
|
|
11
12
|
var GM_GPS = 3986005e8;
|
|
@@ -38,7 +39,6 @@ function tropoDelay(elevationRad) {
|
|
|
38
39
|
return 2.47 / (sinEl + 0.0121);
|
|
39
40
|
}
|
|
40
41
|
function sagnac(pos, travelTimeS) {
|
|
41
|
-
const OMEGA_E = 72921151467e-15;
|
|
42
42
|
const theta = OMEGA_E * travelTimeS;
|
|
43
43
|
const c = Math.cos(theta);
|
|
44
44
|
const s = Math.sin(theta);
|
package/dist/constants.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __export(constants_exports, {
|
|
|
42
42
|
MILLISECONDS_IN_SECOND: () => MILLISECONDS_IN_SECOND,
|
|
43
43
|
MILLISECONDS_IN_WEEK: () => MILLISECONDS_IN_WEEK,
|
|
44
44
|
MILLISECONDS_TT_TAI: () => MILLISECONDS_TT_TAI,
|
|
45
|
+
OMEGA_E: () => OMEGA_E,
|
|
45
46
|
RINEX_CODES: () => RINEX_CODES,
|
|
46
47
|
SECONDS_IN_DAY: () => SECONDS_IN_DAY,
|
|
47
48
|
SECONDS_IN_HOUR: () => SECONDS_IN_HOUR,
|
|
@@ -146,6 +147,7 @@ var SYS_SHORT = {
|
|
|
146
147
|
S: "SBS"
|
|
147
148
|
};
|
|
148
149
|
var C_LIGHT = 299792458;
|
|
150
|
+
var OMEGA_E = 72921151467e-15;
|
|
149
151
|
var FREQ = {
|
|
150
152
|
G: { "1": 157542e4, "2": 12276e5, "5": 117645e4 },
|
|
151
153
|
// R bands 4/6 are the CDMA L1OC/L2OC center frequencies
|
|
@@ -396,6 +398,7 @@ function formatUTCTime(d) {
|
|
|
396
398
|
MILLISECONDS_IN_SECOND,
|
|
397
399
|
MILLISECONDS_IN_WEEK,
|
|
398
400
|
MILLISECONDS_TT_TAI,
|
|
401
|
+
OMEGA_E,
|
|
399
402
|
RINEX_CODES,
|
|
400
403
|
SECONDS_IN_DAY,
|
|
401
404
|
SECONDS_IN_HOUR,
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { D as DAYS_MJD2000_MJD, a as DAYS_MJD_JULIAN, M as MILLISECONDS_GPS_TAI, b as MILLISECONDS_IN_DAY, c as MILLISECONDS_IN_HOUR, d as MILLISECONDS_IN_MINUTE, e as MILLISECONDS_IN_SECOND, f as MILLISECONDS_IN_WEEK, g as MILLISECONDS_TT_TAI, R as RINEX_CODES, S as SECONDS_IN_DAY, h as SECONDS_IN_HOUR, i as SECONDS_IN_MINUTE, j as SECONDS_IN_WEEK, k as START_BDS_TIME, l as START_GAL_TIME, m as START_GLO_LEAP, n as START_GPS_TIME, o as START_JULIAN_TAI, p as START_MJD_UNIX_SECONDS, q as START_NTP_TIME, r as START_TAI_TIME, s as START_UNIX_TIME } from './time-DnI1VpE8.cjs';
|
|
2
|
-
export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OnSlipDetected, S as SYSTEM_NAMES,
|
|
2
|
+
export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OMEGA_E, i as OnSlipDetected, S as SYSTEM_NAMES, j as SYS_SHORT, k as buildGloChannelMap, l as buildObsIndices, m as formatUTCTime, n as getFreq, o as gloFreq } from './gnss-BtXrG3zH.cjs';
|
|
3
3
|
import './parser-JPjjFgeP.cjs';
|
|
4
4
|
|
|
5
5
|
/** WGS84 semi-major axis in meters. */
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { D as DAYS_MJD2000_MJD, a as DAYS_MJD_JULIAN, M as MILLISECONDS_GPS_TAI, b as MILLISECONDS_IN_DAY, c as MILLISECONDS_IN_HOUR, d as MILLISECONDS_IN_MINUTE, e as MILLISECONDS_IN_SECOND, f as MILLISECONDS_IN_WEEK, g as MILLISECONDS_TT_TAI, R as RINEX_CODES, S as SECONDS_IN_DAY, h as SECONDS_IN_HOUR, i as SECONDS_IN_MINUTE, j as SECONDS_IN_WEEK, k as START_BDS_TIME, l as START_GAL_TIME, m as START_GLO_LEAP, n as START_GPS_TIME, o as START_JULIAN_TAI, p as START_MJD_UNIX_SECONDS, q as START_NTP_TIME, r as START_TAI_TIME, s as START_UNIX_TIME } from './time-DnI1VpE8.js';
|
|
2
|
-
export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OnSlipDetected, S as SYSTEM_NAMES,
|
|
2
|
+
export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OMEGA_E, i as OnSlipDetected, S as SYSTEM_NAMES, j as SYS_SHORT, k as buildGloChannelMap, l as buildObsIndices, m as formatUTCTime, n as getFreq, o as gloFreq } from './gnss-DhnEr0Dy.js';
|
|
3
3
|
import './parser-JPjjFgeP.js';
|
|
4
4
|
|
|
5
5
|
/** WGS84 semi-major axis in meters. */
|
package/dist/constants.js
CHANGED
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
GLO_F2_BASE,
|
|
45
45
|
GLO_F2_STEP,
|
|
46
46
|
GLO_F3,
|
|
47
|
+
OMEGA_E,
|
|
47
48
|
SYSTEM_NAMES,
|
|
48
49
|
SYS_SHORT,
|
|
49
50
|
buildGloChannelMap,
|
|
@@ -51,7 +52,7 @@ import {
|
|
|
51
52
|
formatUTCTime,
|
|
52
53
|
getFreq,
|
|
53
54
|
gloFreq
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-FIEWO4J4.js";
|
|
55
56
|
export {
|
|
56
57
|
ARC_GAP_FACTOR,
|
|
57
58
|
BAND_LABELS,
|
|
@@ -75,6 +76,7 @@ export {
|
|
|
75
76
|
MILLISECONDS_IN_SECOND,
|
|
76
77
|
MILLISECONDS_IN_WEEK,
|
|
77
78
|
MILLISECONDS_TT_TAI,
|
|
79
|
+
OMEGA_E,
|
|
78
80
|
RINEX_CODES,
|
|
79
81
|
SECONDS_IN_DAY,
|
|
80
82
|
SECONDS_IN_HOUR,
|
|
@@ -9,6 +9,8 @@ declare const SYSTEM_NAMES: Record<string, string>;
|
|
|
9
9
|
declare const SYS_SHORT: Record<string, string>;
|
|
10
10
|
/** Speed of light in m/s. */
|
|
11
11
|
declare const C_LIGHT = 299792458;
|
|
12
|
+
/** Earth rotation rate in rad/s (WGS84/PZ-90 value). */
|
|
13
|
+
declare const OMEGA_E = 0.000072921151467;
|
|
12
14
|
/** Carrier frequencies (Hz) per system letter, per RINEX band digit. GLONASS FDMA bands 1/2 use gloFreq(). */
|
|
13
15
|
declare const FREQ: Record<string, Record<string, number>>;
|
|
14
16
|
declare const BAND_LABELS: Record<string, Record<string, string>>;
|
|
@@ -53,4 +55,4 @@ declare const DEFAULT_ELEV_MASK_DEG = 5;
|
|
|
53
55
|
/** Format a Date as HH:MM:SS UTC string. */
|
|
54
56
|
declare function formatUTCTime(d: Date): string;
|
|
55
57
|
|
|
56
|
-
export { ARC_GAP_FACTOR as A, BAND_LABELS as B, C_LIGHT as C, DEFAULT_ELEV_MASK_DEG as D, FREQ as F, GLO_CHANNEL_FALLBACK as G,
|
|
58
|
+
export { ARC_GAP_FACTOR as A, BAND_LABELS as B, C_LIGHT as C, DEFAULT_ELEV_MASK_DEG as D, FREQ as F, GLO_CHANNEL_FALLBACK as G, OMEGA_E as O, SYSTEM_NAMES as S, BDS_SATELLITES as a, type BdsSatellite as b, DUAL_FREQ_PAIRS as c, GLO_F1_BASE as d, GLO_F1_STEP as e, GLO_F2_BASE as f, GLO_F2_STEP as g, GLO_F3 as h, type OnSlipDetected as i, SYS_SHORT as j, buildGloChannelMap as k, buildObsIndices as l, formatUTCTime as m, getFreq as n, gloFreq as o };
|
|
@@ -9,6 +9,8 @@ declare const SYSTEM_NAMES: Record<string, string>;
|
|
|
9
9
|
declare const SYS_SHORT: Record<string, string>;
|
|
10
10
|
/** Speed of light in m/s. */
|
|
11
11
|
declare const C_LIGHT = 299792458;
|
|
12
|
+
/** Earth rotation rate in rad/s (WGS84/PZ-90 value). */
|
|
13
|
+
declare const OMEGA_E = 0.000072921151467;
|
|
12
14
|
/** Carrier frequencies (Hz) per system letter, per RINEX band digit. GLONASS FDMA bands 1/2 use gloFreq(). */
|
|
13
15
|
declare const FREQ: Record<string, Record<string, number>>;
|
|
14
16
|
declare const BAND_LABELS: Record<string, Record<string, string>>;
|
|
@@ -53,4 +55,4 @@ declare const DEFAULT_ELEV_MASK_DEG = 5;
|
|
|
53
55
|
/** Format a Date as HH:MM:SS UTC string. */
|
|
54
56
|
declare function formatUTCTime(d: Date): string;
|
|
55
57
|
|
|
56
|
-
export { ARC_GAP_FACTOR as A, BAND_LABELS as B, C_LIGHT as C, DEFAULT_ELEV_MASK_DEG as D, FREQ as F, GLO_CHANNEL_FALLBACK as G,
|
|
58
|
+
export { ARC_GAP_FACTOR as A, BAND_LABELS as B, C_LIGHT as C, DEFAULT_ELEV_MASK_DEG as D, FREQ as F, GLO_CHANNEL_FALLBACK as G, OMEGA_E as O, SYSTEM_NAMES as S, BDS_SATELLITES as a, type BdsSatellite as b, DUAL_FREQ_PAIRS as c, GLO_F1_BASE as d, GLO_F1_STEP as e, GLO_F2_BASE as f, GLO_F2_STEP as g, GLO_F3 as h, type OnSlipDetected as i, SYS_SHORT as j, buildGloChannelMap as k, buildObsIndices as l, formatUTCTime as m, getFreq as n, gloFreq as o };
|