gnss-js 1.18.0 → 1.20.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.
Files changed (43) hide show
  1. package/dist/{chunk-2IM5VXNI.js → chunk-7RKLWE6R.js} +23 -2
  2. package/dist/{chunk-QXZZNXE3.js → chunk-B5LU4746.js} +1 -1
  3. package/dist/{chunk-FEGLXNWA.js → chunk-DLXTTHRK.js} +2 -4
  4. package/dist/{chunk-OMVL3X7V.js → chunk-JNFV5BYB.js} +186 -8
  5. package/dist/{chunk-HXF7XVW7.js → chunk-NOQAAUGY.js} +297 -11
  6. package/dist/{chunk-CG7SF45F.js → chunk-VJEPOC76.js} +908 -14
  7. package/dist/{chunk-Y5IWUPJQ.js → chunk-WZDFZ76K.js} +151 -8
  8. package/dist/index.cjs +3283 -1908
  9. package/dist/index.d.cts +5 -5
  10. package/dist/index.d.ts +5 -5
  11. package/dist/index.js +25 -8
  12. package/dist/nav-BYmYoh9A.d.cts +137 -0
  13. package/dist/nav-CN8rxL4h.d.ts +137 -0
  14. package/dist/nav-DImXUdbp.d.cts +223 -0
  15. package/dist/nav-DImXUdbp.d.ts +223 -0
  16. package/dist/novatel.cjs +230 -15
  17. package/dist/novatel.d.cts +8 -1
  18. package/dist/novatel.d.ts +8 -1
  19. package/dist/novatel.js +2 -2
  20. package/dist/orbit.cjs +190 -8
  21. package/dist/orbit.d.cts +91 -2
  22. package/dist/orbit.d.ts +91 -2
  23. package/dist/orbit.js +9 -1
  24. package/dist/positioning.d.cts +2 -1
  25. package/dist/positioning.d.ts +2 -1
  26. package/dist/positioning.js +2 -2
  27. package/dist/rinex.cjs +304 -11
  28. package/dist/rinex.d.cts +45 -3
  29. package/dist/rinex.d.ts +45 -3
  30. package/dist/rinex.js +6 -1
  31. package/dist/sbf.cjs +908 -11
  32. package/dist/sbf.d.cts +114 -137
  33. package/dist/sbf.d.ts +114 -137
  34. package/dist/sbf.js +8 -3
  35. package/dist/ubx.d.cts +1 -2
  36. package/dist/ubx.d.ts +1 -2
  37. package/dist/ubx.js +2 -3
  38. package/package.json +1 -1
  39. package/dist/chunk-IQ5OIMQD.js +0 -148
  40. package/dist/cnav-CRns0ECn.d.cts +0 -96
  41. package/dist/cnav-CRns0ECn.d.ts +0 -96
  42. package/dist/nav-BAI1a9vK.d.cts +0 -108
  43. package/dist/nav-BAI1a9vK.d.ts +0 -108
package/dist/sbf.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as Ephemeris } from './nav-BAI1a9vK.cjs';
2
- import { C as CnavEphemeris } from './cnav-CRns0ECn.cjs';
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
+ import { C as CnavEphemeris, K as KeplerEphemeris, G as GlonassEphemeris } from './nav-DImXUdbp.cjs';
3
3
 
4
4
  /**
5
5
  * Septentrio SBF framing shared by the measurement and navigation
@@ -18,140 +18,6 @@ declare function crc16(data: Uint8Array, start: number, end: number): number;
18
18
  */
19
19
  declare function scanSbfFrames(data: Uint8Array, view: DataView, onBlock: (id: number, offset: number, len: number) => void): number;
20
20
 
