gnss-js 1.17.0 → 1.18.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/ubx.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { E as Ephemeris } from './nav-BAI1a9vK.cjs';
2
+ import { C as CnavEphemeris } from './cnav-CRns0ECn.cjs';
2
3
 
3
4
  /**
4
5
  * u-blox UBX framing shared by the measurement and navigation decoders:
@@ -117,6 +118,36 @@ interface UbxIonoUtcResult {
117
118
  */
118
119
  declare function parseUbxIonoUtc(data: Uint8Array): UbxIonoUtcResult;
119
120
 
121
+ /**
122
+ * u-blox UBX raw CNAV decoding: GPS L2C CNAV messages from RXM-SFRBX
123
+ * (class 0x02, id 0x13), gnssId 0 with sigId 3 (L2 CL) or 4 (L2 CM).
124
+ *
125
+ * Word packing: the u-blox interface description delivers the 300-bit
126
+ * CNAV message as 10 32-bit `dwrd` words (little-endian in the
127
+ * stream) with the message bits left-justified MSB-first — message
128
+ * bit 0 is bit 31 of dwrd[0], and the low 20 bits of dwrd[9] are
129
+ * padding. Verified empirically on a ZED-F9P capture: this unpacking
130
+ * yields a valid CRC-24Q (and the 0x8B preamble in the top byte of
131
+ * dwrd[0], the same property `readLnavSubframe` in ./nav uses to skip
132
+ * CNAV frames) on effectively every message. RTKLIB demo5 does not
133
+ * decode CNAV from u-blox receivers; the field decoding lives in
134
+ * `src/navbits/cnav.ts`, working from IS-GPS-200 directly.
135
+ */
136
+
137
+ interface UbxCnavResult {
138
+ /** Assembled CNAV ephemerides in stream order, repeats suppressed. */
139
+ ephemerides: CnavEphemeris[];
140
+ /** Raw messages whose CRC-24Q check failed (dropped). */
141
+ badCrc: number;
142
+ /** Total GPS L2C RXM-SFRBX messages seen (checksum-valid frames). */
143
+ messages: number;
144
+ }
145
+ /**
146
+ * Decode every GPS L2C CNAV message in a UBX byte stream (RXM-SFRBX,
147
+ * gnssId 0, sigId 3/4) and assemble them into ephemerides.
148
+ */
149
+ declare function parseUbxCnav(data: Uint8Array): UbxCnavResult;
150
+
120
151
  /**
121
152
  * u-blox UBX raw-measurement decoding (RXM-RAWX) — the path from a
122
153
  * receiver log to RINEX-grade observables.
@@ -173,4 +204,4 @@ interface UbxParseResult {
173
204
  */
174
205
  declare function parseUbxRawx(data: Uint8Array): UbxParseResult;
175
206
 
176
- export { type UbxFrame, type UbxIonoUtcResult, type UbxMeasurement, type UbxNavOptions, type UbxNavResult, type UbxParseResult, type UbxRawxEpoch, parseUbxIonoUtc, parseUbxNav, parseUbxRawx, ubxFrames };
207
+ export { type UbxCnavResult, type UbxFrame, type UbxIonoUtcResult, type UbxMeasurement, type UbxNavOptions, type UbxNavResult, type UbxParseResult, type UbxRawxEpoch, parseUbxCnav, parseUbxIonoUtc, parseUbxNav, parseUbxRawx, ubxFrames };
package/dist/ubx.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { E as Ephemeris } from './nav-BAI1a9vK.js';
2
+ import { C as CnavEphemeris } from './cnav-CRns0ECn.js';
2
3
 
3
4
  /**
4
5
  * u-blox UBX framing shared by the measurement and navigation decoders:
@@ -117,6 +118,36 @@ interface UbxIonoUtcResult {
117
118
  */
118
119
  declare function parseUbxIonoUtc(data: Uint8Array): UbxIonoUtcResult;
119
120
 
121
+ /**
122
+ * u-blox UBX raw CNAV decoding: GPS L2C CNAV messages from RXM-SFRBX
123
+ * (class 0x02, id 0x13), gnssId 0 with sigId 3 (L2 CL) or 4 (L2 CM).
124
+ *
125
+ * Word packing: the u-blox interface description delivers the 300-bit
126
+ * CNAV message as 10 32-bit `dwrd` words (little-endian in the
127
+ * stream) with the message bits left-justified MSB-first — message
128
+ * bit 0 is bit 31 of dwrd[0], and the low 20 bits of dwrd[9] are
129
+ * padding. Verified empirically on a ZED-F9P capture: this unpacking
130
+ * yields a valid CRC-24Q (and the 0x8B preamble in the top byte of
131
+ * dwrd[0], the same property `readLnavSubframe` in ./nav uses to skip
132
+ * CNAV frames) on effectively every message. RTKLIB demo5 does not
133
+ * decode CNAV from u-blox receivers; the field decoding lives in
134
+ * `src/navbits/cnav.ts`, working from IS-GPS-200 directly.
135
+ */
136
+
137
+ interface UbxCnavResult {
138
+ /** Assembled CNAV ephemerides in stream order, repeats suppressed. */
139
+ ephemerides: CnavEphemeris[];
140
+ /** Raw messages whose CRC-24Q check failed (dropped). */
141
+ badCrc: number;
142
+ /** Total GPS L2C RXM-SFRBX messages seen (checksum-valid frames). */
143
+ messages: number;
144
+ }
145
+ /**
146
+ * Decode every GPS L2C CNAV message in a UBX byte stream (RXM-SFRBX,
147
+ * gnssId 0, sigId 3/4) and assemble them into ephemerides.
148
+ */
149
+ declare function parseUbxCnav(data: Uint8Array): UbxCnavResult;
150
+
120
151
  /**
121
152
  * u-blox UBX raw-measurement decoding (RXM-RAWX) — the path from a
122
153
  * receiver log to RINEX-grade observables.
@@ -173,4 +204,4 @@ interface UbxParseResult {
173
204
  */
174
205
  declare function parseUbxRawx(data: Uint8Array): UbxParseResult;
175
206
 
176
- export { type UbxFrame, type UbxIonoUtcResult, type UbxMeasurement, type UbxNavOptions, type UbxNavResult, type UbxParseResult, type UbxRawxEpoch, parseUbxIonoUtc, parseUbxNav, parseUbxRawx, ubxFrames };
207
+ export { type UbxCnavResult, type UbxFrame, type UbxIonoUtcResult, type UbxMeasurement, type UbxNavOptions, type UbxNavResult, type UbxParseResult, type UbxRawxEpoch, parseUbxCnav, parseUbxIonoUtc, parseUbxNav, parseUbxRawx, ubxFrames };
package/dist/ubx.js CHANGED
@@ -1,11 +1,14 @@
1
1
  import {
2
+ parseUbxCnav,
2
3
  parseUbxIonoUtc,
3
4
  parseUbxNav,
4
5
  parseUbxRawx,
5
6
  ubxFrames
6
- } from "./chunk-IG5CDNDS.js";
7
- import "./chunk-REYOYF7O.js";
7
+ } from "./chunk-FEGLXNWA.js";
8
+ import "./chunk-Y5IWUPJQ.js";
9
+ import "./chunk-IQ5OIMQD.js";
8
10
  export {
11
+ parseUbxCnav,
9
12
  parseUbxIonoUtc,
10
13
  parseUbxNav,
11
14
  parseUbxRawx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.17.0",
3
+ "version": "1.18.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,