gnss-js 1.14.1 → 1.16.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-4LVD4DYL.js +146 -0
- package/dist/{chunk-5IXK25MX.js → chunk-6CX6EXRK.js} +120 -26
- package/dist/{chunk-SWKWJEGY.js → chunk-R33A2VA7.js} +142 -15
- package/dist/{chunk-YIHO74OS.js → chunk-YPOVPXNK.js} +392 -67
- package/dist/index.cjs +804 -124
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +26 -5
- package/dist/novatel.cjs +357 -14
- package/dist/novatel.d.cts +69 -1
- package/dist/novatel.d.ts +69 -1
- package/dist/novatel.js +12 -1
- package/dist/sbf.cjs +482 -68
- package/dist/sbf.d.cts +155 -1
- package/dist/sbf.d.ts +155 -1
- package/dist/sbf.js +13 -3
- package/dist/ubx.cjs +262 -29
- package/dist/ubx.d.cts +81 -1
- package/dist/ubx.d.ts +81 -1
- package/dist/ubx.js +8 -3
- package/package.json +1 -1
package/dist/ubx.d.cts
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
+
import { E as Ephemeris } from './nav-BAI1a9vK.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* u-blox UBX framing shared by the measurement and navigation decoders:
|
|
5
|
+
* 0xB5 0x62 sync, message class and ID, little-endian payload length,
|
|
6
|
+
* payload, and an 8-bit Fletcher checksum over class..payload.
|
|
7
|
+
*/
|
|
8
|
+
/** One checksum-valid UBX frame located in a byte stream. */
|
|
9
|
+
interface UbxFrame {
|
|
10
|
+
/** Message class, e.g. 0x02 for RXM. */
|
|
11
|
+
msgClass: number;
|
|
12
|
+
/** Message ID within the class, e.g. 0x15 for RXM-RAWX. */
|
|
13
|
+
msgId: number;
|
|
14
|
+
/** Payload bytes (a view into the input buffer, not a copy). */
|
|
15
|
+
payload: Uint8Array;
|
|
16
|
+
/** Byte offset of the payload within the input buffer. */
|
|
17
|
+
payloadStart: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Iterate every checksum-valid UBX frame in `data`. Bad checksums are
|
|
21
|
+
* counted in `stats.badChecksums` and a resync continues at the next
|
|
22
|
+
* byte; a frame candidate that overruns the buffer ends the scan
|
|
23
|
+
* (truncated capture).
|
|
24
|
+
*/
|
|
25
|
+
declare function ubxFrames(data: Uint8Array, stats?: {
|
|
26
|
+
badChecksums: number;
|
|
27
|
+
}): Generator<UbxFrame>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* u-blox UBX navigation-message decoding: GPS/QZSS LNAV broadcast
|
|
31
|
+
* ephemerides from RXM-SFRBX (class 0x02, id 0x13).
|
|
32
|
+
*
|
|
33
|
+
* Ported from RTKLIB demo5 (rtklibexplorer fork, src/rcv/ublox.c:
|
|
34
|
+
* decode_rxmsfrbx / decode_nav / decode_eph, Copyright (c) 2007-2020
|
|
35
|
+
* T. Takasu, BSD-2-Clause); the subframe fields themselves are decoded
|
|
36
|
+
* by `decodeGpsLnavFrame` (the decode_frame port in src/navbits).
|
|
37
|
+
*
|
|
38
|
+
* On D30* polarity: the receiver has already checked parity and
|
|
39
|
+
* resolved the polarity inversion of the data bits before writing the
|
|
40
|
+
* 30-bit words into the 30 LSBs of each `dwrd`, so — exactly like
|
|
41
|
+
* RTKLIB's decode_nav (`U4(p)>>6`, "24 x 10 bits w/o parity") — the
|
|
42
|
+
* conversion to parity-stripped 24-bit words is a plain 6-bit shift
|
|
43
|
+
* with NO D30* re-inversion. (Verified against the TLM preamble 0x8B
|
|
44
|
+
* at bits 29..22 of word 1 in every GPS/QZSS LNAV message of the
|
|
45
|
+
* reference F9P capture.)
|
|
46
|
+
*
|
|
47
|
+
* Other constellations in RXM-SFRBX (Galileo I/NAV, BDS D1/D2, GLONASS
|
|
48
|
+
* strings, SBAS) and GPS/QZSS CNAV are out of scope and skipped
|
|
49
|
+
* silently, as are LNAV subframes 4/5 (iono/UTC/almanac pages).
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
interface UbxNavOptions {
|
|
53
|
+
/**
|
|
54
|
+
* Full GPS week used to resolve the 10-bit broadcast week. When
|
|
55
|
+
* omitted, the week is harvested from the first RXM-RAWX message in
|
|
56
|
+
* the same stream (u-blox raw logs carry both); a stream with
|
|
57
|
+
* neither yields no ephemerides — the system clock is never used.
|
|
58
|
+
*/
|
|
59
|
+
refWeek?: number;
|
|
60
|
+
}
|
|
61
|
+
interface UbxNavResult {
|
|
62
|
+
/** Broadcast ephemerides in stream order, duplicates suppressed. */
|
|
63
|
+
ephemerides: Ephemeris[];
|
|
64
|
+
/**
|
|
65
|
+
* Subframes rejected for inconsistency: an out-of-range subframe ID
|
|
66
|
+
* in the HOW word, or a complete subframe-1/2/3 set whose
|
|
67
|
+
* IODC/IODE cross-check failed (mixed issues of data).
|
|
68
|
+
*/
|
|
69
|
+
badParity: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Decode every GPS/QZSS LNAV ephemeris broadcast in a UBX byte stream
|
|
73
|
+
* (RXM-SFRBX). Subframes 1–3 are assembled per satellite; a frame is
|
|
74
|
+
* decoded when subframe 3 arrives with 1 and 2 buffered (RTKLIB
|
|
75
|
+
* decode_nav), and repeated broadcasts of an unchanged ephemeris are
|
|
76
|
+
* suppressed by issue of data and clock epoch like `parseNovatelNav`.
|
|
77
|
+
*/
|
|
78
|
+
declare function parseUbxNav(data: Uint8Array, opts?: UbxNavOptions): UbxNavResult;
|
|
79
|
+
|
|
1
80
|
/**
|
|
2
81
|
* u-blox UBX raw-measurement decoding (RXM-RAWX) — the path from a
|
|
3
82
|
* receiver log to RINEX-grade observables.
|
|
@@ -12,6 +91,7 @@
|
|
|
12
91
|
* RINEX attributes chosen to match RTKLIB's u-blox conversion (the de
|
|
13
92
|
* facto reference: GPS L2 CL/CM as 2X, Galileo E1 as 1X, E5b as 7X).
|
|
14
93
|
*/
|
|
94
|
+
|
|
15
95
|
interface UbxMeasurement {
|
|
16
96
|
/** RINEX PRN, e.g. "G04", "R11", "S23". */
|
|
17
97
|
prn: string;
|
|
@@ -53,4 +133,4 @@ interface UbxParseResult {
|
|
|
53
133
|
*/
|
|
54
134
|
declare function parseUbxRawx(data: Uint8Array): UbxParseResult;
|
|
55
135
|
|
|
56
|
-
export { type UbxMeasurement, type UbxParseResult, type UbxRawxEpoch, parseUbxRawx };
|
|
136
|
+
export { type UbxFrame, type UbxMeasurement, type UbxNavOptions, type UbxNavResult, type UbxParseResult, type UbxRawxEpoch, parseUbxNav, parseUbxRawx, ubxFrames };
|
package/dist/ubx.d.ts
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
+
import { E as Ephemeris } from './nav-BAI1a9vK.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* u-blox UBX framing shared by the measurement and navigation decoders:
|
|
5
|
+
* 0xB5 0x62 sync, message class and ID, little-endian payload length,
|
|
6
|
+
* payload, and an 8-bit Fletcher checksum over class..payload.
|
|
7
|
+
*/
|
|
8
|
+
/** One checksum-valid UBX frame located in a byte stream. */
|
|
9
|
+
interface UbxFrame {
|
|
10
|
+
/** Message class, e.g. 0x02 for RXM. */
|
|
11
|
+
msgClass: number;
|
|
12
|
+
/** Message ID within the class, e.g. 0x15 for RXM-RAWX. */
|
|
13
|
+
msgId: number;
|
|
14
|
+
/** Payload bytes (a view into the input buffer, not a copy). */
|
|
15
|
+
payload: Uint8Array;
|
|
16
|
+
/** Byte offset of the payload within the input buffer. */
|
|
17
|
+
payloadStart: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Iterate every checksum-valid UBX frame in `data`. Bad checksums are
|
|
21
|
+
* counted in `stats.badChecksums` and a resync continues at the next
|
|
22
|
+
* byte; a frame candidate that overruns the buffer ends the scan
|
|
23
|
+
* (truncated capture).
|
|
24
|
+
*/
|
|
25
|
+
declare function ubxFrames(data: Uint8Array, stats?: {
|
|
26
|
+
badChecksums: number;
|
|
27
|
+
}): Generator<UbxFrame>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* u-blox UBX navigation-message decoding: GPS/QZSS LNAV broadcast
|
|
31
|
+
* ephemerides from RXM-SFRBX (class 0x02, id 0x13).
|
|
32
|
+
*
|
|
33
|
+
* Ported from RTKLIB demo5 (rtklibexplorer fork, src/rcv/ublox.c:
|
|
34
|
+
* decode_rxmsfrbx / decode_nav / decode_eph, Copyright (c) 2007-2020
|
|
35
|
+
* T. Takasu, BSD-2-Clause); the subframe fields themselves are decoded
|
|
36
|
+
* by `decodeGpsLnavFrame` (the decode_frame port in src/navbits).
|
|
37
|
+
*
|
|
38
|
+
* On D30* polarity: the receiver has already checked parity and
|
|
39
|
+
* resolved the polarity inversion of the data bits before writing the
|
|
40
|
+
* 30-bit words into the 30 LSBs of each `dwrd`, so — exactly like
|
|
41
|
+
* RTKLIB's decode_nav (`U4(p)>>6`, "24 x 10 bits w/o parity") — the
|
|
42
|
+
* conversion to parity-stripped 24-bit words is a plain 6-bit shift
|
|
43
|
+
* with NO D30* re-inversion. (Verified against the TLM preamble 0x8B
|
|
44
|
+
* at bits 29..22 of word 1 in every GPS/QZSS LNAV message of the
|
|
45
|
+
* reference F9P capture.)
|
|
46
|
+
*
|
|
47
|
+
* Other constellations in RXM-SFRBX (Galileo I/NAV, BDS D1/D2, GLONASS
|
|
48
|
+
* strings, SBAS) and GPS/QZSS CNAV are out of scope and skipped
|
|
49
|
+
* silently, as are LNAV subframes 4/5 (iono/UTC/almanac pages).
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
interface UbxNavOptions {
|
|
53
|
+
/**
|
|
54
|
+
* Full GPS week used to resolve the 10-bit broadcast week. When
|
|
55
|
+
* omitted, the week is harvested from the first RXM-RAWX message in
|
|
56
|
+
* the same stream (u-blox raw logs carry both); a stream with
|
|
57
|
+
* neither yields no ephemerides — the system clock is never used.
|
|
58
|
+
*/
|
|
59
|
+
refWeek?: number;
|
|
60
|
+
}
|
|
61
|
+
interface UbxNavResult {
|
|
62
|
+
/** Broadcast ephemerides in stream order, duplicates suppressed. */
|
|
63
|
+
ephemerides: Ephemeris[];
|
|
64
|
+
/**
|
|
65
|
+
* Subframes rejected for inconsistency: an out-of-range subframe ID
|
|
66
|
+
* in the HOW word, or a complete subframe-1/2/3 set whose
|
|
67
|
+
* IODC/IODE cross-check failed (mixed issues of data).
|
|
68
|
+
*/
|
|
69
|
+
badParity: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Decode every GPS/QZSS LNAV ephemeris broadcast in a UBX byte stream
|
|
73
|
+
* (RXM-SFRBX). Subframes 1–3 are assembled per satellite; a frame is
|
|
74
|
+
* decoded when subframe 3 arrives with 1 and 2 buffered (RTKLIB
|
|
75
|
+
* decode_nav), and repeated broadcasts of an unchanged ephemeris are
|
|
76
|
+
* suppressed by issue of data and clock epoch like `parseNovatelNav`.
|
|
77
|
+
*/
|
|
78
|
+
declare function parseUbxNav(data: Uint8Array, opts?: UbxNavOptions): UbxNavResult;
|
|
79
|
+
|
|
1
80
|
/**
|
|
2
81
|
* u-blox UBX raw-measurement decoding (RXM-RAWX) — the path from a
|
|
3
82
|
* receiver log to RINEX-grade observables.
|
|
@@ -12,6 +91,7 @@
|
|
|
12
91
|
* RINEX attributes chosen to match RTKLIB's u-blox conversion (the de
|
|
13
92
|
* facto reference: GPS L2 CL/CM as 2X, Galileo E1 as 1X, E5b as 7X).
|
|
14
93
|
*/
|
|
94
|
+
|
|
15
95
|
interface UbxMeasurement {
|
|
16
96
|
/** RINEX PRN, e.g. "G04", "R11", "S23". */
|
|
17
97
|
prn: string;
|
|
@@ -53,4 +133,4 @@ interface UbxParseResult {
|
|
|
53
133
|
*/
|
|
54
134
|
declare function parseUbxRawx(data: Uint8Array): UbxParseResult;
|
|
55
135
|
|
|
56
|
-
export { type UbxMeasurement, type UbxParseResult, type UbxRawxEpoch, parseUbxRawx };
|
|
136
|
+
export { type UbxFrame, type UbxMeasurement, type UbxNavOptions, type UbxNavResult, type UbxParseResult, type UbxRawxEpoch, parseUbxNav, parseUbxRawx, ubxFrames };
|
package/dist/ubx.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gnss-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.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,
|