21
- /**
22
- * Septentrio SBF decoded navigation and almanac blocks.
23
- *
24
- * Nav blocks (GPSNav 5891, GLONav 4004, GALNav 4002, BDSNav 4081,
25
- * QZSNav 4095) carry the fully decoded broadcast ephemeris; they are
26
- * mapped onto the same `Ephemeris` union the RINEX nav parser produces,
27
- * with identical units and conventions (sqrtA in m^1/2, angles in rad,
28
- * semicircle fields scaled by π, GLONASS tauN with the RINEX sign, BDS
29
- * epochs/weeks on the BDT scale like a RINEX file).
30
- *
31
- * Almanac blocks (GPSAlm 5892, GALAlm 4003, GLOAlm 4005, BDSAlm 4119)
32
- * are decoded into dedicated types with all per-system relative fields
33
- * (GPS/BDS δi, Galileo δi and ΔsqrtA) normalized to absolute values.
34
- *
35
- * Ported from RTKLIB demo5 (rtklibexplorer), src/rcv/septentrio.c
36
- * (decode_gpsnav / decode_glonav / decode_galnav / decode_cmpnav /
37
- * decode_qzssnav / decode_gpsalm / decode_galalm / decode_cmpalm),
38
- * BSD-2-Clause, and cross-checked field by field against the Septentrio
39
- * mosaic-X5 reference guide, which also supplies the GLOAlm layout
40
- * (not decoded by RTKLIB).
41
- */
42
-
43
- interface SbfNavResult {
44
- ephemerides: Ephemeris[];
45
- /** Frames whose CRC failed (corruption indicator). */
46
- badCrc: number;
47
- }
48
- /**
49
- * Decode every GPSNav/GLONav/GALNav/BDSNav/QZSNav block in an SBF byte
50
- * stream into the RINEX-parser `Ephemeris` union. Every block is
51
- * emitted (no issue-of-data dedup); other block types are skipped.
52
- */
53
- declare function parseSbfNav(data: Uint8Array): SbfNavResult;
54
- /**
55
- * GPS / Galileo / BeiDou almanac, normalized to ABSOLUTE Keplerian
56
- * elements (units matching `KeplerEphemeris`: sqrtA in m^1/2, angles
57
- * in rad, rates in rad/s) so a Kepler propagator can consume the
58
- * record directly with all correction terms at zero.
59
- *
60
- * Normalizations applied per system:
61
- * - GPS (`G`): the SIS δi (relative to 0.3 semicircles) is folded in —
62
- * `i0OrDeltaI` = 0.3π + δi·π. `weekAlm` is the full GPS week
63
- * (8-bit SIS week disambiguated against the receiver week).
64
- * - Galileo (`E`): the SIS ΔsqrtA (relative to √29 600 000 m^1/2) and
65
- * δi (relative to 56°) are folded in — `sqrtA` and `i0OrDeltaI` are
66
- * absolute. `weekAlm` is the full GPS-aligned week (2-bit SIS week
67
- * disambiguated). `health` is the raw SBF bit field: bit 0 set ⇒
68
- * bits 1-2 are the L1-B HS, bit 3 set ⇒ bits 4-5 E5b HS, bit 6 set
69
- * ⇒ bits 7-8 E5a HS (0 = healthy).
70
- * - BeiDou (`C`): δi is relative to 0.3 semicircles for MEO/IGSO and
71
- * to 0 for GEO satellites (PRN 1-5 and 59-63) per the BDS ICD; the
72
- * reference is folded in. `weekAlm` is the full BDS week (add 1356
73
- * for the GPS week) and `toaSec` is BDT seconds of week
74
- * (BDT = GPST − 14 s). `health` is the 9-bit SIS health word.
75
- */
76
- interface SbfKeplerAlmanac {
77
- system: 'G' | 'E' | 'C';
78
- /** Satellite PRN, e.g. "G14". */
79
- prn: string;
80
- /** Full almanac reference week (see per-system notes above). */
81
- weekAlm: number;
82
- /** Almanac reference time of week in seconds (system time scale). */
83
- toaSec: number;
84
- /** Square root of semi-major axis in m^(1/2), absolute. */
85
- sqrtA: number;
86
- /** Eccentricity (dimensionless). */
87
- e: number;
88
- /** Inclination at reference time in rad, absolute (normalized). */
89
- i0OrDeltaI: number;
90
- /** Longitude of ascending node at the weekly epoch in rad. */
91
- omega0: number;
92
- /** Argument of perigee in rad. */
93
- omega: number;
94
- /** Mean anomaly at reference time in rad. */
95
- m0: number;
96
- /** Rate of right ascension in rad/s. */
97
- omegaDot: number;
98
- /** SV clock bias in seconds. */
99
- af0: number;
100
- /** SV clock drift in s/s. */
101
- af1: number;
102
- /** Health word, 0 = healthy (see per-system notes above). */
103
- health: number;
104
- }
105
- /**
106
- * GLONASS almanac (GLONASS ICD orbital parameters). Semicircle fields
107
- * are converted to radians; everything else keeps the ICD units.
108
- */
109
- interface SbfGlonassAlmanac {
110
- system: 'R';
111
- /** Satellite slot, e.g. "R05". */
112
- prn: string;
113
- /** Frequency channel number HnA (−7…+6). */
114
- freqNr: number;
115
- /** Full GPS week of the almanac reference time. */
116
- weekAlm: number;
117
- /** Almanac reference time of week in seconds, GPS time frame. */
118
- toaSec: number;
119
- /** εnA: orbit eccentricity. */
120
- epsilon: number;
121
- /** λnA: longitude of first ascending node in rad. */
122
- lambda: number;
123
- /** tλnA: time of first ascending node passage in s of day. */
124
- tLambda: number;
125
- /** ΔinA: inclination correction to 63° in rad. */
126
- deltaI: number;
127
- /** ωnA: argument of perigee in rad. */
128
- omega: number;
129
- /** ΔTnA: correction to the mean Draconian period (s / orbit). */
130
- deltaT: number;
131
- /** dΔTnA: rate of change of ΔT (s / orbit²). */
132
- deltaTDot: number;
133
- /** τnA: coarse satellite clock correction in s. */
134
- tau: number;
135
- /** CnA general health flag: 1 = healthy. */
136
- health: number;
137
- /** NA: calendar day number within the 4-year period. */
138
- nDay: number;
139
- /** N4: 4-year interval number since 1996. */
140
- n4: number;
141
- }
142
- type SbfAlmanac = SbfKeplerAlmanac | SbfGlonassAlmanac;
143
- interface SbfAlmanacResult {
144
- almanacs: SbfAlmanac[];
145
- /** Frames whose CRC failed (corruption indicator). */
146
- badCrc: number;
147
- }
148
- /**
149
- * Decode every GPSAlm/GALAlm/GLOAlm/BDSAlm block in an SBF byte
150
- * stream. Every block is emitted in stream order; other block types
151
- * are skipped.
152
- */
153
- declare function parseSbfAlmanac(data: Uint8Array): SbfAlmanacResult;
154
-
155
21
  /**
156
22
  * Septentrio SBF decoded ionosphere / UTC blocks.
157
23
  *
@@ -232,6 +98,117 @@ interface SbfCnavResult {
232
98
  */
