gnss-js 1.19.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.
- package/dist/{chunk-2IM5VXNI.js → chunk-7RKLWE6R.js} +23 -2
- package/dist/{chunk-QXZZNXE3.js → chunk-B5LU4746.js} +1 -1
- package/dist/{chunk-JW2ICDR7.js → chunk-DLXTTHRK.js} +2 -4
- package/dist/{chunk-OMVL3X7V.js → chunk-JNFV5BYB.js} +186 -8
- package/dist/{chunk-K73SERD5.js → chunk-NOQAAUGY.js} +2 -4
- package/dist/{chunk-5S5HMAKW.js → chunk-VJEPOC76.js} +908 -14
- package/dist/{chunk-6NCMACDO.js → chunk-WZDFZ76K.js} +149 -8
- package/dist/index.cjs +1150 -57
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +21 -8
- package/dist/nav-BYmYoh9A.d.cts +137 -0
- package/dist/nav-CN8rxL4h.d.ts +137 -0
- package/dist/novatel.cjs +230 -15
- package/dist/novatel.d.cts +8 -1
- package/dist/novatel.d.ts +8 -1
- package/dist/novatel.js +2 -2
- package/dist/orbit.cjs +190 -8
- package/dist/orbit.d.cts +90 -1
- package/dist/orbit.d.ts +90 -1
- package/dist/orbit.js +9 -1
- package/dist/positioning.d.cts +1 -0
- package/dist/positioning.d.ts +1 -0
- package/dist/positioning.js +2 -2
- package/dist/rinex.js +2 -3
- package/dist/sbf.cjs +908 -11
- package/dist/sbf.d.cts +114 -136
- package/dist/sbf.d.ts +114 -136
- package/dist/sbf.js +8 -3
- package/dist/ubx.js +2 -3
- package/package.json +1 -1
- package/dist/chunk-IQ5OIMQD.js +0 -148
package/dist/sbf.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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
|
+
import { C as CnavEphemeris, K as KeplerEphemeris, G as GlonassEphemeris } from './nav-DImXUdbp.cjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Septentrio SBF framing shared by the measurement and navigation
|
|
@@ -17,140 +18,6 @@ declare function crc16(data: Uint8Array, start: number, end: number): number;
|
|
|
17
18
|
*/
|
|
18
19
|
declare function scanSbfFrames(data: Uint8Array, view: DataView, onBlock: (id: number, offset: number, len: number) => void): number;
|
|
19
20
|
|
|
20
|
-
/**
|
|
21
|
-
* Septentrio SBF decoded navigation and almanac blocks.
|
|
22
|
-
*
|
|
23
|
-
* Nav blocks (GPSNav 5891, GLONav 4004, GALNav 4002, BDSNav 4081,
|
|
24
|
-
* QZSNav 4095) carry the fully decoded broadcast ephemeris; they are
|
|
25
|
-
* mapped onto the same `Ephemeris` union the RINEX nav parser produces,
|
|
26
|
-
* with identical units and conventions (sqrtA in m^1/2, angles in rad,
|
|
27
|
-
* semicircle fields scaled by π, GLONASS tauN with the RINEX sign, BDS
|
|
28
|
-
* epochs/weeks on the BDT scale like a RINEX file).
|
|
29
|
-
*
|
|
30
|
-
* Almanac blocks (GPSAlm 5892, GALAlm 4003, GLOAlm 4005, BDSAlm 4119)
|
|
31
|
-
* are decoded into dedicated types with all per-system relative fields
|
|
32
|
-
* (GPS/BDS δi, Galileo δi and ΔsqrtA) normalized to absolute values.
|
|
33
|
-
*
|
|
34
|
-
* Ported from RTKLIB demo5 (rtklibexplorer), src/rcv/septentrio.c
|
|
35
|
-
* (decode_gpsnav / decode_glonav / decode_galnav / decode_cmpnav /
|
|
36
|
-
* decode_qzssnav / decode_gpsalm / decode_galalm / decode_cmpalm),
|
|
37
|
-
* BSD-2-Clause, and cross-checked field by field against the Septentrio
|
|
38
|
-
* mosaic-X5 reference guide, which also supplies the GLOAlm layout
|
|
39
|
-
* (not decoded by RTKLIB).
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
interface SbfNavResult {
|
|
43
|
-
ephemerides: Ephemeris[];
|
|
44
|
-
/** Frames whose CRC failed (corruption indicator). */
|
|
45
|
-
badCrc: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Decode every GPSNav/GLONav/GALNav/BDSNav/QZSNav block in an SBF byte
|
|
49
|
-
* stream into the RINEX-parser `Ephemeris` union. Every block is
|
|
50
|
-
* emitted (no issue-of-data dedup); other block types are skipped.
|
|
51
|
-
*/
|
|
52
|
-
declare function parseSbfNav(data: Uint8Array): SbfNavResult;
|
|
53
|
-
/**
|
|
54
|
-
* GPS / Galileo / BeiDou almanac, normalized to ABSOLUTE Keplerian
|
|
55
|
-
* elements (units matching `KeplerEphemeris`: sqrtA in m^1/2, angles
|
|
56
|
-
* in rad, rates in rad/s) so a Kepler propagator can consume the
|
|
57
|
-
* record directly with all correction terms at zero.
|
|
58
|
-
*
|
|
59
|
-
* Normalizations applied per system:
|
|
60
|
-
* - GPS (`G`): the SIS δi (relative to 0.3 semicircles) is folded in —
|
|
61
|
-
* `i0OrDeltaI` = 0.3π + δi·π. `weekAlm` is the full GPS week
|
|
62
|
-
* (8-bit SIS week disambiguated against the receiver week).
|
|
63
|
-
* - Galileo (`E`): the SIS ΔsqrtA (relative to √29 600 000 m^1/2) and
|
|
64
|
-
* δi (relative to 56°) are folded in — `sqrtA` and `i0OrDeltaI` are
|
|
65
|
-
* absolute. `weekAlm` is the full GPS-aligned week (2-bit SIS week
|
|
66
|
-
* disambiguated). `health` is the raw SBF bit field: bit 0 set ⇒
|
|
67
|
-
* bits 1-2 are the L1-B HS, bit 3 set ⇒ bits 4-5 E5b HS, bit 6 set
|
|
68
|
-
* ⇒ bits 7-8 E5a HS (0 = healthy).
|
|
69
|
-
* - BeiDou (`C`): δi is relative to 0.3 semicircles for MEO/IGSO and
|
|
70
|
-
* to 0 for GEO satellites (PRN 1-5 and 59-63) per the BDS ICD; the
|
|
71
|
-
* reference is folded in. `weekAlm` is the full BDS week (add 1356
|
|
72
|
-
* for the GPS week) and `toaSec` is BDT seconds of week
|
|
73
|
-
* (BDT = GPST − 14 s). `health` is the 9-bit SIS health word.
|
|
74
|
-
*/
|
|
75
|
-
interface SbfKeplerAlmanac {
|
|
76
|
-
system: 'G' | 'E' | 'C';
|
|
77
|
-
/** Satellite PRN, e.g. "G14". */
|
|
78
|
-
prn: string;
|
|
79
|
-
/** Full almanac reference week (see per-system notes above). */
|
|
80
|
-
weekAlm: number;
|
|
81
|
-
/** Almanac reference time of week in seconds (system time scale). */
|
|
82
|
-
toaSec: number;
|
|
83
|
-
/** Square root of semi-major axis in m^(1/2), absolute. */
|
|
84
|
-
sqrtA: number;
|
|
85
|
-
/** Eccentricity (dimensionless). */
|
|
86
|
-
e: number;
|
|
87
|
-
/** Inclination at reference time in rad, absolute (normalized). */
|
|
88
|
-
i0OrDeltaI: number;
|
|
89
|
-
/** Longitude of ascending node at the weekly epoch in rad. */
|
|
90
|
-
omega0: number;
|
|
91
|
-
/** Argument of perigee in rad. */
|
|
92
|
-
omega: number;
|
|
93
|
-
/** Mean anomaly at reference time in rad. */
|
|
94
|
-
m0: number;
|
|
95
|
-
/** Rate of right ascension in rad/s. */
|
|
96
|
-
omegaDot: number;
|
|
97
|
-
/** SV clock bias in seconds. */
|
|
98
|
-
af0: number;
|
|
99
|
-
/** SV clock drift in s/s. */
|
|
100
|
-
af1: number;
|
|
101
|
-
/** Health word, 0 = healthy (see per-system notes above). */
|
|
102
|
-
health: number;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* GLONASS almanac (GLONASS ICD orbital parameters). Semicircle fields
|
|
106
|
-
* are converted to radians; everything else keeps the ICD units.
|
|
107
|
-
*/
|
|
108
|
-
interface SbfGlonassAlmanac {
|
|
109
|
-
system: 'R';
|
|
110
|
-
/** Satellite slot, e.g. "R05". */
|
|
111
|
-
prn: string;
|
|
112
|
-
/** Frequency channel number HnA (−7…+6). */
|
|
113
|
-
freqNr: number;
|
|
114
|
-
/** Full GPS week of the almanac reference time. */
|
|
115
|
-
weekAlm: number;
|
|
116
|
-
/** Almanac reference time of week in seconds, GPS time frame. */
|
|
117
|
-
toaSec: number;
|
|
118
|
-
/** εnA: orbit eccentricity. */
|
|
119
|
-
epsilon: number;
|
|
120
|
-
/** λnA: longitude of first ascending node in rad. */
|
|
121
|
-
lambda: number;
|
|
122
|
-
/** tλnA: time of first ascending node passage in s of day. */
|
|
123
|
-
tLambda: number;
|
|
124
|
-
/** ΔinA: inclination correction to 63° in rad. */
|
|
125
|
-
deltaI: number;
|
|
126
|
-
/** ωnA: argument of perigee in rad. */
|
|
127
|
-
omega: number;
|
|
128
|
-
/** ΔTnA: correction to the mean Draconian period (s / orbit). */
|
|
129
|
-
deltaT: number;
|
|
130
|
-
/** dΔTnA: rate of change of ΔT (s / orbit²). */
|
|
131
|
-
deltaTDot: number;
|
|
132
|
-
/** τnA: coarse satellite clock correction in s. */
|
|
133
|
-
tau: number;
|
|
134
|
-
/** CnA general health flag: 1 = healthy. */
|
|
135
|
-
health: number;
|
|
136
|
-
/** NA: calendar day number within the 4-year period. */
|
|
137
|
-
nDay: number;
|
|
138
|
-
/** N4: 4-year interval number since 1996. */
|
|
139
|
-
n4: number;
|
|
140
|
-
}
|
|
141
|
-
type SbfAlmanac = SbfKeplerAlmanac | SbfGlonassAlmanac;
|
|
142
|
-
interface SbfAlmanacResult {
|
|
143
|
-
almanacs: SbfAlmanac[];
|
|
144
|
-
/** Frames whose CRC failed (corruption indicator). */
|
|
145
|
-
badCrc: number;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Decode every GPSAlm/GALAlm/GLOAlm/BDSAlm block in an SBF byte
|
|
149
|
-
* stream. Every block is emitted in stream order; other block types
|
|
150
|
-
* are skipped.
|
|
151
|
-
*/
|
|
152
|
-
declare function parseSbfAlmanac(data: Uint8Array): SbfAlmanacResult;
|
|
153
|
-
|
|
154
21
|
/**
|
|
155
22
|
* Septentrio SBF decoded ionosphere / UTC blocks.
|
|
156
23
|
*
|
|
@@ -231,6 +98,117 @@ interface SbfCnavResult {
|
|
|
231
98
|
*/
|
|
232
99
|
declare function parseSbfCnav(data: Uint8Array): SbfCnavResult;
|
|
233
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
|
+
|
|
234
212
|
/**
|
|
235
213
|
* Septentrio SBF raw-measurement decoding (MeasEpoch + Meas3) — the
|
|
236
214
|
* path from a receiver log to RINEX-grade observables.
|
|
@@ -294,4 +272,4 @@ interface SbfParseResult {
|
|
|
294
272
|
*/
|
|
295
273
|
declare function parseSbfMeas(data: Uint8Array): SbfParseResult;
|
|
296
274
|
|
|
297
|
-
export { CnavEphemeris, type
|
|
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,4 +1,5 @@
|
|
|
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-CN8rxL4h.js';
|
|
2
|
+
import { C as CnavEphemeris, K as KeplerEphemeris, G as GlonassEphemeris } from './nav-DImXUdbp.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Septentrio SBF framing shared by the measurement and navigation
|
|
@@ -17,140 +18,6 @@ declare function crc16(data: Uint8Array, start: number, end: number): number;
|
|
|
17
18
|
*/
|
|
18
19
|
declare function scanSbfFrames(data: Uint8Array, view: DataView, onBlock: (id: number, offset: number, len: number) => void): number;
|
|
19
20
|
|
|
20
|
-
/**
|
|
21
|
-
* Septentrio SBF decoded navigation and almanac blocks.
|
|
22
|
-
*
|
|
23
|
-
* Nav blocks (GPSNav 5891, GLONav 4004, GALNav 4002, BDSNav 4081,
|
|
24
|
-
* QZSNav 4095) carry the fully decoded broadcast ephemeris; they are
|
|
25
|
-
* mapped onto the same `Ephemeris` union the RINEX nav parser produces,
|
|
26
|
-
* with identical units and conventions (sqrtA in m^1/2, angles in rad,
|
|
27
|
-
* semicircle fields scaled by π, GLONASS tauN with the RINEX sign, BDS
|
|
28
|
-
* epochs/weeks on the BDT scale like a RINEX file).
|
|
29
|
-
*
|
|
30
|
-
* Almanac blocks (GPSAlm 5892, GALAlm 4003, GLOAlm 4005, BDSAlm 4119)
|
|
31
|
-
* are decoded into dedicated types with all per-system relative fields
|
|
32
|
-
* (GPS/BDS δi, Galileo δi and ΔsqrtA) normalized to absolute values.
|
|
33
|
-
*
|
|
34
|
-
* Ported from RTKLIB demo5 (rtklibexplorer), src/rcv/septentrio.c
|
|
35
|
-
* (decode_gpsnav / decode_glonav / decode_galnav / decode_cmpnav /
|
|
36
|
-
* decode_qzssnav / decode_gpsalm / decode_galalm / decode_cmpalm),
|
|
37
|
-
* BSD-2-Clause, and cross-checked field by field against the Septentrio
|
|
38
|
-
* mosaic-X5 reference guide, which also supplies the GLOAlm layout
|
|
39
|
-
* (not decoded by RTKLIB).
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
interface SbfNavResult {
|
|
43
|
-
ephemerides: Ephemeris[];
|
|
44
|
-
/** Frames whose CRC failed (corruption indicator). */
|
|
45
|
-
badCrc: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Decode every GPSNav/GLONav/GALNav/BDSNav/QZSNav block in an SBF byte
|
|
49
|
-
* stream into the RINEX-parser `Ephemeris` union. Every block is
|
|
50
|
-
* emitted (no issue-of-data dedup); other block types are skipped.
|
|
51
|
-
*/
|
|
52
|
-
declare function parseSbfNav(data: Uint8Array): SbfNavResult;
|
|
53
|
-
/**
|
|
54
|
-
* GPS / Galileo / BeiDou almanac, normalized to ABSOLUTE Keplerian
|
|
55
|
-
* elements (units matching `KeplerEphemeris`: sqrtA in m^1/2, angles
|
|
56
|
-
* in rad, rates in rad/s) so a Kepler propagator can consume the
|
|
57
|
-
* record directly with all correction terms at zero.
|
|
58
|
-
*
|
|
59
|
-
* Normalizations applied per system:
|
|
60
|
-
* - GPS (`G`): the SIS δi (relative to 0.3 semicircles) is folded in —
|
|
61
|
-
* `i0OrDeltaI` = 0.3π + δi·π. `weekAlm` is the full GPS week
|
|
62
|
-
* (8-bit SIS week disambiguated against the receiver week).
|
|
63
|
-
* - Galileo (`E`): the SIS ΔsqrtA (relative to √29 600 000 m^1/2) and
|
|
64
|
-
* δi (relative to 56°) are folded in — `sqrtA` and `i0OrDeltaI` are
|
|
65
|
-
* absolute. `weekAlm` is the full GPS-aligned week (2-bit SIS week
|
|
66
|
-
* disambiguated). `health` is the raw SBF bit field: bit 0 set ⇒
|
|
67
|
-
* bits 1-2 are the L1-B HS, bit 3 set ⇒ bits 4-5 E5b HS, bit 6 set
|
|
68
|
-
* ⇒ bits 7-8 E5a HS (0 = healthy).
|
|
69
|
-
* - BeiDou (`C`): δi is relative to 0.3 semicircles for MEO/IGSO and
|
|
70
|
-
* to 0 for GEO satellites (PRN 1-5 and 59-63) per the BDS ICD; the
|
|
71
|
-
* reference is folded in. `weekAlm` is the full BDS week (add 1356
|
|
72
|
-
* for the GPS week) and `toaSec` is BDT seconds of week
|
|
73
|
-
* (BDT = GPST − 14 s). `health` is the 9-bit SIS health word.
|
|
74
|
-
*/
|
|
75
|
-
interface SbfKeplerAlmanac {
|
|
76
|
-
system: 'G' | 'E' | 'C';
|
|
77
|
-
/** Satellite PRN, e.g. "G14". */
|
|
78
|
-
prn: string;
|
|
79
|
-
/** Full almanac reference week (see per-system notes above). */
|
|
80
|
-
weekAlm: number;
|
|
81
|
-
/** Almanac reference time of week in seconds (system time scale). */
|
|
82
|
-
toaSec: number;
|
|
83
|
-
/** Square root of semi-major axis in m^(1/2), absolute. */
|
|
84
|
-
sqrtA: number;
|
|
85
|
-
/** Eccentricity (dimensionless). */
|
|
86
|
-
e: number;
|
|
87
|
-
/** Inclination at reference time in rad, absolute (normalized). */
|
|
88
|
-
i0OrDeltaI: number;
|
|
89
|
-
/** Longitude of ascending node at the weekly epoch in rad. */
|
|
90
|
-
omega0: number;
|
|
91
|
-
/** Argument of perigee in rad. */
|
|
92
|
-
omega: number;
|
|
93
|
-
/** Mean anomaly at reference time in rad. */
|
|
94
|
-
m0: number;
|
|
95
|
-
/** Rate of right ascension in rad/s. */
|
|
96
|
-
omegaDot: number;
|
|
97
|
-
/** SV clock bias in seconds. */
|
|
98
|
-
af0: number;
|
|
99
|
-
/** SV clock drift in s/s. */
|
|
100
|
-
af1: number;
|
|
101
|
-
/** Health word, 0 = healthy (see per-system notes above). */
|
|
102
|
-
health: number;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* GLONASS almanac (GLONASS ICD orbital parameters). Semicircle fields
|
|
106
|
-
* are converted to radians; everything else keeps the ICD units.
|
|
107
|
-
*/
|
|
108
|
-
interface SbfGlonassAlmanac {
|
|
109
|
-
system: 'R';
|
|
110
|
-
/** Satellite slot, e.g. "R05". */
|
|
111
|
-
prn: string;
|
|
112
|
-
/** Frequency channel number HnA (−7…+6). */
|
|
113
|
-
freqNr: number;
|
|
114
|
-
/** Full GPS week of the almanac reference time. */
|
|
115
|
-
weekAlm: number;
|
|
116
|
-
/** Almanac reference time of week in seconds, GPS time frame. */
|
|
117
|
-
toaSec: number;
|
|
118
|
-
/** εnA: orbit eccentricity. */
|
|
119
|
-
epsilon: number;
|
|
120
|
-
/** λnA: longitude of first ascending node in rad. */
|
|
121
|
-
lambda: number;
|
|
122
|
-
/** tλnA: time of first ascending node passage in s of day. */
|
|
123
|
-
tLambda: number;
|
|
124
|
-
/** ΔinA: inclination correction to 63° in rad. */
|
|
125
|
-
deltaI: number;
|
|
126
|
-
/** ωnA: argument of perigee in rad. */
|
|
127
|
-
omega: number;
|
|
128
|
-
/** ΔTnA: correction to the mean Draconian period (s / orbit). */
|
|
129
|
-
deltaT: number;
|
|
130
|
-
/** dΔTnA: rate of change of ΔT (s / orbit²). */
|
|
131
|
-
deltaTDot: number;
|
|
132
|
-
/** τnA: coarse satellite clock correction in s. */
|
|
133
|
-
tau: number;
|
|
134
|
-
/** CnA general health flag: 1 = healthy. */
|
|
135
|
-
health: number;
|
|
136
|
-
/** NA: calendar day number within the 4-year period. */
|
|
137
|
-
nDay: number;
|
|
138
|
-
/** N4: 4-year interval number since 1996. */
|
|
139
|
-
n4: number;
|
|
140
|
-
}
|
|
141
|
-
type SbfAlmanac = SbfKeplerAlmanac | SbfGlonassAlmanac;
|
|
142
|
-
interface SbfAlmanacResult {
|
|
143
|
-
almanacs: SbfAlmanac[];
|
|
144
|
-
/** Frames whose CRC failed (corruption indicator). */
|
|
145
|
-
badCrc: number;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Decode every GPSAlm/GALAlm/GLOAlm/BDSAlm block in an SBF byte
|
|
149
|
-
* stream. Every block is emitted in stream order; other block types
|
|
150
|
-
* are skipped.
|
|
151
|
-
*/
|
|
152
|
-
declare function parseSbfAlmanac(data: Uint8Array): SbfAlmanacResult;
|
|
153
|
-
|
|
154
21
|
/**
|
|
155
22
|
* Septentrio SBF decoded ionosphere / UTC blocks.
|
|
156
23
|
*
|
|
@@ -231,6 +98,117 @@ interface SbfCnavResult {
|
|
|
231
98
|
*/
|
|
232
99
|
declare function parseSbfCnav(data: Uint8Array): SbfCnavResult;
|
|
233
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
|
+
|
|
234
212
|
/**
|
|
235
213
|
* Septentrio SBF raw-measurement decoding (MeasEpoch + Meas3) — the
|
|
236
214
|
* path from a receiver log to RINEX-grade observables.
|
|
@@ -294,4 +272,4 @@ interface SbfParseResult {
|
|
|
294
272
|
*/
|
|
295
273
|
declare function parseSbfMeas(data: Uint8Array): SbfParseResult;
|
|
296
274
|
|
|
297
|
-
export { CnavEphemeris, type
|
|
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-
|
|
10
|
-
import "./chunk-
|
|
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.js
CHANGED
|
@@ -4,9 +4,8 @@ import {
|
|
|
4
4
|
parseUbxNav,
|
|
5
5
|
parseUbxRawx,
|
|
6
6
|
ubxFrames
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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.
|
|
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,
|