gnss-js 1.64.0 → 1.66.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-TWAC2BZF.js → chunk-2CMAFEHI.js} +1 -1
- package/dist/{chunk-MRC6LIPM.js → chunk-GH7MYXON.js} +1 -1
- package/dist/{chunk-5SQLUGWE.js → chunk-REULRNJ5.js} +42 -1
- package/dist/chunk-S624C5AC.js +269 -0
- package/dist/{chunk-UHLUAU6H.js → chunk-WW3DKCDN.js} +4 -4
- package/dist/constants.js +6 -6
- package/dist/index.cjs +318 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +119 -99
- package/dist/novatel.js +3 -3
- package/dist/orbit.js +3 -3
- 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 +43 -1
- package/dist/rtcm3.d.cts +29 -1
- package/dist/rtcm3.d.ts +29 -1
- package/dist/rtcm3.js +3 -1
- 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/rtcm2.d.cts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RTCM 2.x decoder (RTCM 10402.3). A wholly different wire format from RTCM3:
|
|
3
|
+
* a stream of 30-bit GPS-style words (24 data + 6 parity bits), each carried in
|
|
4
|
+
* the low 6 bits of successive bytes ("6-of-8" — every byte has its top two
|
|
5
|
+
* bits set to 01, so 0x40–0x7F). Words are parity-checked and their D30* bit
|
|
6
|
+
* inverts the following data, exactly like the GPS LNAV navigation message.
|
|
7
|
+
*
|
|
8
|
+
* Framing/parity are a faithful port of RTKLIB `input_rtcm2` + `decode_word`.
|
|
9
|
+
* {@link Rtcm2Decoder.decode} strips the encoding, parity-checks, syncs on the
|
|
10
|
+
* 0x66 preamble and returns the message frames (header + the packed 24-bit-word
|
|
11
|
+
* body); the per-type body decoders (`rtcm2Station`, `rtcm2Observation`,
|
|
12
|
+
* `rtcm2Dgps`, `rtcm2Time`, `rtcm2Text`) read that body.
|
|
13
|
+
*
|
|
14
|
+
* Nearly extinct in favour of RTCM3, but still broadcast by some legacy CORS.
|
|
15
|
+
*/
|
|
16
|
+
/** One decoded RTCM 2.x message frame (header + packed 24-bit-word body). */
|
|
17
|
+
interface Rtcm2Frame {
|
|
18
|
+
messageType: number;
|
|
19
|
+
stationId: number;
|
|
20
|
+
/** Modified Z-count, seconds within the hour (0–3599.4). */
|
|
21
|
+
zcountSec: number;
|
|
22
|
+
sequenceNo: number;
|
|
23
|
+
/** Station health (3-bit). */
|
|
24
|
+
health: number;
|
|
25
|
+
/** Number of 24-bit data words after the 2-word header. */
|
|
26
|
+
lengthWords: number;
|
|
27
|
+
/** The parity-stripped message: header + data words, 24 bits per word packed
|
|
28
|
+
* MSB-first into bytes (message type at bit 8, body from bit 48). */
|
|
29
|
+
payload: Uint8Array;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Streaming RTCM 2.x framer. Feed bytes; get back complete, parity-valid
|
|
33
|
+
* message frames. Retains partial-word state across calls.
|
|
34
|
+
*/
|
|
35
|
+
declare class Rtcm2Decoder {
|
|
36
|
+
private word;
|
|
37
|
+
private nbyte;
|
|
38
|
+
private nbit;
|
|
39
|
+
private len;
|
|
40
|
+
private buff;
|
|
41
|
+
/** Reset the framer (e.g. after a stream reconnect). */
|
|
42
|
+
reset(): void;
|
|
43
|
+
decode(bytes: Uint8Array): Rtcm2Frame[];
|
|
44
|
+
private readHeader;
|
|
45
|
+
}
|
|
46
|
+
/** Reference-station coordinates from Type 3 (ARP) or Type 22 (extension). */
|
|
47
|
+
interface Rtcm2Station {
|
|
48
|
+
/** ECEF position (m) — Type 3. */
|
|
49
|
+
position?: [number, number, number];
|
|
50
|
+
/** L1 phase-centre → ARP offset (m) — Type 22. */
|
|
51
|
+
l1Offset?: [number, number, number];
|
|
52
|
+
/** Antenna height above the monument (m) — Type 22. */
|
|
53
|
+
height?: number;
|
|
54
|
+
}
|
|
55
|
+
/** Decode Type 3 (reference station ARP) or Type 22 (extended parameters). */
|
|
56
|
+
declare function rtcm2Station(frame: Rtcm2Frame): Rtcm2Station | null;
|
|
57
|
+
/** One raw observation record from a Type 18/19 message. */
|
|
58
|
+
interface Rtcm2ObsRecord {
|
|
59
|
+
prn: string;
|
|
60
|
+
system: 'G' | 'R';
|
|
61
|
+
/** Frequency: 0 = L1, 1 = L2. */
|
|
62
|
+
freq: number;
|
|
63
|
+
code: 'C/A' | 'P';
|
|
64
|
+
/** Carrier phase (cycles) — Type 18. */
|
|
65
|
+
phaseCycles?: number;
|
|
66
|
+
/** Pseudorange (m) — Type 19. */
|
|
67
|
+
pseudorangeM?: number;
|
|
68
|
+
/** Loss-of-lock indicator (Type 18). */
|
|
69
|
+
lossOfLock?: number;
|
|
70
|
+
}
|
|
71
|
+
/** Decode a Type 18 (carrier phase) or Type 19 (pseudorange) message into its
|
|
72
|
+
* per-satellite records. Returns the frequency, the multiple-message sync flag
|
|
73
|
+
* and the records; the caller pairs 18+19 across an epoch to form observations.
|
|
74
|
+
* Returns null for other types or an L2-frequency variant we don't map. */
|
|
75
|
+
declare function rtcm2Observation(frame: Rtcm2Frame): {
|
|
76
|
+
freq: number;
|
|
77
|
+
sync: boolean;
|
|
78
|
+
microSec: number;
|
|
79
|
+
records: Rtcm2ObsRecord[];
|
|
80
|
+
} | null;
|
|
81
|
+
/** One differential correction from a Type 1/9 (GPS) or Type 31 (GLONASS). */
|
|
82
|
+
interface Rtcm2Correction {
|
|
83
|
+
prn: string;
|
|
84
|
+
/** Pseudorange correction (m). */
|
|
85
|
+
prc: number;
|
|
86
|
+
/** Range-rate correction (m/s). */
|
|
87
|
+
rrc: number;
|
|
88
|
+
/** Issue of data. */
|
|
89
|
+
iod: number;
|
|
90
|
+
/** UDRE scale index (0–3). */
|
|
91
|
+
udre: number;
|
|
92
|
+
}
|
|
93
|
+
/** Decode differential corrections — Type 1/9 (GPS) or Type 31 (GLONASS). */
|
|
94
|
+
declare function rtcm2Dgps(frame: Rtcm2Frame): {
|
|
95
|
+
system: 'G' | 'R';
|
|
96
|
+
corrections: Rtcm2Correction[];
|
|
97
|
+
} | null;
|
|
98
|
+
/** Decode Type 14 — GPS time of week (week/hour + leap seconds). */
|
|
99
|
+
declare function rtcm2Time(frame: Rtcm2Frame): {
|
|
100
|
+
week: number;
|
|
101
|
+
hour: number;
|
|
102
|
+
zcountSec: number;
|
|
103
|
+
leapSeconds: number;
|
|
104
|
+
} | null;
|
|
105
|
+
/** Decode Type 16 — GPS special (ASCII text) message. */
|
|
106
|
+
declare function rtcm2Text(frame: Rtcm2Frame): string | null;
|
|
107
|
+
/** RTCM 2.x message-type names for the census/inspector. */
|
|
108
|
+
declare const RTCM2_MESSAGE_NAMES: Record<number, string>;
|
|
109
|
+
/**
|
|
110
|
+
* Heuristic: does this buffer look like an RTCM 2.x stream? Every byte must be
|
|
111
|
+
* 6-of-8 (top two bits 01), and the framer must extract at least two
|
|
112
|
+
* parity-valid frames from the head.
|
|
113
|
+
*/
|
|
114
|
+
declare function looksLikeRtcm2(bytes: Uint8Array): boolean;
|
|
115
|
+
|
|
116
|
+
export { RTCM2_MESSAGE_NAMES, type Rtcm2Correction, Rtcm2Decoder, type Rtcm2Frame, type Rtcm2ObsRecord, type Rtcm2Station, looksLikeRtcm2, rtcm2Dgps, rtcm2Observation, rtcm2Station, rtcm2Text, rtcm2Time };
|
package/dist/rtcm2.d.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RTCM 2.x decoder (RTCM 10402.3). A wholly different wire format from RTCM3:
|
|
3
|
+
* a stream of 30-bit GPS-style words (24 data + 6 parity bits), each carried in
|
|
4
|
+
* the low 6 bits of successive bytes ("6-of-8" — every byte has its top two
|
|
5
|
+
* bits set to 01, so 0x40–0x7F). Words are parity-checked and their D30* bit
|
|
6
|
+
* inverts the following data, exactly like the GPS LNAV navigation message.
|
|
7
|
+
*
|
|
8
|
+
* Framing/parity are a faithful port of RTKLIB `input_rtcm2` + `decode_word`.
|
|
9
|
+
* {@link Rtcm2Decoder.decode} strips the encoding, parity-checks, syncs on the
|
|
10
|
+
* 0x66 preamble and returns the message frames (header + the packed 24-bit-word
|
|
11
|
+
* body); the per-type body decoders (`rtcm2Station`, `rtcm2Observation`,
|
|
12
|
+
* `rtcm2Dgps`, `rtcm2Time`, `rtcm2Text`) read that body.
|
|
13
|
+
*
|
|
14
|
+
* Nearly extinct in favour of RTCM3, but still broadcast by some legacy CORS.
|
|
15
|
+
*/
|
|
16
|
+
/** One decoded RTCM 2.x message frame (header + packed 24-bit-word body). */
|
|
17
|
+
interface Rtcm2Frame {
|
|
18
|
+
messageType: number;
|
|
19
|
+
stationId: number;
|
|
20
|
+
/** Modified Z-count, seconds within the hour (0–3599.4). */
|
|
21
|
+
zcountSec: number;
|
|
22
|
+
sequenceNo: number;
|
|
23
|
+
/** Station health (3-bit). */
|
|
24
|
+
health: number;
|
|
25
|
+
/** Number of 24-bit data words after the 2-word header. */
|
|
26
|
+
lengthWords: number;
|
|
27
|
+
/** The parity-stripped message: header + data words, 24 bits per word packed
|
|
28
|
+
* MSB-first into bytes (message type at bit 8, body from bit 48). */
|
|
29
|
+
payload: Uint8Array;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Streaming RTCM 2.x framer. Feed bytes; get back complete, parity-valid
|
|
33
|
+
* message frames. Retains partial-word state across calls.
|
|
34
|
+
*/
|
|
35
|
+
declare class Rtcm2Decoder {
|
|
36
|
+
private word;
|
|
37
|
+
private nbyte;
|
|
38
|
+
private nbit;
|
|
39
|
+
private len;
|
|
40
|
+
private buff;
|
|
41
|
+
/** Reset the framer (e.g. after a stream reconnect). */
|
|
42
|
+
reset(): void;
|
|
43
|
+
decode(bytes: Uint8Array): Rtcm2Frame[];
|
|
44
|
+
private readHeader;
|
|
45
|
+
}
|
|
46
|
+
/** Reference-station coordinates from Type 3 (ARP) or Type 22 (extension). */
|
|
47
|
+
interface Rtcm2Station {
|
|
48
|
+
/** ECEF position (m) — Type 3. */
|
|
49
|
+
position?: [number, number, number];
|
|
50
|
+
/** L1 phase-centre → ARP offset (m) — Type 22. */
|
|
51
|
+
l1Offset?: [number, number, number];
|
|
52
|
+
/** Antenna height above the monument (m) — Type 22. */
|
|
53
|
+
height?: number;
|
|
54
|
+
}
|
|
55
|
+
/** Decode Type 3 (reference station ARP) or Type 22 (extended parameters). */
|
|
56
|
+
declare function rtcm2Station(frame: Rtcm2Frame): Rtcm2Station | null;
|
|
57
|
+
/** One raw observation record from a Type 18/19 message. */
|
|
58
|
+
interface Rtcm2ObsRecord {
|
|
59
|
+
prn: string;
|
|
60
|
+
system: 'G' | 'R';
|
|
61
|
+
/** Frequency: 0 = L1, 1 = L2. */
|
|
62
|
+
freq: number;
|
|
63
|
+
code: 'C/A' | 'P';
|
|
64
|
+
/** Carrier phase (cycles) — Type 18. */
|
|
65
|
+
phaseCycles?: number;
|
|
66
|
+
/** Pseudorange (m) — Type 19. */
|
|
67
|
+
pseudorangeM?: number;
|
|
68
|
+
/** Loss-of-lock indicator (Type 18). */
|
|
69
|
+
lossOfLock?: number;
|
|
70
|
+
}
|
|
71
|
+
/** Decode a Type 18 (carrier phase) or Type 19 (pseudorange) message into its
|
|
72
|
+
* per-satellite records. Returns the frequency, the multiple-message sync flag
|
|
73
|
+
* and the records; the caller pairs 18+19 across an epoch to form observations.
|
|
74
|
+
* Returns null for other types or an L2-frequency variant we don't map. */
|
|
75
|
+
declare function rtcm2Observation(frame: Rtcm2Frame): {
|
|
76
|
+
freq: number;
|
|
77
|
+
sync: boolean;
|
|
78
|
+
microSec: number;
|
|
79
|
+
records: Rtcm2ObsRecord[];
|
|
80
|
+
} | null;
|
|
81
|
+
/** One differential correction from a Type 1/9 (GPS) or Type 31 (GLONASS). */
|
|
82
|
+
interface Rtcm2Correction {
|
|
83
|
+
prn: string;
|
|
84
|
+
/** Pseudorange correction (m). */
|
|
85
|
+
prc: number;
|
|
86
|
+
/** Range-rate correction (m/s). */
|
|
87
|
+
rrc: number;
|
|
88
|
+
/** Issue of data. */
|
|
89
|
+
iod: number;
|
|
90
|
+
/** UDRE scale index (0–3). */
|
|
91
|
+
udre: number;
|
|
92
|
+
}
|
|
93
|
+
/** Decode differential corrections — Type 1/9 (GPS) or Type 31 (GLONASS). */
|
|
94
|
+
declare function rtcm2Dgps(frame: Rtcm2Frame): {
|
|
95
|
+
system: 'G' | 'R';
|
|
96
|
+
corrections: Rtcm2Correction[];
|
|
97
|
+
} | null;
|
|
98
|
+
/** Decode Type 14 — GPS time of week (week/hour + leap seconds). */
|
|
99
|
+
declare function rtcm2Time(frame: Rtcm2Frame): {
|
|
100
|
+
week: number;
|
|
101
|
+
hour: number;
|
|
102
|
+
zcountSec: number;
|
|
103
|
+
leapSeconds: number;
|
|
104
|
+
} | null;
|
|
105
|
+
/** Decode Type 16 — GPS special (ASCII text) message. */
|
|
106
|
+
declare function rtcm2Text(frame: Rtcm2Frame): string | null;
|
|
107
|
+
/** RTCM 2.x message-type names for the census/inspector. */
|
|
108
|
+
declare const RTCM2_MESSAGE_NAMES: Record<number, string>;
|
|
109
|
+
/**
|
|
110
|
+
* Heuristic: does this buffer look like an RTCM 2.x stream? Every byte must be
|
|
111
|
+
* 6-of-8 (top two bits 01), and the framer must extract at least two
|
|
112
|
+
* parity-valid frames from the head.
|
|
113
|
+
*/
|
|
114
|
+
declare function looksLikeRtcm2(bytes: Uint8Array): boolean;
|
|
115
|
+
|
|
116
|
+
export { RTCM2_MESSAGE_NAMES, type Rtcm2Correction, Rtcm2Decoder, type Rtcm2Frame, type Rtcm2ObsRecord, type Rtcm2Station, looksLikeRtcm2, rtcm2Dgps, rtcm2Observation, rtcm2Station, rtcm2Text, rtcm2Time };
|
package/dist/rtcm2.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RTCM2_MESSAGE_NAMES,
|
|
3
|
+
Rtcm2Decoder,
|
|
4
|
+
looksLikeRtcm2,
|
|
5
|
+
rtcm2Dgps,
|
|
6
|
+
rtcm2Observation,
|
|
7
|
+
rtcm2Station,
|
|
8
|
+
rtcm2Text,
|
|
9
|
+
rtcm2Time
|
|
10
|
+
} from "./chunk-S624C5AC.js";
|
|
11
|
+
export {
|
|
12
|
+
RTCM2_MESSAGE_NAMES,
|
|
13
|
+
Rtcm2Decoder,
|
|
14
|
+
looksLikeRtcm2,
|
|
15
|
+
rtcm2Dgps,
|
|
16
|
+
rtcm2Observation,
|
|
17
|
+
rtcm2Station,
|
|
18
|
+
rtcm2Text,
|
|
19
|
+
rtcm2Time
|
|
20
|
+
};
|
package/dist/rtcm3.cjs
CHANGED
|
@@ -30,6 +30,7 @@ __export(rtcm3_exports, {
|
|
|
30
30
|
decodeLegacyObs: () => decodeLegacyObs,
|
|
31
31
|
decodeMsmFull: () => decodeMsmFull,
|
|
32
32
|
decodeSsr: () => decodeSsr,
|
|
33
|
+
decodeSystemParams: () => decodeSystemParams,
|
|
33
34
|
isSsrMessage: () => isSsrMessage,
|
|
34
35
|
msmEpochToDate: () => msmEpochToDate,
|
|
35
36
|
readString: () => readString,
|
|
@@ -1678,6 +1679,30 @@ function isSsrMessage(messageType) {
|
|
|
1678
1679
|
return messageType in SSR_KIND;
|
|
1679
1680
|
}
|
|
1680
1681
|
|
|
1682
|
+
// src/rtcm3/system-params.ts
|
|
1683
|
+
function decodeSystemParams(frame) {
|
|
1684
|
+
if (frame.messageType !== 1013) return null;
|
|
1685
|
+
const r = new BitReader(frame.payload);
|
|
1686
|
+
r.readU(12);
|
|
1687
|
+
const referenceStationId = r.readU(12);
|
|
1688
|
+
const mjd = r.readU(16);
|
|
1689
|
+
const secondsOfDay = r.readU(17);
|
|
1690
|
+
const nm = r.readU(5);
|
|
1691
|
+
const leapSeconds = r.readU(8);
|
|
1692
|
+
const messages = [];
|
|
1693
|
+
for (let i = 0; i < nm; i++) {
|
|
1694
|
+
messages.push({
|
|
1695
|
+
messageId: r.readU(12),
|
|
1696
|
+
// DF055
|
|
1697
|
+
sync: r.readU(1) === 1,
|
|
1698
|
+
// DF056
|
|
1699
|
+
intervalS: r.readU(16) * 0.1
|
|
1700
|
+
// DF057 (0.1 s)
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
return { referenceStationId, mjd, secondsOfDay, leapSeconds, messages };
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1681
1706
|
// src/rtcm3/station.ts
|
|
1682
1707
|
function createStationMeta() {
|
|
1683
1708
|
return {
|
|
@@ -1691,7 +1716,8 @@ function createStationMeta() {
|
|
|
1691
1716
|
receiverType: null,
|
|
1692
1717
|
receiverFirmware: null,
|
|
1693
1718
|
receiverSerial: null,
|
|
1694
|
-
description: null
|
|
1719
|
+
description: null,
|
|
1720
|
+
physicalRefStationId: null
|
|
1695
1721
|
};
|
|
1696
1722
|
}
|
|
1697
1723
|
function decodeStationARP(payload, msgType, meta) {
|
|
@@ -1714,6 +1740,18 @@ function decodeStationARP(payload, msgType, meta) {
|
|
|
1714
1740
|
meta.antennaHeight = r.readU(16) * 1e-4;
|
|
1715
1741
|
}
|
|
1716
1742
|
}
|
|
1743
|
+
function decodeStation1032(payload, meta) {
|
|
1744
|
+
if (payload.length < 19) return;
|
|
1745
|
+
const r = new BitReader(payload);
|
|
1746
|
+
r.skip(12);
|
|
1747
|
+
meta.stationId = r.readU(12);
|
|
1748
|
+
meta.physicalRefStationId = r.readU(12);
|
|
1749
|
+
meta.itrf = r.readU(6);
|
|
1750
|
+
const x = r.readS(38) * 1e-4;
|
|
1751
|
+
const y = r.readS(38) * 1e-4;
|
|
1752
|
+
const z = r.readS(38) * 1e-4;
|
|
1753
|
+
if (x !== 0 || y !== 0 || z !== 0) meta.position = [x, y, z];
|
|
1754
|
+
}
|
|
1717
1755
|
function decodeAntennaDescriptor(payload, msgType, meta) {
|
|
1718
1756
|
if (payload.length < 5) return;
|
|
1719
1757
|
const r = new BitReader(payload);
|
|
@@ -1794,6 +1832,9 @@ function updateStationMeta(meta, frame) {
|
|
|
1794
1832
|
case 1006:
|
|
1795
1833
|
decodeStationARP(frame.payload, frame.messageType, meta);
|
|
1796
1834
|
return true;
|
|
1835
|
+
case 1032:
|
|
1836
|
+
decodeStation1032(frame.payload, meta);
|
|
1837
|
+
return true;
|
|
1797
1838
|
case 1007:
|
|
1798
1839
|
case 1008:
|
|
1799
1840
|
decodeAntennaDescriptor(frame.payload, frame.messageType, meta);
|
|
@@ -2032,6 +2073,7 @@ function updateStreamStats(stats, frames, rawBytes) {
|
|
|
2032
2073
|
decodeLegacyObs,
|
|
2033
2074
|
decodeMsmFull,
|
|
2034
2075
|
decodeSsr,
|
|
2076
|
+
decodeSystemParams,
|
|
2035
2077
|
isSsrMessage,
|
|
2036
2078
|
msmEpochToDate,
|
|
2037
2079
|
readString,
|
package/dist/rtcm3.d.cts
CHANGED
|
@@ -203,6 +203,33 @@ declare function resetGloFreqCache(): void;
|
|
|
203
203
|
*/
|
|
204
204
|
declare function decodeLegacyObs(frame: Rtcm3Frame): MsmEpoch | null;
|
|
205
205
|
|
|
206
|
+
/** One announced message in the station's schedule (DF055/DF056/DF057). */
|
|
207
|
+
interface SystemParamsMessage {
|
|
208
|
+
/** RTCM message type the station broadcasts. */
|
|
209
|
+
messageId: number;
|
|
210
|
+
/** Synchronous flag. */
|
|
211
|
+
sync: boolean;
|
|
212
|
+
/** Transmission interval (seconds; 0.1 s resolution per DF057). */
|
|
213
|
+
intervalS: number;
|
|
214
|
+
}
|
|
215
|
+
/** Decoded RTCM3 System Parameters (message 1013). */
|
|
216
|
+
interface SystemParams {
|
|
217
|
+
referenceStationId: number;
|
|
218
|
+
/** Modified Julian Day number of the reference epoch. */
|
|
219
|
+
mjd: number;
|
|
220
|
+
/** Seconds of day (UTC) of the reference epoch. */
|
|
221
|
+
secondsOfDay: number;
|
|
222
|
+
/** Current GPS−UTC leap seconds. */
|
|
223
|
+
leapSeconds: number;
|
|
224
|
+
/** The message types this station announces it transmits. */
|
|
225
|
+
messages: SystemParamsMessage[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Decode an RTCM3 System Parameters message (1013), or null for any other type
|
|
229
|
+
* or a short/corrupt frame.
|
|
230
|
+
*/
|
|
231
|
+
declare function decodeSystemParams(frame: Rtcm3Frame): SystemParams | null;
|
|
232
|
+
|
|
206
233
|
/**
|
|
207
234
|
* RTCM3 station metadata decoders (messages 1005/1006, 1007/1008, 1029, 1033).
|
|
208
235
|
*/
|
|
@@ -219,6 +246,7 @@ interface StationMeta {
|
|
|
219
246
|
receiverFirmware: string | null;
|
|
220
247
|
receiverSerial: string | null;
|
|
221
248
|
description: string | null;
|
|
249
|
+
physicalRefStationId: number | null;
|
|
222
250
|
}
|
|
223
251
|
declare function createStationMeta(): StationMeta;
|
|
224
252
|
/** Update station metadata from an RTCM3 frame. Returns true if the frame was a metadata message. */
|
|
@@ -275,4 +303,4 @@ declare function rtcm3Constellation(msgType: number): string | null;
|
|
|
275
303
|
declare function createStreamStats(): StreamStats;
|
|
276
304
|
declare function updateStreamStats(stats: StreamStats, frames: Rtcm3Frame[], rawBytes: number): void;
|
|
277
305
|
|
|
278
|
-
export { EphemerisInfo, type IgsSsrIonoLayer, type IgsSsrMessage, type MessageTypeStats, type MsmEpoch, type MsmSatObs, type MsmSignal, RTCM3_MESSAGE_NAMES, Rtcm3Frame, type SatCn0, type SignalCn0, type SsrCodeBias, type SsrKind, type SsrMessage, type SsrPhaseBias, type SsrSatCorrection, type StationMeta, type StreamStats, createStationMeta, createStreamStats, decodeIgsSsr, decodeLegacyObs, decodeMsmFull, decodeSsr, isSsrMessage, msmEpochToDate, resetGloFreqCache, rtcm3Constellation, setGloFreqNumber, updateStationMeta, updateStreamStats };
|
|
306
|
+
export { EphemerisInfo, type IgsSsrIonoLayer, type IgsSsrMessage, type MessageTypeStats, type MsmEpoch, type MsmSatObs, type MsmSignal, 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, decodeSsr, decodeSystemParams, isSsrMessage, msmEpochToDate, resetGloFreqCache, rtcm3Constellation, setGloFreqNumber, updateStationMeta, updateStreamStats };
|
package/dist/rtcm3.d.ts
CHANGED
|
@@ -203,6 +203,33 @@ declare function resetGloFreqCache(): void;
|
|
|
203
203
|
*/
|
|
204
204
|
declare function decodeLegacyObs(frame: Rtcm3Frame): MsmEpoch | null;
|
|
205
205
|
|
|
206
|
+
/** One announced message in the station's schedule (DF055/DF056/DF057). */
|
|
207
|
+
interface SystemParamsMessage {
|
|
208
|
+
/** RTCM message type the station broadcasts. */
|
|
209
|
+
messageId: number;
|
|
210
|
+
/** Synchronous flag. */
|
|
211
|
+
sync: boolean;
|
|
212
|
+
/** Transmission interval (seconds; 0.1 s resolution per DF057). */
|
|
213
|
+
intervalS: number;
|
|
214
|
+
}
|
|
215
|
+
/** Decoded RTCM3 System Parameters (message 1013). */
|
|
216
|
+
interface SystemParams {
|
|
217
|
+
referenceStationId: number;
|
|
218
|
+
/** Modified Julian Day number of the reference epoch. */
|
|
219
|
+
mjd: number;
|
|
220
|
+
/** Seconds of day (UTC) of the reference epoch. */
|
|
221
|
+
secondsOfDay: number;
|
|
222
|
+
/** Current GPS−UTC leap seconds. */
|
|
223
|
+
leapSeconds: number;
|
|
224
|
+
/** The message types this station announces it transmits. */
|
|
225
|
+
messages: SystemParamsMessage[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Decode an RTCM3 System Parameters message (1013), or null for any other type
|
|
229
|
+
* or a short/corrupt frame.
|
|
230
|
+
*/
|
|
231
|
+
declare function decodeSystemParams(frame: Rtcm3Frame): SystemParams | null;
|
|
232
|
+
|
|
206
233
|
/**
|
|
207
234
|
* RTCM3 station metadata decoders (messages 1005/1006, 1007/1008, 1029, 1033).
|
|
208
235
|
*/
|
|
@@ -219,6 +246,7 @@ interface StationMeta {
|
|
|
219
246
|
receiverFirmware: string | null;
|
|
220
247
|
receiverSerial: string | null;
|
|
221
248
|
description: string | null;
|
|
249
|
+
physicalRefStationId: number | null;
|
|
222
250
|
}
|
|
223
251
|
declare function createStationMeta(): StationMeta;
|
|
224
252
|
/** Update station metadata from an RTCM3 frame. Returns true if the frame was a metadata message. */
|
|
@@ -275,4 +303,4 @@ declare function rtcm3Constellation(msgType: number): string | null;
|
|
|
275
303
|
declare function createStreamStats(): StreamStats;
|
|
276
304
|
declare function updateStreamStats(stats: StreamStats, frames: Rtcm3Frame[], rawBytes: number): void;
|
|
277
305
|
|
|
278
|
-
export { EphemerisInfo, type IgsSsrIonoLayer, type IgsSsrMessage, type MessageTypeStats, type MsmEpoch, type MsmSatObs, type MsmSignal, RTCM3_MESSAGE_NAMES, Rtcm3Frame, type SatCn0, type SignalCn0, type SsrCodeBias, type SsrKind, type SsrMessage, type SsrPhaseBias, type SsrSatCorrection, type StationMeta, type StreamStats, createStationMeta, createStreamStats, decodeIgsSsr, decodeLegacyObs, decodeMsmFull, decodeSsr, isSsrMessage, msmEpochToDate, resetGloFreqCache, rtcm3Constellation, setGloFreqNumber, updateStationMeta, updateStreamStats };
|
|
306
|
+
export { EphemerisInfo, type IgsSsrIonoLayer, type IgsSsrMessage, type MessageTypeStats, type MsmEpoch, type MsmSatObs, type MsmSignal, 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, decodeSsr, decodeSystemParams, isSsrMessage, msmEpochToDate, resetGloFreqCache, rtcm3Constellation, setGloFreqNumber, updateStationMeta, updateStreamStats };
|
package/dist/rtcm3.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
decodeLegacyObs,
|
|
10
10
|
decodeMsmFull,
|
|
11
11
|
decodeSsr,
|
|
12
|
+
decodeSystemParams,
|
|
12
13
|
isSsrMessage,
|
|
13
14
|
msmEpochToDate,
|
|
14
15
|
readString,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
setRtcm3DebugHandler,
|
|
20
21
|
updateStationMeta,
|
|
21
22
|
updateStreamStats
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-REULRNJ5.js";
|
|
23
24
|
import "./chunk-HVXYFUCB.js";
|
|
24
25
|
import "./chunk-LEEU5OIO.js";
|
|
25
26
|
import "./chunk-FIEWO4J4.js";
|
|
@@ -34,6 +35,7 @@ export {
|
|
|
34
35
|
decodeLegacyObs,
|
|
35
36
|
decodeMsmFull,
|
|
36
37
|
decodeSsr,
|
|
38
|
+
decodeSystemParams,
|
|
37
39
|
isSsrMessage,
|
|
38
40
|
msmEpochToDate,
|
|
39
41
|
readString,
|
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": "1.
|
|
3
|
+
"version": "1.66.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;
|