233
99
  declare function parseSbfCnav(data: Uint8Array): SbfCnavResult;
234
100
 
101
+ /**
102
+ * Septentrio SBF raw Galileo navigation-page blocks: GALRawINAV (4023)
103
+ * carries one I/NAV nominal page pair (234 bits: the 114-bit even part
104
+ * — tail removed — concatenated with the 120-bit odd part) and
105
+ * GALRawFNAV (4022) one 244-bit F/NAV page (sync stripped).
106
+ *
107
+ * Block layout (mosaic-X5 reference guide §4): after the 8-byte SBF
108
+ * header, TOW u4 + WNc u2, SVID u1, CRCPassed u1, ViterbiCnt u1,
109
+ * Source u1 (bits 0-4: signal type per §4.1.10; INAV bit 5: even/odd
110
+ * parts from different carriers), FreqNr u1, RxChannel u1, then
111
+ * NAVBits as u4[8] — the first received bit is the MSB of NAVBits[0]
112
+ * (each u4 little-endian in the stream, page bits MSB-first within
113
+ * the word), the unused bits of NAVBits[7] to be ignored. Mirrors
114
+ * RTKLIB demo5's decode_galrawinav / decode_galrawfnav
115
+ * (src/rcv/septentrio.c), with the word/page assembly and field
116
+ * decoding in `src/navbits/gal.ts`.
117
+ *
118
+ * The receiver's own CRCPassed flag is ignored in favor of re-running
119
+ * CRC-24Q on the transported bits, so `badCrc` counts exactly the
120
+ * pages this library rejected.
121
+ */
122
+
123
+ /**
124
+ * A Galileo ephemeris tagged with the message type it was decoded
125
+ * from — the same I/NAV / F/NAV data-source distinction RTKLIB keeps
126
+ * in per-set ephemeris slots (and `parseNovatelNav` in its
127
+ * "E##:inav"/"E##:fnav" dedup keys): the two sets share the orbit but
128
+ * carry different clock sets (E1B/E5b vs E1B/E5a).
129
+ */
130
+ interface SbfGalEphemeris extends KeplerEphemeris {
131
+ source: 'inav' | 'fnav';
132
+ }
133
+ interface SbfGalNavResult {
134
+ /** Assembled ephemerides in stream order, repeats suppressed. */
135
+ ephemerides: SbfGalEphemeris[];
136
+ /** Raw pages whose CRC-24Q check failed (dropped). */
137
+ badCrc: number;
138
+ /** Total GALRawINAV/GALRawFNAV blocks seen (with valid SBF framing). */
139
+ messages: number;
140
+ }
141
+ /**
142
+ * Decode every GALRawINAV/GALRawFNAV block in an SBF byte stream and
143
+ * assemble the carried pages into ephemerides — I/NAV and F/NAV
144
+ * independently (one assembler each), so a data set complete on both
145
+ * message types yields one record per type; each record's `source`
146
+ * property names its message type.
147
+ */
148
+ declare function parseSbfGalNav(data: Uint8Array): SbfGalNavResult;
149
+
150
+ /**
151
+ * Septentrio SBF raw BeiDou / GLONASS navigation-bit blocks: BDSRaw
152
+ * (4047) carries one 300-bit BeiDou D1/D2 subframe (de-interleaved,
153
+ * parity bits in place, from B1I/B2I/B3I), GLORawCA (4026) one 85-bit
154
+ * GLONASS L1 or L2 C/A navigation string (everything but the time
155
+ * mark).
156
+ *
157
+ * Block layout (mosaic-X5 reference guide §4): after the 8-byte SBF
158
+ * header, TOW u4 + WNc u2, SVID u1, CRCPassed u1, ViterbiCnt u1,
159
+ * Source u1, then FreqNr u1 (GLORawCA) / Reserved u1 (BDSRaw),
160
+ * RxChannel u1, and NAVBits as u4[10] (BDSRaw) / u4[3] (GLORawCA) —
161
+ * the first received bit is the MSB of NAVBits[0], trailing unused
162
+ * bits of the last word to be ignored. RTKLIB demo5 routes the same
163
+ * blocks through decode_cmpraw / decode_glorawcanav
164
+ * (src/rcv/septentrio.c) into decode_bds_d1/d2 / decode_glostr; the
165
+ * frame decoding here is src/navbits/bds.ts and src/navbits/glo.ts.
166
+ *
167
+ * The receiver's own CRCPassed flag is ignored in favor of re-running
168
+ * the BCH(15,11,1) word parity (BDS) / Hamming KX (GLONASS) checks on
169
+ * the transported bits, so `badCrc` counts exactly the messages this
170
+ * library rejected (RTKLIB trusts the flag and checks nothing).
171
+ */
172
+
173
+ interface SbfBdsNavResult {
174
+ /** Assembled BDS D1/D2 ephemerides in stream order, repeats suppressed. */
175
+ ephemerides: KeplerEphemeris[];
176
+ /** Subframes whose BCH(15,11,1) word parity failed (dropped). */
177
+ badCrc: number;
178
+ /** Total BDSRaw blocks seen (with valid SBF framing). */
179
+ messages: number;
180
+ }
181
+ /**
182
+ * Decode every BDSRaw (4047) block in an SBF byte stream and assemble
183
+ * the carried D1/D2 subframes into ephemerides (`system: 'C'`, BDT
184
+ * epochs/weeks, like `parseSbfNav`'s BDSNav records). GEO satellites
185
+ * (PRN 1-5, 59-63) are decoded as D2, MEO/IGSO as D1. Subframes from
186
+ * B1I/B2I/B3I carry the same message and share one assembler per
187
+ * satellite, as in RTKLIB.
188
+ */
189
+ declare function parseSbfBdsNav(data: Uint8Array): SbfBdsNavResult;
190
+ interface SbfGloNavResult {
191
+ /** Assembled GLONASS ephemerides in stream order, repeats suppressed. */
192
+ ephemerides: GlonassEphemeris[];
193
+ /** Strings whose Hamming (KX) check failed (dropped). */
194
+ badCrc: number;
195
+ /** Total GLORawCA blocks seen (with valid SBF framing). */
196
+ messages: number;
197
+ }
198
+ /**
199
+ * Decode every GLORawCA (4026) block in an SBF byte stream and
200
+ * assemble the carried navigation strings into ephemerides (same
201
+ * conventions as `parseSbfNav`'s GLONav records: UTC `tocDate`, RINEX
202
+ * `tauN` sign, km state vectors, `messageFrameTime` in seconds of the
203
+ * UTC week — here from the broadcast tk, see the oracle notes in
204
+ * test/bdsglo-raw.test.ts). The block's TOW/WNc time stamp resolves
205
+ * the GLONASS day; blocks without one (do-not-use) are skipped, as
206
+ * are SVID-62 blocks (GLONASS satellite with unknown slot number).
207
+ * L1 C/A and L2 C/A strings are identical and share one assembler
208
+ * per slot, as in RTKLIB.
209
+ */
210
+ declare function parseSbfGloNav(data: Uint8Array): SbfGloNavResult;
211
+
235
212
  /**
236
213
  * Septentrio SBF raw-measurement decoding (MeasEpoch + Meas3) — the
237
214
  * path from a receiver log to RINEX-grade observables.
@@ -295,4 +272,4 @@ interface SbfParseResult {
295
272
  */
