gnss-js 1.36.0 → 1.38.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/binex.js +2 -2
- package/dist/{chunk-AFEDNWXI.js → chunk-4TAN27LO.js} +368 -111
- package/dist/{chunk-F4CM6Q4F.js → chunk-5X4AG4MK.js} +2 -2
- package/dist/{chunk-5RNDQQ6J.js → chunk-6SWJTN6H.js} +2 -2
- package/dist/{chunk-OK4GGNOO.js → chunk-D25WNE43.js} +1 -1
- package/dist/{chunk-5AUK42AL.js → chunk-FA2UTLEQ.js} +2 -2
- package/dist/{chunk-IQ5OIMQD.js → chunk-V2D5KUKH.js} +33 -0
- package/dist/{chunk-726LQBGM.js → chunk-YUW33VXK.js} +1 -1
- package/dist/{chunk-FEOMYZEU.js → chunk-ZQDLYLQA.js} +9 -28
- package/dist/index.cjs +410 -142
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -8
- package/dist/novatel.js +3 -3
- package/dist/rinex.js +3 -3
- package/dist/sbf.cjs +536 -111
- package/dist/sbf.d.cts +169 -14
- package/dist/sbf.d.ts +169 -14
- package/dist/sbf.js +12 -4
- package/dist/ubx.cjs +37 -24
- package/dist/ubx.js +4 -4
- package/package.json +1 -1
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
bdsSubframeParityOk,
|
|
6
6
|
galInavPageCrcOk,
|
|
7
7
|
testGloString
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FA2UTLEQ.js";
|
|
9
9
|
import {
|
|
10
10
|
CnavAssembler,
|
|
11
11
|
cnavCrcOk
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YUW33VXK.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
14
|
+
GpsLnavAssembler,
|
|
15
15
|
getBitS,
|
|
16
16
|
getBitU,
|
|
17
17
|
setBitU
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-V2D5KUKH.js";
|
|
19
19
|
|
|
20
20
|
// src/ubx/frame.ts
|
|
21
21
|
function* ubxFrames(data, stats = { badChecksums: 0 }) {
|
|
@@ -92,38 +92,19 @@ function parseUbxNav(data, opts = {}) {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
if (refWeek === void 0) return { ephemerides, badParity };
|
|
95
|
-
const
|
|
96
|
-
const last = /* @__PURE__ */ new Map();
|
|
95
|
+
const assembler = new GpsLnavAssembler();
|
|
97
96
|
for (const f of ubxFrames(data)) {
|
|
98
97
|
if (f.msgClass !== 2 || f.msgId !== 19) continue;
|
|
99
98
|
const lnav = readLnavSubframe(view, f);
|
|
100
99
|
if (!lnav) continue;
|
|
101
|
-
const { prn,
|
|
100
|
+
const { prn, buff, id } = lnav;
|
|
102
101
|
if (id < 1 || id > 5) {
|
|
103
102
|
badParity++;
|
|
104
103
|
continue;
|
|
105
104
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (!sf) {
|
|
110
|
-
sf = { buf: new Uint8Array(90), have: 0 };
|
|
111
|
-
subframes.set(key, sf);
|
|
112
|
-
}
|
|
113
|
-
sf.buf.set(buff, (id - 1) * 30);
|
|
114
|
-
sf.have |= 1 << id - 1;
|
|
115
|
-
if (id !== 3 || sf.have !== 7) continue;
|
|
116
|
-
const eph = decodeGpsLnavFrame(sf.buf, { prn, refWeek });
|
|
117
|
-
if (!eph) {
|
|
118
|
-
badParity++;
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
const prev = last.get(prn);
|
|
122
|
-
if (prev && prev.iode === eph.iode && prev.tocDate.getTime() === eph.tocDate.getTime()) {
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
last.set(prn, eph);
|
|
126
|
-
ephemerides.push(eph);
|
|
105
|
+
const r = assembler.push(prn, buff, refWeek);
|
|
106
|
+
if (r.kind === "eph") ephemerides.push(r.eph);
|
|
107
|
+
else if (r.kind === "decodeFailed") badParity++;
|
|
127
108
|
}
|
|
128
109
|
return { ephemerides, badParity };
|
|
129
110
|
}
|