gnss-js 1.55.0 → 1.57.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/{chunk-U32IU7RO.js → chunk-BU6YC6VK.js} +30 -0
- package/dist/{chunk-ZPNMIUNZ.js → chunk-UHLUAU6H.js} +131 -9
- package/dist/index.cjs +169 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -2
- package/dist/positioning.cjs +30 -0
- package/dist/positioning.d.cts +20 -0
- package/dist/positioning.d.ts +20 -0
- package/dist/positioning.js +1 -1
- package/dist/sbf.cjs +139 -9
- package/dist/sbf.d.cts +112 -28
- package/dist/sbf.d.ts +112 -28
- package/dist/sbf.js +17 -1
- package/package.json +1 -1
package/dist/positioning.d.cts
CHANGED
|
@@ -598,6 +598,26 @@ declare class SbasProcessor {
|
|
|
598
598
|
activeSats(): string[];
|
|
599
599
|
/** Number of ionospheric grid points with a valid delay across all bands. */
|
|
600
600
|
ionoGridPoints(): number;
|
|
601
|
+
/**
|
|
602
|
+
* Correction-coverage census at a GPS week/time — a diagnostic funnel over
|
|
603
|
+
* the current state, explaining how many masked satellites are actually
|
|
604
|
+
* correctable. Each stage subsumes the requirement of the previous one for a
|
|
605
|
+
* full range/clock correction: a satellite is `corrected` only when it has
|
|
606
|
+
* both a fresh fast correction and (for non-SBAS satellites) a fresh
|
|
607
|
+
* long-term correction (exactly {@link satCorrection}'s gate). `ionoGrid` is
|
|
608
|
+
* the total number of valid grid points — the additional requirement for the
|
|
609
|
+
* *iono*-corrected subset a solver forms per pierce point.
|
|
610
|
+
*
|
|
611
|
+
* Use it to tell "no corrections applied" (mask empty / products stale) apart
|
|
612
|
+
* from "corrections applied but the pierce points aren't grid-covered yet".
|
|
613
|
+
*/
|
|
614
|
+
coverage(week: number, tow: number): {
|
|
615
|
+
masked: number;
|
|
616
|
+
fast: number;
|
|
617
|
+
long: number;
|
|
618
|
+
corrected: number;
|
|
619
|
+
ionoGrid: number;
|
|
620
|
+
};
|
|
601
621
|
/**
|
|
602
622
|
* Satellite range/clock correction for a PRN at a GPS week/tow, or null if
|
|
603
623
|
* no valid (unexpired) long-term + fast correction is available. Add `dPos`
|
package/dist/positioning.d.ts
CHANGED
|
@@ -598,6 +598,26 @@ declare class SbasProcessor {
|
|
|
598
598
|
activeSats(): string[];
|
|
599
599
|
/** Number of ionospheric grid points with a valid delay across all bands. */
|
|
600
600
|
ionoGridPoints(): number;
|
|
601
|
+
/**
|
|
602
|
+
* Correction-coverage census at a GPS week/time — a diagnostic funnel over
|
|
603
|
+
* the current state, explaining how many masked satellites are actually
|
|
604
|
+
* correctable. Each stage subsumes the requirement of the previous one for a
|
|
605
|
+
* full range/clock correction: a satellite is `corrected` only when it has
|
|
606
|
+
* both a fresh fast correction and (for non-SBAS satellites) a fresh
|
|
607
|
+
* long-term correction (exactly {@link satCorrection}'s gate). `ionoGrid` is
|
|
608
|
+
* the total number of valid grid points — the additional requirement for the
|
|
609
|
+
* *iono*-corrected subset a solver forms per pierce point.
|
|
610
|
+
*
|
|
611
|
+
* Use it to tell "no corrections applied" (mask empty / products stale) apart
|
|
612
|
+
* from "corrections applied but the pierce points aren't grid-covered yet".
|
|
613
|
+
*/
|
|
614
|
+
coverage(week: number, tow: number): {
|
|
615
|
+
masked: number;
|
|
616
|
+
fast: number;
|
|
617
|
+
long: number;
|
|
618
|
+
corrected: number;
|
|
619
|
+
ionoGrid: number;
|
|
620
|
+
};
|
|
601
621
|
/**
|
|
602
622
|
* Satellite range/clock correction for a PRN at a GPS week/tow, or null if
|
|
603
623
|
* no valid (unexpired) long-term + fast correction is available. Add `dPos`
|
package/dist/positioning.js
CHANGED
package/dist/sbf.cjs
CHANGED
|
@@ -20,12 +20,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/sbf/index.ts
|
|
21
21
|
var sbf_exports = {};
|
|
22
22
|
__export(sbf_exports, {
|
|
23
|
+
SBAS_L5_MT_NAMES: () => SBAS_L5_MT_NAMES,
|
|
24
|
+
SBAS_L5_PREAMBLE_UW: () => SBAS_L5_PREAMBLE_UW,
|
|
23
25
|
decodeSbfNavigation: () => decodeSbfNavigation,
|
|
24
26
|
feedGeoBlock: () => feedGeoBlock,
|
|
27
|
+
feedGeoL5Block: () => feedGeoL5Block,
|
|
28
|
+
isSbasL1Preamble: () => isSbasL1Preamble,
|
|
29
|
+
isSbasL5Correction: () => isSbasL5Correction,
|
|
25
30
|
parseSbfAlmanac: () => parseSbfAlmanac,
|
|
26
31
|
parseSbfBdsNav: () => parseSbfBdsNav,
|
|
27
32
|
parseSbfCnav: () => parseSbfCnav,
|
|
28
33
|
parseSbfGalNav: () => parseSbfGalNav,
|
|
34
|
+
parseSbfGeoL5: () => parseSbfGeoL5,
|
|
29
35
|
parseSbfGeoNav: () => parseSbfGeoNav,
|
|
30
36
|
parseSbfGloNav: () => parseSbfGloNav,
|
|
31
37
|
parseSbfGpsNav: () => parseSbfGpsNav,
|
|
@@ -35,6 +41,8 @@ __export(sbf_exports, {
|
|
|
35
41
|
parseSbfNav: () => parseSbfNav,
|
|
36
42
|
parseSbfPvt: () => parseSbfPvt,
|
|
37
43
|
parseSbfReceiverSetup: () => parseSbfReceiverSetup,
|
|
44
|
+
sbasL5MessageName: () => sbasL5MessageName,
|
|
45
|
+
sbasL5MessageType: () => sbasL5MessageType,
|
|
38
46
|
sbfCrc16: () => crc16,
|
|
39
47
|
scanSbfFrames: () => scanSbfFrames
|
|
40
48
|
});
|
|
@@ -2033,13 +2041,42 @@ function decodeSbasGeoNav(msg, prn, week, tow) {
|
|
|
2033
2041
|
};
|
|
2034
2042
|
}
|
|
2035
2043
|
|
|
2044
|
+
// src/navbits/sbas-l5.ts
|
|
2045
|
+
var SBAS_L5_PREAMBLE_UW = 6056250;
|
|
2046
|
+
function isSbasL1Preamble(msg) {
|
|
2047
|
+
return msg[0] === 83 || msg[0] === 154 || msg[0] === 198;
|
|
2048
|
+
}
|
|
2049
|
+
function sbasL5MessageType(msg) {
|
|
2050
|
+
return getBitU(msg, 4, 6);
|
|
2051
|
+
}
|
|
2052
|
+
var SBAS_L5_MT_NAMES = {
|
|
2053
|
+
0: "Do Not Use (test)",
|
|
2054
|
+
31: "SBAS satellite mask",
|
|
2055
|
+
32: "Satellite clock-ephemeris corrections + covariance",
|
|
2056
|
+
34: "Integrity (DFREI/DFRECI)",
|
|
2057
|
+
35: "Integrity (DFREI/DFRECI)",
|
|
2058
|
+
36: "Integrity (DFREI/DFRECI)",
|
|
2059
|
+
37: "Degradation parameters + DFREI scale table",
|
|
2060
|
+
39: "SBAS satellite clock/ephemeris/covariance-1",
|
|
2061
|
+
40: "SBAS satellite clock/ephemeris/covariance-2",
|
|
2062
|
+
42: "SNT-to-UTC offset",
|
|
2063
|
+
47: "SBAS satellite almanacs",
|
|
2064
|
+
62: "Reserved",
|
|
2065
|
+
63: "Null message"
|
|
2066
|
+
};
|
|
2067
|
+
function sbasL5MessageName(type) {
|
|
2068
|
+
return SBAS_L5_MT_NAMES[type] ?? (type >= 1 && type <= 61 ? "Spare" : `Type ${type}`);
|
|
2069
|
+
}
|
|
2070
|
+
function isSbasL5Correction(type) {
|
|
2071
|
+
return type === 31 || type === 32 || type >= 34 && type <= 37 || type === 39 || type === 40 || type === 42 || type === 47;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2036
2074
|
// src/sbf/rawnav-sbas.ts
|
|
2037
|
-
function
|
|
2075
|
+
function readGeoMessage(view, b) {
|
|
2038
2076
|
const tow = view.getUint32(b + 8, true);
|
|
2039
2077
|
const wnc = view.getUint16(b + 12, true);
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2042
|
-
if (!prnStr || prnStr[0] !== "S") return {};
|
|
2078
|
+
const prnStr = svidToPrn(view.getUint8(b + 14));
|
|
2079
|
+
if (!prnStr || prnStr[0] !== "S") return null;
|
|
2043
2080
|
const msg = new Uint8Array(32);
|
|
2044
2081
|
for (let k = 0; k < 8; k++) {
|
|
2045
2082
|
const w = view.getUint32(b + 20 + 4 * k, true);
|
|
@@ -2048,12 +2085,29 @@ function feedGeoBlock(view, b, onSbasMessage) {
|
|
|
2048
2085
|
msg[4 * k + 2] = w >>> 8 & 255;
|
|
2049
2086
|
msg[4 * k + 3] = w & 255;
|
|
2050
2087
|
}
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
const
|
|
2088
|
+
return { msg, prn: Number(prnStr.slice(1)) + 100, wnc, towSec: tow / 1e3 };
|
|
2089
|
+
}
|
|
2090
|
+
function feedGeoBlock(view, b, onSbasMessage) {
|
|
2091
|
+
const g = readGeoMessage(view, b);
|
|
2092
|
+
if (!g) return {};
|
|
2093
|
+
if (!sbasCrcOk(g.msg)) return { badCrc: true };
|
|
2094
|
+
onSbasMessage?.(g.msg, g.prn, g.wnc, g.towSec);
|
|
2095
|
+
const eph = decodeSbasGeoNav(g.msg, g.prn, g.wnc, g.towSec);
|
|
2055
2096
|
return eph ? { eph } : {};
|
|
2056
2097
|
}
|
|
2098
|
+
function feedGeoL5Block(view, b, onSbasMessage, onDfmcMessage) {
|
|
2099
|
+
const g = readGeoMessage(view, b);
|
|
2100
|
+
if (!g) return {};
|
|
2101
|
+
if (!sbasCrcOk(g.msg)) return { badCrc: true };
|
|
2102
|
+
if (isSbasL1Preamble(g.msg)) {
|
|
2103
|
+
onSbasMessage?.(g.msg, g.prn, g.wnc, g.towSec);
|
|
2104
|
+
const eph = decodeSbasGeoNav(g.msg, g.prn, g.wnc, g.towSec);
|
|
2105
|
+
return eph ? { kind: "l1", eph } : { kind: "l1" };
|
|
2106
|
+
}
|
|
2107
|
+
const dfmcType = sbasL5MessageType(g.msg);
|
|
2108
|
+
onDfmcMessage?.(g.msg, g.prn, g.wnc, g.towSec, dfmcType);
|
|
2109
|
+
return { kind: "l5", dfmcType };
|
|
2110
|
+
}
|
|
2057
2111
|
function parseSbfGeoNav(data, opts = {}) {
|
|
2058
2112
|
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
2059
2113
|
const ephemerides = [];
|
|
@@ -2076,6 +2130,47 @@ function parseSbfGeoNav(data, opts = {}) {
|
|
|
2076
2130
|
});
|
|
2077
2131
|
return { ephemerides, badCrc, messages };
|
|
2078
2132
|
}
|
|
2133
|
+
function parseSbfGeoL5(data, opts = {}) {
|
|
2134
|
+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
2135
|
+
const ephemerides = [];
|
|
2136
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2137
|
+
const byType = {};
|
|
2138
|
+
const dfmcPrns = /* @__PURE__ */ new Set();
|
|
2139
|
+
let legacyMessages = 0;
|
|
2140
|
+
let dfmcMessages = 0;
|
|
2141
|
+
let badCrc = 0;
|
|
2142
|
+
let messages = 0;
|
|
2143
|
+
scanSbfFrames(data, view, (id, b, len) => {
|
|
2144
|
+
if (id !== 4021 || len < 52) return;
|
|
2145
|
+
messages++;
|
|
2146
|
+
const r = feedGeoL5Block(view, b, opts.onSbasMessage, opts.onDfmcMessage);
|
|
2147
|
+
if (r.badCrc) {
|
|
2148
|
+
badCrc++;
|
|
2149
|
+
} else if (r.kind === "l1") {
|
|
2150
|
+
legacyMessages++;
|
|
2151
|
+
if (r.eph) {
|
|
2152
|
+
const key = `${r.eph.prn}|${r.eph.tocDate.getTime()}`;
|
|
2153
|
+
if (!seen.has(key)) {
|
|
2154
|
+
seen.add(key);
|
|
2155
|
+
ephemerides.push(r.eph);
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
} else if (r.kind === "l5" && r.dfmcType !== void 0) {
|
|
2159
|
+
dfmcMessages++;
|
|
2160
|
+
byType[r.dfmcType] = (byType[r.dfmcType] ?? 0) + 1;
|
|
2161
|
+
const prn = view.getUint8(b + 14);
|
|
2162
|
+
const s = svidToPrn(prn);
|
|
2163
|
+
if (s) dfmcPrns.add(s);
|
|
2164
|
+
}
|
|
2165
|
+
});
|
|
2166
|
+
return {
|
|
2167
|
+
ephemerides,
|
|
2168
|
+
legacyMessages,
|
|
2169
|
+
dfmc: { byType, prns: [...dfmcPrns].sort(), messages: dfmcMessages },
|
|
2170
|
+
badCrc,
|
|
2171
|
+
messages
|
|
2172
|
+
};
|
|
2173
|
+
}
|
|
2079
2174
|
|
|
2080
2175
|
// src/sbf/navigation.ts
|
|
2081
2176
|
var F4_DNU4 = -2e10;
|
|
@@ -2098,8 +2193,11 @@ function decodeSbfNavigation(data, opts = {}) {
|
|
|
2098
2193
|
gloRaw: 0,
|
|
2099
2194
|
bdsRaw: 0,
|
|
2100
2195
|
sbasRaw: 0,
|
|
2196
|
+
sbasL5Raw: 0,
|
|
2101
2197
|
badFrames: 0
|
|
2102
2198
|
};
|
|
2199
|
+
const dfmcByType = {};
|
|
2200
|
+
const dfmcPrns = /* @__PURE__ */ new Set();
|
|
2103
2201
|
const cnavAsm = newCnavAssemblers();
|
|
2104
2202
|
const galAsm = newGalAssemblers();
|
|
2105
2203
|
const gloAsm = new GloStringAssembler();
|
|
@@ -2209,6 +2307,25 @@ function decodeSbfNavigation(data, opts = {}) {
|
|
|
2209
2307
|
else if (r.badCrc) counts.badFrames++;
|
|
2210
2308
|
return;
|
|
2211
2309
|
}
|
|
2310
|
+
case 4021: {
|
|
2311
|
+
if (len < 52) return;
|
|
2312
|
+
counts.sbasL5Raw++;
|
|
2313
|
+
const r = feedGeoL5Block(
|
|
2314
|
+
view,
|
|
2315
|
+
b,
|
|
2316
|
+
opts.onSbasMessage,
|
|
2317
|
+
opts.onDfmcMessage
|
|
2318
|
+
);
|
|
2319
|
+
if (r.badCrc) counts.badFrames++;
|
|
2320
|
+
else if (r.kind === "l1") {
|
|
2321
|
+
if (r.eph) addEph(r.eph);
|
|
2322
|
+
} else if (r.kind === "l5" && r.dfmcType !== void 0) {
|
|
2323
|
+
dfmcByType[r.dfmcType] = (dfmcByType[r.dfmcType] ?? 0) + 1;
|
|
2324
|
+
const s = svidToPrn(view.getUint8(b + 14));
|
|
2325
|
+
if (s) dfmcPrns.add(s);
|
|
2326
|
+
}
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2212
2329
|
/* ---- iono / UTC ---- */
|
|
2213
2330
|
case 5893:
|
|
2214
2331
|
// GPSIon
|
|
@@ -2233,7 +2350,12 @@ function decodeSbfNavigation(data, opts = {}) {
|
|
|
2233
2350
|
return;
|
|
2234
2351
|
}
|
|
2235
2352
|
});
|
|
2236
|
-
|
|
2353
|
+
const dfmc = {
|
|
2354
|
+
byType: dfmcByType,
|
|
2355
|
+
prns: [...dfmcPrns].sort(),
|
|
2356
|
+
messages: Object.values(dfmcByType).reduce((a, v) => a + v, 0)
|
|
2357
|
+
};
|
|
2358
|
+
return { ephemerides, cnav, ionoCorrections, leapSeconds, dfmc, counts };
|
|
2237
2359
|
}
|
|
2238
2360
|
|
|
2239
2361
|
// src/navbits/rs255.ts
|
|
@@ -3428,12 +3550,18 @@ function parseSbfMeas(data) {
|
|
|
3428
3550
|
}
|
|
3429
3551
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3430
3552
|
0 && (module.exports = {
|
|
3553
|
+
SBAS_L5_MT_NAMES,
|
|
3554
|
+
SBAS_L5_PREAMBLE_UW,
|
|
3431
3555
|
decodeSbfNavigation,
|
|
3432
3556
|
feedGeoBlock,
|
|
3557
|
+
feedGeoL5Block,
|
|
3558
|
+
isSbasL1Preamble,
|
|
3559
|
+
isSbasL5Correction,
|
|
3433
3560
|
parseSbfAlmanac,
|
|
3434
3561
|
parseSbfBdsNav,
|
|
3435
3562
|
parseSbfCnav,
|
|
3436
3563
|
parseSbfGalNav,
|
|
3564
|
+
parseSbfGeoL5,
|
|
3437
3565
|
parseSbfGeoNav,
|
|
3438
3566
|
parseSbfGloNav,
|
|
3439
3567
|
parseSbfGpsNav,
|
|
@@ -3443,6 +3571,8 @@ function parseSbfMeas(data) {
|
|
|
3443
3571
|
parseSbfNav,
|
|
3444
3572
|
parseSbfPvt,
|
|
3445
3573
|
parseSbfReceiverSetup,
|
|
3574
|
+
sbasL5MessageName,
|
|
3575
|
+
sbasL5MessageType,
|
|
3446
3576
|
sbfCrc16,
|
|
3447
3577
|
scanSbfFrames
|
|
3448
3578
|
});
|
package/dist/sbf.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { S as SbfAlmanac, a as SbfAlmanacResult, b as SbfGlonassAlmanac, c as SbfKeplerAlmanac, d as SbfNavResult, p as parseSbfAlmanac, e as parseSbfNav } from './nav-BYmYoh9A.cjs';
|
|
2
2
|
import { R as ReceiverPvt } from './receiver-pvt-CVFvi4kT.cjs';
|
|
3
|
-
import { K as KeplerEphemeris, C as CnavEphemeris,
|
|
3
|
+
import { K as KeplerEphemeris, C as CnavEphemeris, G as GlonassEphemeris, E as Ephemeris } from './nav-DImXUdbp.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Septentrio SBF framing shared by the measurement and navigation
|
|
@@ -213,6 +213,91 @@ interface SbfCnavResult {
|
|
|
213
213
|
*/
|
|
214
214
|
declare function parseSbfCnav(data: Uint8Array): SbfCnavResult;
|
|
215
215
|
|
|
216
|
+
/** Callback fed every CRC-valid SBAS message (any type), as MSB-first bits. */
|
|
217
|
+
type SbasMessageCb = (msg: Uint8Array, prn: number, week: number, tow: number) => void;
|
|
218
|
+
/** Callback fed every CRC-valid native-DFMC (L5) message, with its type. */
|
|
219
|
+
type DfmcMessageCb = (msg: Uint8Array, prn: number, week: number, tow: number, type: number) => void;
|
|
220
|
+
/**
|
|
221
|
+
* Process one GEORawL1 block at frame offset `b`: extract the 250-bit
|
|
222
|
+
* SBAS L1 message, CRC-24Q gate it, and decode a GEO ephemeris if it is
|
|
223
|
+
* message type 9. Returns the ephemeris, `{ badCrc: true }` on a failed
|
|
224
|
+
* CRC, or `{}` for any other (non–type-9) message.
|
|
225
|
+
*/
|
|
226
|
+
declare function feedGeoBlock(view: DataView, b: number, onSbasMessage?: SbasMessageCb): {
|
|
227
|
+
eph?: GlonassEphemeris;
|
|
228
|
+
badCrc?: boolean;
|
|
229
|
+
};
|
|
230
|
+
/** Result of routing one GEORawL5 (4021) block. */
|
|
231
|
+
interface GeoL5Result {
|
|
232
|
+
eph?: GlonassEphemeris;
|
|
233
|
+
badCrc?: boolean;
|
|
234
|
+
/** 'l1' = DO-229 content relayed on L5 (fed to `onSbasMessage`, decodable by
|
|
235
|
+
* the L1 SbasProcessor); 'l5' = a native DFMC message (header only). */
|
|
236
|
+
kind?: 'l1' | 'l5';
|
|
237
|
+
/** Native-DFMC message type (Table B-98), when `kind === 'l5'`. */
|
|
238
|
+
dfmcType?: number;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Process one GEORawL5 block at frame offset `b`. The L5 signal carries a mix:
|
|
242
|
+
* GEOs relaying DO-229 (L1-format) content — routed to `onSbasMessage` and
|
|
243
|
+
* decoded for a GEO ephemeris exactly like {@link feedGeoBlock} — and GEOs
|
|
244
|
+
* broadcasting native DFMC frames, which are CRC-gated and surfaced via
|
|
245
|
+
* `onDfmcMessage` with their Table B-98 type but not field-decoded (see
|
|
246
|
+
* {@link ../navbits/sbas-l5}). Classification is by preamble.
|
|
247
|
+
*/
|
|
248
|
+
declare function feedGeoL5Block(view: DataView, b: number, onSbasMessage?: SbasMessageCb, onDfmcMessage?: DfmcMessageCb): GeoL5Result;
|
|
249
|
+
interface SbfGeoNavResult {
|
|
250
|
+
/** SBAS GEO ephemerides in stream order, unchanged repeats suppressed. */
|
|
251
|
+
ephemerides: GlonassEphemeris[];
|
|
252
|
+
/** GEORawL1 messages whose CRC-24Q check failed (dropped). */
|
|
253
|
+
badCrc: number;
|
|
254
|
+
/** Total GEORawL1 blocks seen (with valid SBF framing). */
|
|
255
|
+
messages: number;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Decode every GEORawL1 block in an SBF byte stream into SBAS GEO
|
|
259
|
+
* ephemerides (message type 9), de-duping unchanged rebroadcasts by
|
|
260
|
+
* (PRN, time-of-clock). The one-pass {@link decodeSbfNavigation} routes
|
|
261
|
+
* the same blocks through {@link feedGeoBlock}; this standalone parser
|
|
262
|
+
* mirrors the per-constellation `parseSbf*` helpers.
|
|
263
|
+
*/
|
|
264
|
+
declare function parseSbfGeoNav(data: Uint8Array, opts?: {
|
|
265
|
+
onSbasMessage?: (msg: Uint8Array, prn: number, week: number, tow: number) => void;
|
|
266
|
+
}): SbfGeoNavResult;
|
|
267
|
+
/** Census of the SBAS L5 (DFMC) frames in a stream. Correction content is not
|
|
268
|
+
* field-decoded (see {@link ../navbits/sbas-l5}). */
|
|
269
|
+
interface DfmcCensus {
|
|
270
|
+
/** Native-DFMC frame count by Table B-98 message type. */
|
|
271
|
+
byType: Record<number, number>;
|
|
272
|
+
/** GEO PRNs (e.g. 'S21') broadcasting native DFMC. */
|
|
273
|
+
prns: string[];
|
|
274
|
+
/** Total CRC-valid native-DFMC frames. */
|
|
275
|
+
messages: number;
|
|
276
|
+
}
|
|
277
|
+
interface SbfGeoL5Result {
|
|
278
|
+
/** GEO ephemerides from DO-229 (L1-format) content relayed on L5 (MT9). */
|
|
279
|
+
ephemerides: GlonassEphemeris[];
|
|
280
|
+
/** CRC-valid L5-signal frames carrying DO-229 (L1-format) content. */
|
|
281
|
+
legacyMessages: number;
|
|
282
|
+
/** Native-DFMC frame census. */
|
|
283
|
+
dfmc: DfmcCensus;
|
|
284
|
+
/** GEORawL5 frames whose CRC-24Q check failed (dropped). */
|
|
285
|
+
badCrc: number;
|
|
286
|
+
/** Total GEORawL5 blocks seen (with valid SBF framing). */
|
|
287
|
+
messages: number;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Decode every GEORawL5 (4021) block in an SBF byte stream. DO-229 (L1-format)
|
|
291
|
+
* content relayed on L5 is fed to `onSbasMessage` (usable by the L1
|
|
292
|
+
* SbasProcessor) and decoded for GEO ephemerides; native DFMC frames are
|
|
293
|
+
* CRC-gated and counted by message type. The one-pass
|
|
294
|
+
* {@link ../sbf/navigation.decodeSbfNavigation} performs the same routing.
|
|
295
|
+
*/
|
|
296
|
+
declare function parseSbfGeoL5(data: Uint8Array, opts?: {
|
|
297
|
+
onSbasMessage?: SbasMessageCb;
|
|
298
|
+
onDfmcMessage?: DfmcMessageCb;
|
|
299
|
+
}): SbfGeoL5Result;
|
|
300
|
+
|
|
216
301
|
/**
|
|
217
302
|
* One-pass SBF navigation decoder.
|
|
218
303
|
*
|
|
@@ -251,6 +336,8 @@ interface SbfNavCounts {
|
|
|
251
336
|
bdsRaw: number;
|
|
252
337
|
/** Raw SBAS L1 GEO message blocks (GEORawL1). */
|
|
253
338
|
sbasRaw: number;
|
|
339
|
+
/** Raw SBAS L5 GEO message blocks (GEORawL5) — DO-229-on-L5 + native DFMC. */
|
|
340
|
+
sbasL5Raw: number;
|
|
254
341
|
/** Frames dropped by a CRC/parity check across all raw decoders. */
|
|
255
342
|
badFrames: number;
|
|
256
343
|
}
|
|
@@ -270,6 +357,9 @@ interface SbfNavigation {
|
|
|
270
357
|
ionoCorrections: Record<string, number[]>;
|
|
271
358
|
/** GPS-UTC ΔtLS from the last GPSUtc block, if any. */
|
|
272
359
|
leapSeconds: number | null;
|
|
360
|
+
/** SBAS L5 (DFMC) native-frame census — message-type counts + GEO PRNs. The
|
|
361
|
+
* correction content is not field-decoded (see navbits/sbas-l5). */
|
|
362
|
+
dfmc: DfmcCensus;
|
|
273
363
|
counts: SbfNavCounts;
|
|
274
364
|
}
|
|
275
365
|
/**
|
|
@@ -282,6 +372,9 @@ declare function decodeSbfNavigation(data: Uint8Array, opts?: {
|
|
|
282
372
|
/** Called for every CRC-valid SBAS L1 message (all types) — feed an
|
|
283
373
|
* {@link ../positioning/sbas.SbasProcessor} to build SBAS corrections. */
|
|
284
374
|
onSbasMessage?: (msg: Uint8Array, prn: number, week: number, tow: number) => void;
|
|
375
|
+
/** Called for every CRC-valid native-DFMC (L5) message, with its Table
|
|
376
|
+
* B-98 type — for inspection; the payload is not field-decoded. */
|
|
377
|
+
onDfmcMessage?: DfmcMessageCb;
|
|
285
378
|
}): SbfNavigation;
|
|
286
379
|
|
|
287
380
|
/**
|
|
@@ -383,34 +476,25 @@ interface SbfGloNavResult {
|
|
|
383
476
|
}
|
|
384
477
|
declare function parseSbfGloNav(data: Uint8Array): SbfGloNavResult;
|
|
385
478
|
|
|
479
|
+
/** DFMC L5 preamble: 24-bit unique word 0x5C693A, distributed 4 bits over six
|
|
480
|
+
* successive blocks (Annex 10 §3.5.10.2). */
|
|
481
|
+
declare const SBAS_L5_PREAMBLE_UW = 6056250;
|
|
386
482
|
/**
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
483
|
+
* Classify a CRC-valid GEO message by its preamble. The L5 signal carries a
|
|
484
|
+
* mix: some GEOs relay DO-229 (L1-format) content on L5 — decodable by the
|
|
485
|
+
* existing L1 {@link ../positioning/sbas.SbasProcessor} — while others carry
|
|
486
|
+
* native DFMC frames. The 8-bit L1 preamble is checked first (definitive);
|
|
487
|
+
* anything else is treated as DFMC.
|
|
391
488
|
*/
|
|
392
|
-
declare function
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
/** Total GEORawL1 blocks seen (with valid SBF framing). */
|
|
402
|
-
messages: number;
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Decode every GEORawL1 block in an SBF byte stream into SBAS GEO
|
|
406
|
-
* ephemerides (message type 9), de-duping unchanged rebroadcasts by
|
|
407
|
-
* (PRN, time-of-clock). The one-pass {@link decodeSbfNavigation} routes
|
|
408
|
-
* the same blocks through {@link feedGeoBlock}; this standalone parser
|
|
409
|
-
* mirrors the per-constellation `parseSbf*` helpers.
|
|
410
|
-
*/
|
|
411
|
-
declare function parseSbfGeoNav(data: Uint8Array, opts?: {
|
|
412
|
-
onSbasMessage?: (msg: Uint8Array, prn: number, week: number, tow: number) => void;
|
|
413
|
-
}): SbfGeoNavResult;
|
|
489
|
+
declare function isSbasL1Preamble(msg: Uint8Array): boolean;
|
|
490
|
+
/** L5 (DFMC) message type — 6 bits after the 4-bit preamble (Table B-98). */
|
|
491
|
+
declare function sbasL5MessageType(msg: Uint8Array): number;
|
|
492
|
+
/** Table B-98 — L5 (DFMC) broadcast message types. */
|
|
493
|
+
declare const SBAS_L5_MT_NAMES: Readonly<Record<number, string>>;
|
|
494
|
+
/** Human-readable name for an L5 (DFMC) message type. */
|
|
495
|
+
declare function sbasL5MessageName(type: number): string;
|
|
496
|
+
/** True for L5 types that carry actual corrections (vs test/null/spare). */
|
|
497
|
+
declare function isSbasL5Correction(type: number): boolean;
|
|
414
498
|
|
|
415
499
|
/** Constellations HAS corrects: GPS (GNSS ID 0), Galileo (GNSS ID 2). */
|
|
416
500
|
type HasSystem = 'G' | 'E';
|
|
@@ -647,4 +731,4 @@ interface SbfParseResult {
|
|
|
647
731
|
*/
|
|
648
732
|
declare function parseSbfMeas(data: Uint8Array): SbfParseResult;
|
|
649
733
|
|
|
650
|
-
export { CnavEphemeris, type HasMessage, ReceiverPvt, type SbfBdsNavResult, type SbfCnavEphemeris, type SbfCnavResult, type SbfGalEphemeris, type SbfGalNavResult, type SbfGeoNavResult, type SbfGloNavResult, type SbfGpsNavResult, type SbfHasMessage, type SbfHasResult, type SbfIonoUtcResult, type SbfMeasEpoch, type SbfMeasurement, type SbfNavCounts, type SbfNavigation, type SbfParseResult, type SbfPvt, type SbfPvtResult, type SbfReceiverSetup, decodeSbfNavigation, feedGeoBlock, parseSbfBdsNav, parseSbfCnav, parseSbfGalNav, parseSbfGeoNav, parseSbfGloNav, parseSbfGpsNav, parseSbfHas, parseSbfIonoUtc, parseSbfMeas, parseSbfPvt, parseSbfReceiverSetup, crc16 as sbfCrc16, scanSbfFrames };
|
|
734
|
+
export { CnavEphemeris, type DfmcCensus, type DfmcMessageCb, type GeoL5Result, type HasMessage, ReceiverPvt, SBAS_L5_MT_NAMES, SBAS_L5_PREAMBLE_UW, type SbasMessageCb, type SbfBdsNavResult, type SbfCnavEphemeris, type SbfCnavResult, type SbfGalEphemeris, type SbfGalNavResult, type SbfGeoL5Result, type SbfGeoNavResult, type SbfGloNavResult, type SbfGpsNavResult, type SbfHasMessage, type SbfHasResult, type SbfIonoUtcResult, type SbfMeasEpoch, type SbfMeasurement, type SbfNavCounts, type SbfNavigation, type SbfParseResult, type SbfPvt, type SbfPvtResult, type SbfReceiverSetup, decodeSbfNavigation, feedGeoBlock, feedGeoL5Block, isSbasL1Preamble, isSbasL5Correction, parseSbfBdsNav, parseSbfCnav, parseSbfGalNav, parseSbfGeoL5, parseSbfGeoNav, parseSbfGloNav, parseSbfGpsNav, parseSbfHas, parseSbfIonoUtc, parseSbfMeas, parseSbfPvt, parseSbfReceiverSetup, sbasL5MessageName, sbasL5MessageType, crc16 as sbfCrc16, scanSbfFrames };
|