296
273
  declare function parseSbfMeas(data: Uint8Array): SbfParseResult;
297
274
 
298
- export { CnavEphemeris, type SbfAlmanac, type SbfAlmanacResult, type SbfCnavEphemeris, type SbfCnavResult, type SbfGlonassAlmanac, type SbfIonoUtcResult, type SbfKeplerAlmanac, type SbfMeasEpoch, type SbfMeasurement, type SbfNavResult, type SbfParseResult, parseSbfAlmanac, parseSbfCnav, parseSbfIonoUtc, parseSbfMeas, parseSbfNav, crc16 as sbfCrc16, scanSbfFrames };
275
+ export { CnavEphemeris, type SbfBdsNavResult, type SbfCnavEphemeris, type SbfCnavResult, type SbfGalEphemeris, type SbfGalNavResult, type SbfGloNavResult, type SbfIonoUtcResult, type SbfMeasEpoch, type SbfMeasurement, type SbfParseResult, parseSbfBdsNav, parseSbfCnav, parseSbfGalNav, parseSbfGloNav, parseSbfIonoUtc, parseSbfMeas, crc16 as sbfCrc16, scanSbfFrames };
package/dist/sbf.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as Ephemeris } from './nav-BAI1a9vK.js';
2
- import { C as CnavEphemeris } from './cnav-CRns0ECn.js';
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-CN8rxL4h.js';
2
+ import { C as CnavEphemeris, K as KeplerEphemeris, G as GlonassEphemeris } from './nav-DImXUdbp.js';
3
3
 
