gnss-js 1.65.0 → 2.0.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/README.md +144 -132
- package/dist/{chunk-TWAC2BZF.js → chunk-2CMAFEHI.js} +1 -1
- package/dist/{chunk-MRC6LIPM.js → chunk-GH7MYXON.js} +1 -1
- package/dist/chunk-S624C5AC.js +269 -0
- package/dist/{chunk-REULRNJ5.js → chunk-WVTDVPKA.js} +151 -188
- package/dist/{chunk-UHLUAU6H.js → chunk-WW3DKCDN.js} +4 -4
- package/dist/constants.js +6 -6
- package/dist/{ephemeris-Ohl6NAfw.d.cts → ephemeris-BAnBLLB9.d.cts} +0 -1
- package/dist/{ephemeris-Ohl6NAfw.d.ts → ephemeris-BAnBLLB9.d.ts} +0 -1
- package/dist/index.cjs +427 -188
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +121 -101
- package/dist/novatel.js +3 -3
- package/dist/orbit.d.cts +1 -1
- package/dist/orbit.d.ts +1 -1
- package/dist/orbit.js +3 -3
- package/dist/positioning.d.cts +1 -1
- package/dist/positioning.d.ts +1 -1
- package/dist/positioning.js +4 -4
- package/dist/rtcm2.cjs +300 -0
- package/dist/rtcm2.d.cts +116 -0
- package/dist/rtcm2.d.ts +116 -0
- package/dist/rtcm2.js +20 -0
- package/dist/rtcm3.cjs +181 -217
- package/dist/rtcm3.d.cts +28 -15
- package/dist/rtcm3.d.ts +28 -15
- package/dist/rtcm3.js +5 -3
- package/dist/sbf.js +4 -4
- package/dist/ubx.js +4 -4
- package/package.json +6 -1
- package/dist/{chunk-FA2UTLEQ.js → chunk-3KSDL3CO.js} +3 -3
- package/dist/{chunk-MHGNKSSH.js → chunk-JYWYQ7DW.js} +3 -3
- package/dist/{chunk-KUTNIP3O.js → chunk-SEYH4BEN.js} +3 -3
package/dist/rtcm3.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Rtcm3Frame, E as EphemerisInfo } from './ephemeris-
|
|
2
|
-
export { B as BitReader, R as Rtcm3DebugHandler, a as Rtcm3Decoder, d as decodeEphemeris, r as readString, c as reportDecodeError, s as setRtcm3DebugHandler } from './ephemeris-
|
|
1
|
+
import { b as Rtcm3Frame, E as EphemerisInfo } from './ephemeris-BAnBLLB9.js';
|
|
2
|
+
export { B as BitReader, R as Rtcm3DebugHandler, a as Rtcm3Decoder, d as decodeEphemeris, r as readString, c as reportDecodeError, s as setRtcm3DebugHandler } from './ephemeris-BAnBLLB9.js';
|
|
3
3
|
|
|
4
4
|
/** One code bias for a specific signal (DF380/DF381 + DF383). */
|
|
5
5
|
interface SsrCodeBias {
|
|
@@ -127,7 +127,7 @@ declare function decodeIgsSsr(frame: Rtcm3Frame): IgsSsrMessage | null;
|
|
|
127
127
|
*/
|
|
128
128
|
|
|
129
129
|
/** Single signal observation for one satellite */
|
|
130
|
-
interface
|
|
130
|
+
interface ObsSignal {
|
|
131
131
|
/** RINEX 2-char obs code, e.g. "1C", "5X" */
|
|
132
132
|
rinexCode: string;
|
|
133
133
|
/** Pseudorange in meters (undefined if invalid) */
|
|
@@ -146,16 +146,20 @@ interface MsmSignal {
|
|
|
146
146
|
wavelength: number;
|
|
147
147
|
}
|
|
148
148
|
/** All observations for one satellite in one epoch */
|
|
149
|
-
interface
|
|
149
|
+
interface ObsSatObs {
|
|
150
150
|
/** PRN string, e.g. "G01", "R15", "E04" */
|
|
151
151
|
prn: string;
|
|
152
152
|
/** System letter: G, R, E, C, J, I, S */
|
|
153
153
|
system: string;
|
|
154
154
|
/** Signal observations */
|
|
155
|
-
signals:
|
|
155
|
+
signals: ObsSignal[];
|
|
156
156
|
}
|
|
157
|
-
/**
|
|
158
|
-
|
|
157
|
+
/**
|
|
158
|
+
* One decoded observation epoch. Originally the MSM4–7 output shape, now the
|
|
159
|
+
* neutral shape every RTCM3 obs source fills: MSM (`decodeMsmFull`), legacy
|
|
160
|
+
* 1001–1012 (`decodeLegacyObs`), via the `decodeObs` dispatcher.
|
|
161
|
+
*/
|
|
162
|
+
interface ObsEpoch {
|
|
159
163
|
/** Message type (1074, 1077, etc.) */
|
|
160
164
|
messageType: number;
|
|
161
165
|
/** Epoch time as GPS milliseconds of week (or GLONASS day-of-week ms, BDS SOW) */
|
|
@@ -163,15 +167,15 @@ interface MsmEpoch {
|
|
|
163
167
|
/** System letter */
|
|
164
168
|
system: string;
|
|
165
169
|
/** Observations per satellite */
|
|
166
|
-
observations:
|
|
170
|
+
observations: ObsSatObs[];
|
|
167
171
|
}
|
|
168
172
|
/**
|
|
169
173
|
* Decode a single RTCM3 MSM4-7 frame into full observations.
|
|
170
174
|
* Returns null for non-MSM or MSM1-3 frames.
|
|
171
175
|
*/
|
|
172
|
-
declare function decodeMsmFull(frame: Rtcm3Frame):
|
|
176
|
+
declare function decodeMsmFull(frame: Rtcm3Frame): ObsEpoch | null;
|
|
173
177
|
/**
|
|
174
|
-
* Convert
|
|
178
|
+
* Convert an observation epoch timestamp to a Date.
|
|
175
179
|
* For GPS/Galileo/BDS/QZSS: epochMs is ms of GPS week.
|
|
176
180
|
* For GLONASS: epochMs is day-of-week × 86400000 + ms of day (UTC+3).
|
|
177
181
|
*
|
|
@@ -185,7 +189,7 @@ declare function decodeMsmFull(frame: Rtcm3Frame): MsmEpoch | null;
|
|
|
185
189
|
* 18 s (the current leap-second count) off — a ±14 km per-satellite
|
|
186
190
|
* range error that scattered live SPP solutions by kilometres.
|
|
187
191
|
*/
|
|
188
|
-
declare function
|
|
192
|
+
declare function obsEpochToDate(sys: string, epochMs: number, refTime?: Date): Date;
|
|
189
193
|
/**
|
|
190
194
|
* Set a GLONASS FDMA frequency number (k = -7..+13) for a slot (1-24),
|
|
191
195
|
* e.g. from a decoded 1020 ephemeris. MSM4/6 carry no DF419, so without
|
|
@@ -199,9 +203,18 @@ declare function resetGloFreqCache(): void;
|
|
|
199
203
|
|
|
200
204
|
/**
|
|
201
205
|
* Decode a legacy RTCM3 observation frame (1001–1004 GPS, 1009–1012 GLONASS)
|
|
202
|
-
* into an {@link
|
|
206
|
+
* into an {@link ObsEpoch}, or null for any other message type.
|
|
207
|
+
*/
|
|
208
|
+
declare function decodeLegacyObs(frame: Rtcm3Frame): ObsEpoch | null;
|
|
209
|
+
/**
|
|
210
|
+
* Decode any RTCM3 observation frame into an {@link ObsEpoch}: MSM4–7 first
|
|
211
|
+
* ({@link decodeMsmFull}), then the legacy fixed-layout obs (1001–1004 GPS,
|
|
212
|
+
* 1009–1012 GLONASS) via {@link decodeLegacyObs}. Returns null for any
|
|
213
|
+
* non-observation message. This is the single obs entry point every consumer
|
|
214
|
+
* (stream stats, live SPP/QC/RTK, station monitor) should call, so a new obs
|
|
215
|
+
* source is added here once rather than at every call site.
|
|
203
216
|
*/
|
|
204
|
-
declare function
|
|
217
|
+
declare function decodeObs(frame: Rtcm3Frame): ObsEpoch | null;
|
|
205
218
|
|
|
206
219
|
/** One announced message in the station's schedule (DF055/DF056/DF057). */
|
|
207
220
|
interface SystemParamsMessage {
|
|
@@ -287,7 +300,7 @@ interface StreamStats {
|
|
|
287
300
|
messageTypes: Map<number, MessageTypeStats>;
|
|
288
301
|
bytesPerSecond: number;
|
|
289
302
|
framesPerSecond: number;
|
|
290
|
-
/** Per-satellite C/N0 from
|
|
303
|
+
/** Per-satellite C/N0 from observation messages. Key = PRN (e.g. "G01"). */
|
|
291
304
|
satellites: Map<string, SatCn0>;
|
|
292
305
|
/** Per-satellite ephemeris data. Key = PRN (e.g. "G01"). */
|
|
293
306
|
ephemerides: Map<string, EphemerisInfo>;
|
|
@@ -303,4 +316,4 @@ declare function rtcm3Constellation(msgType: number): string | null;
|
|
|
303
316
|
declare function createStreamStats(): StreamStats;
|
|
304
317
|
declare function updateStreamStats(stats: StreamStats, frames: Rtcm3Frame[], rawBytes: number): void;
|
|
305
318
|
|
|
306
|
-
export { EphemerisInfo, type IgsSsrIonoLayer, type IgsSsrMessage, type MessageTypeStats, type
|
|
319
|
+
export { EphemerisInfo, type IgsSsrIonoLayer, type IgsSsrMessage, type MessageTypeStats, type ObsEpoch, type ObsSatObs, type ObsSignal, RTCM3_MESSAGE_NAMES, Rtcm3Frame, type SatCn0, type SignalCn0, type SsrCodeBias, type SsrKind, type SsrMessage, type SsrPhaseBias, type SsrSatCorrection, type StationMeta, type StreamStats, type SystemParams, type SystemParamsMessage, createStationMeta, createStreamStats, decodeIgsSsr, decodeLegacyObs, decodeMsmFull, decodeObs, decodeSsr, decodeSystemParams, isSsrMessage, obsEpochToDate, resetGloFreqCache, rtcm3Constellation, setGloFreqNumber, updateStationMeta, updateStreamStats };
|
package/dist/rtcm3.js
CHANGED
|
@@ -8,10 +8,11 @@ import {
|
|
|
8
8
|
decodeIgsSsr,
|
|
9
9
|
decodeLegacyObs,
|
|
10
10
|
decodeMsmFull,
|
|
11
|
+
decodeObs,
|
|
11
12
|
decodeSsr,
|
|
12
13
|
decodeSystemParams,
|
|
13
14
|
isSsrMessage,
|
|
14
|
-
|
|
15
|
+
obsEpochToDate,
|
|
15
16
|
readString,
|
|
16
17
|
reportDecodeError,
|
|
17
18
|
resetGloFreqCache,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
setRtcm3DebugHandler,
|
|
21
22
|
updateStationMeta,
|
|
22
23
|
updateStreamStats
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WVTDVPKA.js";
|
|
24
25
|
import "./chunk-HVXYFUCB.js";
|
|
25
26
|
import "./chunk-LEEU5OIO.js";
|
|
26
27
|
import "./chunk-FIEWO4J4.js";
|
|
@@ -34,10 +35,11 @@ export {
|
|
|
34
35
|
decodeIgsSsr,
|
|
35
36
|
decodeLegacyObs,
|
|
36
37
|
decodeMsmFull,
|
|
38
|
+
decodeObs,
|
|
37
39
|
decodeSsr,
|
|
38
40
|
decodeSystemParams,
|
|
39
41
|
isSsrMessage,
|
|
40
|
-
|
|
42
|
+
obsEpochToDate,
|
|
41
43
|
readString,
|
|
42
44
|
reportDecodeError,
|
|
43
45
|
resetGloFreqCache,
|
package/dist/sbf.js
CHANGED
|
@@ -24,15 +24,15 @@ import {
|
|
|
24
24
|
sbasL5MessageName,
|
|
25
25
|
sbasL5MessageType,
|
|
26
26
|
scanSbfFrames
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-WW3DKCDN.js";
|
|
28
|
+
import "./chunk-3KSDL3CO.js";
|
|
29
29
|
import "./chunk-WQX354KD.js";
|
|
30
|
+
import "./chunk-HVXYFUCB.js";
|
|
30
31
|
import "./chunk-37QNKGTC.js";
|
|
32
|
+
import "./chunk-LEEU5OIO.js";
|
|
31
33
|
import "./chunk-6FAL6P4G.js";
|
|
32
34
|
import "./chunk-YUW33VXK.js";
|
|
33
35
|
import "./chunk-V2D5KUKH.js";
|
|
34
|
-
import "./chunk-HVXYFUCB.js";
|
|
35
|
-
import "./chunk-LEEU5OIO.js";
|
|
36
36
|
export {
|
|
37
37
|
SBAS_L5_MT_NAMES,
|
|
38
38
|
SBAS_L5_PREAMBLE_UW,
|
package/dist/ubx.js
CHANGED
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
parseUbxRawNav,
|
|
7
7
|
parseUbxRawx,
|
|
8
8
|
ubxFrames
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-GH7MYXON.js";
|
|
10
|
+
import "./chunk-3KSDL3CO.js";
|
|
11
11
|
import "./chunk-WQX354KD.js";
|
|
12
|
-
import "./chunk-YUW33VXK.js";
|
|
13
|
-
import "./chunk-V2D5KUKH.js";
|
|
14
12
|
import "./chunk-HVXYFUCB.js";
|
|
15
13
|
import "./chunk-LEEU5OIO.js";
|
|
14
|
+
import "./chunk-YUW33VXK.js";
|
|
15
|
+
import "./chunk-V2D5KUKH.js";
|
|
16
16
|
export {
|
|
17
17
|
parseUbxCnav,
|
|
18
18
|
parseUbxIonoUtc,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gnss-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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,
|
|
@@ -55,6 +55,11 @@
|
|
|
55
55
|
"import": "./dist/binex.js",
|
|
56
56
|
"require": "./dist/binex.cjs"
|
|
57
57
|
},
|
|
58
|
+
"./rtcm2": {
|
|
59
|
+
"types": "./dist/rtcm2.d.ts",
|
|
60
|
+
"import": "./dist/rtcm2.js",
|
|
61
|
+
"require": "./dist/rtcm2.cjs"
|
|
62
|
+
},
|
|
58
63
|
"./rtcm3": {
|
|
59
64
|
"types": "./dist/rtcm3.d.ts",
|
|
60
65
|
"import": "./dist/rtcm3.js",
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getUtcDate
|
|
3
|
+
} from "./chunk-HVXYFUCB.js";
|
|
1
4
|
import {
|
|
2
5
|
crc24q
|
|
3
6
|
} from "./chunk-YUW33VXK.js";
|
|
@@ -6,9 +9,6 @@ import {
|
|
|
6
9
|
getBitS,
|
|
7
10
|
getBitU
|
|
8
11
|
} from "./chunk-V2D5KUKH.js";
|
|
9
|
-
import {
|
|
10
|
-
getUtcDate
|
|
11
|
-
} from "./chunk-HVXYFUCB.js";
|
|
12
12
|
|
|
13
13
|
// src/navbits/bds.ts
|
|
14
14
|
var BDT_EPOCH_MS = Date.UTC(2006, 0, 1);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decodeSbasGeoNav
|
|
3
3
|
} from "./chunk-WQX354KD.js";
|
|
4
|
+
import {
|
|
5
|
+
getUtcDate
|
|
6
|
+
} from "./chunk-HVXYFUCB.js";
|
|
4
7
|
import {
|
|
5
8
|
CnavAssembler,
|
|
6
9
|
cnavCrcOk
|
|
@@ -8,9 +11,6 @@ import {
|
|
|
8
11
|
import {
|
|
9
12
|
decodeGpsLnavFrame
|
|
10
13
|
} from "./chunk-V2D5KUKH.js";
|
|
11
|
-
import {
|
|
12
|
-
getUtcDate
|
|
13
|
-
} from "./chunk-HVXYFUCB.js";
|
|
14
14
|
|
|
15
15
|
// src/novatel/frame.ts
|
|
16
16
|
var OEM4_HLEN = 28;
|