4
4
  /**
5
5
  * Septentrio SBF framing shared by the measurement and navigation
@@ -18,140 +18,6 @@ declare function crc16(data: Uint8Array, start: number, end: number): number;
18
18
  */
19
19
  declare function scanSbfFrames(data: Uint8Array, view: DataView, onBlock: (id: number, offset: number, len: number) => void): number;
20
20
 
21
- /**
22
- * Septentrio SBF decoded navigation and almanac blocks.
23
- *
24
- * Nav blocks (GPSNav 5891, GLONav 4004, GALNav 4002, BDSNav 4081,
25
- * QZSNav 4095) carry the fully decoded broadcast ephemeris; they are
26
- * mapped onto the same `Ephemeris` union the RINEX nav parser produces,
27
- * with identical units and conventions (sqrtA in m^1/2, angles in rad,
28
- * semicircle fields scaled by π, GLONASS tauN with the RINEX sign, BDS
29
- * epochs/weeks on the BDT scale like a RINEX file).
30
- *
31
- * Almanac blocks (GPSAlm 5892, GALAlm 4003, GLOAlm 4005, BDSAlm 4119)
32
- * are decoded into dedicated types with all per-system relative fields
33
- * (GPS/BDS δi, Galileo δi and ΔsqrtA) normalized to absolute values.
34
- *
35
- * Ported from RTKLIB demo5 (rtklibexplorer), src/rcv/septentrio.c
36
- * (decode_gpsnav / decode_glonav / decode_galnav / decode_cmpnav /
37
- * decode_qzssnav / decode_gpsalm / decode_galalm / decode_cmpalm),
38
- * BSD-2-Clause, and cross-checked field by field against the Septentrio
39
- * mosaic-X5 reference guide, which also supplies the GLOAlm layout
40
- * (not decoded by RTKLIB).
41
- */
42
-
43
- interface SbfNavResult {
44
- ephemerides: Ephemeris[];
45
- /** Frames whose CRC failed (corruption indicator). */
46
- badCrc: number;
47
- }
48
- /**
49
- * Decode every GPSNav/GLONav/GALNav/BDSNav/QZSNav block in an SBF byte
50
- * stream into the RINEX-parser `Ephemeris` union. Every block is
51
- * emitted (no issue-of-data dedup); other block types are skipped.
52
- */
53
- declare function parseSbfNav(data: Uint8Array): SbfNavResult;
54
- /**
55
- * GPS / Galileo / BeiDou almanac, normalized to ABSOLUTE Keplerian
56
- * elements (units matching `KeplerEphemeris`: sqrtA in m^1/2, angles
57
- * in rad, rates in rad/s) so a Kepler propagator can consume the
58
- * record directly with all correction terms at zero.
59
- *
60
- * Normalizations applied per system:
61
- * - GPS (`G`): the SIS δi (relative to 0.3 semicircles) is folded in —
62
- * `i0OrDeltaI` = 0.3π + δi·π. `weekAlm` is the full GPS week
63
- * (8-bit SIS week disambiguated against the receiver week).
64
- * - Galileo (`E`): the SIS ΔsqrtA (relative to √29 600 000 m^1/2) and
65
- * δi (relative to 56°) are folded in — `sqrtA` and `i0OrDeltaI` are
66
- * absolute. `weekAlm` is the full GPS-aligned week (2-bit SIS week
67
- * disambiguated). `health` is the raw SBF bit field: bit 0 set ⇒
68
- * bits 1-2 are the L1-B HS, bit 3 set ⇒ bits 4-5 E5b HS, bit 6 set
69
- * ⇒ bits 7-8 E5a HS (0 = healthy).
70
- * - BeiDou (`C`): δi is relative to 0.3 semicircles for MEO/IGSO and
71
- * to 0 for GEO satellites (PRN 1-5 and 59-63) per the BDS ICD; the
72
- * reference is folded in. `weekAlm` is the full BDS week (add 1356
73
- * for the GPS week) and `toaSec` is BDT seconds of week
74
- * (BDT = GPST − 14 s). `health` is the 9-bit SIS health word.
75
- */
76
- interface SbfKeplerAlmanac {
77
- system: 'G' | 'E' | 'C';
78
- /** Satellite PRN, e.g. "G14". */
79
- prn: string;
80
- /** Full almanac reference week (see per-system notes above). */
81
- weekAlm: number;
82
- /** Almanac reference time of week in seconds (system time scale). */
83
- toaSec: number;
84
- /** Square root of semi-major axis in m^(1/2), absolute. */
85
- sqrtA: number;
86
- /** Eccentricity (dimensionless). */
87
- e: number;
88
- /** Inclination at reference time in rad, absolute (normalized). */
89
- i0OrDeltaI: number;
90
- /** Longitude of ascending node at the weekly epoch in rad. */
91
- omega0: number;
92
- /** Argument of perigee in rad. */
93
- omega: number;
94
- /** Mean anomaly at reference time in rad. */
95
- m0: number;
96
- /** Rate of right ascension in rad/s. */
97
- omegaDot: number;
98
- /** SV clock bias in seconds. */
99
- af0: number;
100
- /** SV clock drift in s/s. */
101
- af1: number;
102
- /** Health word, 0 = healthy (see per-system notes above). */
103
- health: number;
104
- }
105
- /**
106
- * GLONASS almanac (GLONASS ICD orbital parameters). Semicircle fields
107
- * are converted to radians; everything else keeps the ICD units.
108
- */
109
- interface SbfGlonassAlmanac {
110
- system: 'R';
111
- /** Satellite slot, e.g. "R05". */
112
- prn: string;
113
- /** Frequency channel number HnA (−7…+6). */
114
- freqNr: number;
115
- /** Full GPS week of the almanac reference time. */
116
- weekAlm: number;
117
- /** Almanac reference time of week in seconds, GPS time frame. */
118
- toaSec: number;
119
- /** εnA: orbit eccentricity. */
120
- epsilon: number;
121
- /** λnA: longitude of first ascending node in rad. */
122
- lambda: number;
123
- /** tλnA: time of first ascending node passage in s of day. */
124
- tLambda: number;
125
- /** ΔinA: inclination correction to 63° in rad. */
126
- deltaI: number;
127
- /** ωnA: argument of perigee in rad. */
128
- omega: number;
129
- /** ΔTnA: correction to the mean Draconian period (s / orbit). */
130
- deltaT: number;
131
- /** dΔTnA: rate of change of ΔT (s / orbit²). */
132
- deltaTDot: number;
133
- /** τnA: coarse satellite clock correction in s. */
134
- tau: number;
135
- /** CnA general health flag: 1 = healthy. */
136
- health: number;
137
- /** NA: calendar day number within the 4-year period. */
138
- nDay: number;
139
- /** N4: 4-year interval number since 1996. */
140
- n4: number;
141
- }
142
- type SbfAlmanac = SbfKeplerAlmanac | SbfGlonassAlmanac;
143
- interface SbfAlmanacResult {
144
- almanacs: SbfAlmanac[];
145
- /** Frames whose CRC failed (corruption indicator). */
146
- badCrc: number;
147
- }
148
- /**
149
- * Decode every GPSAlm/GALAlm/GLOAlm/BDSAlm block in an SBF byte
150
- * stream. Every block is emitted in stream order; other block types
151
- * are skipped.
152
- */
153
- declare function parseSbfAlmanac(data: Uint8Array): SbfAlmanacResult;
154
-
155
21
  /**
156
22
  * Septentrio SBF decoded ionosphere / UTC blocks.
157
23
  *
@@ -232,6 +98,117 @@ interface SbfCnavResult {
232
98
  */
233
99
  declare function parseSbfCnav(data: Uint8Array): SbfCnavResult;
234
100
 
101
+ /**
102
+ * Septentrio SBF raw Galileo navigation-page blocks: GALRawINAV (4023)
103
+ * carries one I/NAV nominal page pair (234 bits: the 114-bit even part
104
+ * — tail removed — concatenated with the 120-bit odd part) and
105
+ * GALRawFNAV (4022) one 244-bit F/NAV page (sync stripped).
106
+ *
107
+ * Block layout (mosaic-X5 reference guide §4): after the 8-byte SBF
108
+ * header, TOW u4 + WNc u2, SVID u1, CRCPassed u1, ViterbiCnt u1,
109
+ * Source u1 (bits 0-4: signal type per §4.1.10; INAV bit 5: even/odd
110
+ * parts from different carriers), FreqNr u1, RxChannel u1, then
111
+ * NAVBits as u4[8] — the first received bit is the MSB of NAVBits[0]
112
+ * (each u4 little-endian in the stream, page bits MSB-first within
113
+ * the word), the unused bits of NAVBits[7] to be ignored. Mirrors
114
+ * RTKLIB demo5's decode_galrawinav / decode_galrawfnav
115
+ * (src/rcv/septentrio.c), with the word/page assembly and field
116
+ * decoding in `src/navbits/gal.ts`.
117
+ *
118
+ * The receiver's own CRCPassed flag is ignored in favor of re-running
119
+ * CRC-24Q on the transported bits, so `badCrc` counts exactly the
120
+ * pages this library rejected.
121
+ */
122
+
123
+ /**
124
+ * A Galileo ephemeris tagged with the message type it was decoded
125
+ * from — the same I/NAV / F/NAV data-source distinction RTKLIB keeps
126
+ * in per-set ephemeris slots (and `parseNovatelNav` in its
127
+ * "E##:inav"/"E##:fnav" dedup keys): the two sets share the orbit but
128
+ * carry different clock sets (E1B/E5b vs E1B/E5a).
129
+ */
130
+ interface SbfGalEphemeris extends KeplerEphemeris {
131
+ source: 'inav' | 'fnav';
132
+ }
133
+ interface SbfGalNavResult {
134
+ /** Assembled ephemerides in stream order, repeats suppressed. */
135
+ ephemerides: SbfGalEphemeris[];
136
+ /** Raw pages whose CRC-24Q check failed (dropped). */
137
+ badCrc: number;
138
+ /** Total GALRawINAV/GALRawFNAV blocks seen (with valid SBF framing). */
139
+ messages: number;
140
+ }
141
+ /**
142
+ * Decode every GALRawINAV/GALRawFNAV block in an SBF byte stream and
143
+ * assemble the carried pages into ephemerides — I/NAV and F/NAV
144
+ * independently (one assembler each), so a data set complete on both
145
+ * message types yields one record per type; each record's `source`
146
+ * property names its message type.
147
+ */
148
+ declare function parseSbfGalNav(data: Uint8Array): SbfGalNavResult;
149
+
150
+ /**
151
+ * Septentrio SBF raw BeiDou / GLONASS navigation-bit blocks: BDSRaw
152
+ * (4047) carries one 300-bit BeiDou D1/D2 subframe (de-interleaved,
153
+ * parity bits in place, from B1I/B2I/B3I), GLORawCA (4026) one 85-bit
154
+ * GLONASS L1 or L2 C/A navigation string (everything but the time
155
+ * mark).
156
+ *
157
+ * Block layout (mosaic-X5 reference guide §4): after the 8-byte SBF
158
+ * header, TOW u4 + WNc u2, SVID u1, CRCPassed u1, ViterbiCnt u1,
159
+ * Source u1, then FreqNr u1 (GLORawCA) / Reserved u1 (BDSRaw),
160
+ * RxChannel u1, and NAVBits as u4[10] (BDSRaw) / u4[3] (GLORawCA) —
161
+ * the first received bit is the MSB of NAVBits[0], trailing unused
162
+ * bits of the last word to be ignored. RTKLIB demo5 routes the same
163
+ * blocks through decode_cmpraw / decode_glorawcanav
164
+ * (src/rcv/septentrio.c) into decode_bds_d1/d2 / decode_glostr; the
165
+ * frame decoding here is src/navbits/bds.ts and src/navbits/glo.ts.
166
+ *
167
+ * The receiver's own CRCPassed flag is ignored in favor of re-running
168
+ * the BCH(15,11,1) word parity (BDS) / Hamming KX (GLONASS) checks on
169
+ * the transported bits, so `badCrc` counts exactly the messages this
170
+ * library rejected (RTKLIB trusts the flag and checks nothing).
171
+ */
172
+
173
+ interface SbfBdsNavResult {
174
+ /** Assembled BDS D1/D2 ephemerides in stream order, repeats suppressed. */
175
+ ephemerides: KeplerEphemeris[];
176
+ /** Subframes whose BCH(15,11,1) word parity failed (dropped). */
177
+ badCrc: number;
178
+ /** Total BDSRaw blocks seen (with valid SBF framing). */
179
+ messages: number;
180
+ }
181
+ /**
182
+ * Decode every BDSRaw (4047) block in an SBF byte stream and assemble
183
+ * the carried D1/D2 subframes into ephemerides (`system: 'C'`, BDT
184
+ * epochs/weeks, like `parseSbfNav`'s BDSNav records). GEO satellites
185
+ * (PRN 1-5, 59-63) are decoded as D2, MEO/IGSO as D1. Subframes from
186
+ * B1I/B2I/B3I carry the same message and share one assembler per
187
+ * satellite, as in RTKLIB.
188
+ */
189
+ declare function parseSbfBdsNav(data: Uint8Array): SbfBdsNavResult;
190
+ interface SbfGloNavResult {
191
+ /** Assembled GLONASS ephemerides in stream order, repeats suppressed. */
192
+ ephemerides: GlonassEphemeris[];
193
+ /** Strings whose Hamming (KX) check failed (dropped). */
194
+ badCrc: number;
195
+ /** Total GLORawCA blocks seen (with valid SBF framing). */
196
+ messages: number;
197
+ }
198
+ /**
199
+ * Decode every GLORawCA (4026) block in an SBF byte stream and
200
+ * assemble the carried navigation strings into ephemerides (same
201
+ * conventions as `parseSbfNav`'s GLONav records: UTC `tocDate`, RINEX
202
+ * `tauN` sign, km state vectors, `messageFrameTime` in seconds of the
203
+ * UTC week — here from the broadcast tk, see the oracle notes in
204
+ * test/bdsglo-raw.test.ts). The block's TOW/WNc time stamp resolves
205
+ * the GLONASS day; blocks without one (do-not-use) are skipped, as
206
+ * are SVID-62 blocks (GLONASS satellite with unknown slot number).
207
+ * L1 C/A and L2 C/A strings are identical and share one assembler
208
+ * per slot, as in RTKLIB.
209
+ */
210
+ declare function parseSbfGloNav(data: Uint8Array): SbfGloNavResult;
211
+
235
212
  /**
236
213
  * Septentrio SBF raw-measurement decoding (MeasEpoch + Meas3) — the
237
214
  * path from a receiver log to RINEX-grade observables.
@@ -295,4 +272,4 @@ interface SbfParseResult {
295
272
  */
296
273
  declare function parseSbfMeas(data: Uint8Array): SbfParseResult;
297
274
 
298
- export { CnavEphemeris, type SbfAlmanac, type SbfAlmanacResult, type SbfCnavEphemeris, type SbfCnavResult, type SbfGlonassAlmanac, type SbfIonoUtcResult, type SbfKeplerAlmanac, type SbfMeasEpoch, type SbfMeasurement, type SbfNavResult, type SbfParseResult, parseSbfAlmanac, parseSbfCnav, parseSbfIonoUtc, parseSbfMeas, parseSbfNav, crc16 as sbfCrc16, scanSbfFrames };
275
+ export { CnavEphemeris, type SbfBdsNavResult, type SbfCnavEphemeris, type SbfCnavResult, type SbfGalEphemeris, type SbfGalNavResult, type SbfGloNavResult, type SbfIonoUtcResult, type SbfMeasEpoch, type SbfMeasurement, type SbfParseResult, parseSbfBdsNav, parseSbfCnav, parseSbfGalNav, parseSbfGloNav, parseSbfIonoUtc, parseSbfMeas, crc16 as sbfCrc16, scanSbfFrames };
package/dist/sbf.js CHANGED
@@ -1,19 +1,24 @@
1
1
  import {
2
2
  crc16,
3
3
  parseSbfAlmanac,
4
+ parseSbfBdsNav,
4
5
  parseSbfCnav,
6
+ parseSbfGalNav,
7
+ parseSbfGloNav,
5
8
  parseSbfIonoUtc,
6
9
  parseSbfMeas,
7
10
  parseSbfNav,
8
11
  scanSbfFrames
9
- } from "./chunk-CG7SF45F.js";
10
- import "./chunk-Y5IWUPJQ.js";
11
- import "./chunk-IQ5OIMQD.js";
12
+ } from "./chunk-VJEPOC76.js";
13
+ import "./chunk-WZDFZ76K.js";
12
14
  import "./chunk-HVXYFUCB.js";
13
15
  import "./chunk-LEEU5OIO.js";
14
16
  export {
15
17
  parseSbfAlmanac,
18
+ parseSbfBdsNav,
16
19
  parseSbfCnav,
20
+ parseSbfGalNav,
21
+ parseSbfGloNav,
17
22
  parseSbfIonoUtc,
18
23
  parseSbfMeas,
19
24
  parseSbfNav,
package/dist/ubx.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import { E as Ephemeris } from './nav-BAI1a9vK.cjs';
2
- import { C as CnavEphemeris } from './cnav-CRns0ECn.cjs';
1
+ import { E as Ephemeris, C as CnavEphemeris } from './nav-DImXUdbp.cjs';
3
2
 
4
3
  /**
5
4
  * u-blox UBX framing shared by the measurement and navigation decoders:
package/dist/ubx.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { E as Ephemeris } from './nav-BAI1a9vK.js';
2
- import { C as CnavEphemeris } from './cnav-CRns0ECn.js';
1
+ import { E as Ephemeris, C as CnavEphemeris } from './nav-DImXUdbp.js';
3
2
 
4
3
  /**
5
4
  * u-blox UBX framing shared by the measurement and navigation decoders:
package/dist/ubx.js CHANGED
@@ -4,9 +4,8 @@ import {
4
4
  parseUbxNav,
5
5
  parseUbxRawx,
6
6
  ubxFrames
7
- } from "./chunk-FEGLXNWA.js";
8
- import "./chunk-Y5IWUPJQ.js";
9
- import "./chunk-IQ5OIMQD.js";
7
+ } from "./chunk-DLXTTHRK.js";
8
+ import "./chunk-WZDFZ76K.js";
10
9
  export {
11
10
  parseUbxCnav,
12
11
  parseUbxIonoUtc,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.18.0",
3
+ "version": "1.20.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,