gnss-js 1.24.0 → 1.26.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.
@@ -0,0 +1,147 @@
1
+ import { E as Ephemeris } from './nav-DImXUdbp.cjs';
2
+
3
+ /** One checksum-valid Trimble packet located in a byte stream. */
4
+ interface TrimbleFrame {
5
+ /** Offset of the STX byte. */
6
+ start: number;
7
+ /** STATUS byte. */
8
+ status: number;
9
+ /** Packet TYPE byte (e.g. 0x57 RAWDATA, 0x55 RETSVDATA). */
10
+ type: number;
11
+ /** DATA length in bytes. */
12
+ len: number;
13
+ /** Offset of the first DATA byte (i.e. `start + 4`). */
14
+ payload: number;
15
+ }
16
+ /**
17
+ * Iterate every checksum-valid Trimble packet in `data`. A prospective
18
+ * packet must end in ETX and match its checksum; otherwise the walker
19
+ * resyncs at the next byte and, for a checksum mismatch on an
20
+ * otherwise-well-formed packet, increments `stats.badChecksum`.
21
+ */
22
+ declare function trimbleFrames(data: Uint8Array, stats: {
23
+ badChecksum: number;
24
+ }): Generator<TrimbleFrame>;
25
+
26
+ /**
27
+ * Trimble RT17/RT27 navigation-message decoding: RETSVDATA (0x55)
28
+ * GPS ephemeris (subtype 1) and ION / UTC data (subtype 3).
29
+ *
30
+ * Ported field-for-field from RTKLIB's `src/rcv/rt17.c`
31
+ * (`decode_gps_ephemeris` / `decode_ion_utc_data`, tomojitakasu/RTKLIB,
32
+ * Copyright (C) 2014 D. A. Cook / T. Takasu, BSD-2-Clause). All scalar
33
+ * fields are big-endian; the semicircle angular/harmonic fields are
34
+ * scaled by π to radians, exactly as RTKLIB does.
35
+ *
36
+ * Output records mirror what `parseNavFile` produces for the equivalent
37
+ * RINEX 3 GPS navigation record and match the NovAtel/SBF ephemeris
38
+ * paths (Keplerian `tocDate` a GPS-scale Date, angles in radians).
39
+ *
40
+ * RTKLIB decodes only these two RETSVDATA subtypes; the GLONASS,
41
+ * Galileo, BeiDou and QZSS ephemeris/almanac subtypes are not handled
42
+ * here (see the module note in the package README / decoder report).
43
+ * This path is validated against synthetic records only: the DLF100
44
+ * ALLOY capture carried GLONASS/BeiDou subtypes but no GPS ephemeris.
45
+ */
46
+
47
+ interface TrimbleNavResult {
48
+ /** Broadcast ephemerides in stream order, duplicates suppressed. */
49
+ ephemerides: Ephemeris[];
50
+ /**
51
+ * Klobuchar coefficients from ION/UTC in the RINEX-header shape
52
+ * (`GPSA` = alpha0..3, `GPSB` = beta0..3), last message wins.
53
+ */
54
+ ionoCorrections: Record<string, number[]>;
55
+ /** GPS−UTC leap seconds (Δt_LS) from ION/UTC, null when unseen. */
56
+ leapSeconds: number | null;
57
+ /** RETSVDATA frame counts per subtype, for diagnostics. */
58
+ retsvCounts: Record<number, number>;
59
+ /** Frames whose checksum failed (corruption indicator). */
60
+ badChecksum: number;
61
+ }
62
+ /**
63
+ * Decode every RETSVDATA navigation message (GPS ephemeris, ION/UTC) in
64
+ * a Trimble binary byte stream. Repeated broadcasts of an unchanged GPS
65
+ * ephemeris are suppressed by issue of data (IODE), as RTKLIB does.
66
+ */
67
+ declare function parseTrimbleNav(data: Uint8Array): TrimbleNavResult;
68
+
69
+ /**
70
+ * Trimble RT27 raw-measurement decoding (RAWDATA 0x57, record type 27
71
+ * "Real-time GNSS survey data", the multi-constellation successor to
72
+ * the GPS-only RT17 record type 17).
73
+ *
74
+ * The stream framing and multi-page RAWDATA reassembly follow RTKLIB's
75
+ * `src/rcv/rt17.c` (see `./frame`). The record-27 payload itself is NOT
76
+ * decoded by RTKLIB (its `decode_rawdata` handles only record types 0
77
+ * and 7); the block layout here is taken from Trimble's published ICD,
78
+ * "Data record subtype 6: Real-time GNSS survey data (record type 27)"
79
+ * (receiverhelp.trimble.com/oem-gnss), and was verified byte-for-byte
80
+ * against a 60 s multi-GNSS capture from the TU Delft ALLOY mount
81
+ * DLF100NLD1: carrier phase reconstructs pseudorange to |L|·λ ≈ P for
82
+ * every signal and constellation, SNRs land in 30–48 dB-Hz, and the
83
+ * geostationary SBAS Doppler is ≈ 0 Hz.
84
+ *
85
+ * Record 27 is a chain of length-prefixed blocks. The epoch header
86
+ * carries the GPS week, receiver time (ms of week) and satellite count;
87
+ * each satellite has a variable-length header (system, PRN, GLONASS
88
+ * frequency channel, elevation/azimuth, flags) followed by one
89
+ * measurement block per tracked signal. The first block of a satellite
90
+ * carries a full pseudorange (U4, 2⁻⁷ m — 2⁻⁶ for SBAS/QZSS); later
91
+ * blocks carry a signed 2-byte difference to it (2⁻⁸ m). Carrier phase
92
+ * is a signed 6-byte field (2⁻¹⁵ cycles, negated for the RINEX sign
93
+ * like RTKLIB's record-17 path); Doppler, when flagged, is a signed
94
+ * 3-byte field (2⁻⁸ Hz). Output records mirror `parseNovatelRange`.
95
+ *
96
+ * An epoch that does not fit in one 15-page message overflows into a
97
+ * following message that shares the same reply id and carries no epoch
98
+ * header (pure satellite-block continuation); such messages are joined
99
+ * onto the epoch by reply id. This reply-run joining is an extension of
100
+ * RTKLIB's per-message model, driven by the DLF100 capture.
101
+ */
102
+
103
+ interface TrimbleMeasurement {
104
+ /** RINEX PRN, e.g. "G04", "R11", "E12", "C21", "S27". */
105
+ prn: string;
106
+ /** RINEX band+attribute, e.g. "1C", "2W", "5Q". */
107
+ code: string;
108
+ /** Pseudorange (m), null when the range is not loaded. */
109
+ pr: number | null;
110
+ /** Carrier phase (cycles, RINEX sign), null when phase is not loaded. */
111
+ cp: number | null;
112
+ /** Instantaneous Doppler (Hz), null when absent. */
113
+ doppler: number | null;
114
+ /** C/N0 (dB-Hz). */
115
+ cn0: number;
116
+ /** Rolling cycle-slip counter (0–255). */
117
+ cycleSlipCount: number;
118
+ /** True when the measurement's cycle-slip flag is set. */
119
+ cycleSlip: boolean;
120
+ /** GLONASS frequency channel k (−7…+6), null for CDMA systems. */
121
+ gloChannel: number | null;
122
+ }
123
+ interface TrimbleEpoch {
124
+ /** Epoch (GPS-scale ms — same convention as the RINEX parser). */
125
+ timeMs: number;
126
+ meas: TrimbleMeasurement[];
127
+ }
128
+ interface TrimbleParseResult {
129
+ epochs: TrimbleEpoch[];
130
+ /** Observation codes seen per system letter, in first-seen order. */
131
+ obsCodes: Record<string, string[]>;
132
+ /** RAWDATA frame counts per record type, for diagnostics. */
133
+ recordCounts: Record<number, number>;
134
+ /** RETSVDATA frame counts per subtype, for diagnostics. */
135
+ retsvCounts: Record<number, number>;
136
+ /** Frames whose checksum failed (corruption indicator). */
137
+ badChecksum: number;
138
+ }
139
+ /**
140
+ * Decode every RT27 (record type 27) measurement epoch in a Trimble
141
+ * binary byte stream. RETSVDATA and unsupported RAWDATA record types
142
+ * are counted and skipped. Navigation messages (ephemerides, ION/UTC)
143
+ * are decoded separately by {@link parseTrimbleNav}.
144
+ */
145
+ declare function parseTrimble(data: Uint8Array): TrimbleParseResult;
146
+
147
+ export { type TrimbleEpoch, type TrimbleFrame, type TrimbleMeasurement, type TrimbleNavResult, type TrimbleParseResult, parseTrimble, parseTrimbleNav, trimbleFrames };
@@ -0,0 +1,147 @@
1
+ import { E as Ephemeris } from './nav-DImXUdbp.js';
2
+
3
+ /** One checksum-valid Trimble packet located in a byte stream. */
4
+ interface TrimbleFrame {
5
+ /** Offset of the STX byte. */
6
+ start: number;
7
+ /** STATUS byte. */
8
+ status: number;
9
+ /** Packet TYPE byte (e.g. 0x57 RAWDATA, 0x55 RETSVDATA). */
10
+ type: number;
11
+ /** DATA length in bytes. */
12
+ len: number;
13
+ /** Offset of the first DATA byte (i.e. `start + 4`). */
14
+ payload: number;
15
+ }
16
+ /**
17
+ * Iterate every checksum-valid Trimble packet in `data`. A prospective
18
+ * packet must end in ETX and match its checksum; otherwise the walker
19
+ * resyncs at the next byte and, for a checksum mismatch on an
20
+ * otherwise-well-formed packet, increments `stats.badChecksum`.
21
+ */
22
+ declare function trimbleFrames(data: Uint8Array, stats: {
23
+ badChecksum: number;
24
+ }): Generator<TrimbleFrame>;
25
+
26
+ /**
27
+ * Trimble RT17/RT27 navigation-message decoding: RETSVDATA (0x55)
28
+ * GPS ephemeris (subtype 1) and ION / UTC data (subtype 3).
29
+ *
30
+ * Ported field-for-field from RTKLIB's `src/rcv/rt17.c`
31
+ * (`decode_gps_ephemeris` / `decode_ion_utc_data`, tomojitakasu/RTKLIB,
32
+ * Copyright (C) 2014 D. A. Cook / T. Takasu, BSD-2-Clause). All scalar
33
+ * fields are big-endian; the semicircle angular/harmonic fields are
34
+ * scaled by π to radians, exactly as RTKLIB does.
35
+ *
36
+ * Output records mirror what `parseNavFile` produces for the equivalent
37
+ * RINEX 3 GPS navigation record and match the NovAtel/SBF ephemeris
38
+ * paths (Keplerian `tocDate` a GPS-scale Date, angles in radians).
39
+ *
40
+ * RTKLIB decodes only these two RETSVDATA subtypes; the GLONASS,
41
+ * Galileo, BeiDou and QZSS ephemeris/almanac subtypes are not handled
42
+ * here (see the module note in the package README / decoder report).
43
+ * This path is validated against synthetic records only: the DLF100
44
+ * ALLOY capture carried GLONASS/BeiDou subtypes but no GPS ephemeris.
45
+ */
46
+
47
+ interface TrimbleNavResult {
48
+ /** Broadcast ephemerides in stream order, duplicates suppressed. */
49
+ ephemerides: Ephemeris[];
50
+ /**
51
+ * Klobuchar coefficients from ION/UTC in the RINEX-header shape
52
+ * (`GPSA` = alpha0..3, `GPSB` = beta0..3), last message wins.
53
+ */
54
+ ionoCorrections: Record<string, number[]>;
55
+ /** GPS−UTC leap seconds (Δt_LS) from ION/UTC, null when unseen. */
56
+ leapSeconds: number | null;
57
+ /** RETSVDATA frame counts per subtype, for diagnostics. */
58
+ retsvCounts: Record<number, number>;
59
+ /** Frames whose checksum failed (corruption indicator). */
60
+ badChecksum: number;
61
+ }
62
+ /**
63
+ * Decode every RETSVDATA navigation message (GPS ephemeris, ION/UTC) in
64
+ * a Trimble binary byte stream. Repeated broadcasts of an unchanged GPS
65
+ * ephemeris are suppressed by issue of data (IODE), as RTKLIB does.
66
+ */
67
+ declare function parseTrimbleNav(data: Uint8Array): TrimbleNavResult;
68
+
69
+ /**
70
+ * Trimble RT27 raw-measurement decoding (RAWDATA 0x57, record type 27
71
+ * "Real-time GNSS survey data", the multi-constellation successor to
72
+ * the GPS-only RT17 record type 17).
73
+ *
74
+ * The stream framing and multi-page RAWDATA reassembly follow RTKLIB's
75
+ * `src/rcv/rt17.c` (see `./frame`). The record-27 payload itself is NOT
76
+ * decoded by RTKLIB (its `decode_rawdata` handles only record types 0
77
+ * and 7); the block layout here is taken from Trimble's published ICD,
78
+ * "Data record subtype 6: Real-time GNSS survey data (record type 27)"
79
+ * (receiverhelp.trimble.com/oem-gnss), and was verified byte-for-byte
80
+ * against a 60 s multi-GNSS capture from the TU Delft ALLOY mount
81
+ * DLF100NLD1: carrier phase reconstructs pseudorange to |L|·λ ≈ P for
82
+ * every signal and constellation, SNRs land in 30–48 dB-Hz, and the
83
+ * geostationary SBAS Doppler is ≈ 0 Hz.
84
+ *
85
+ * Record 27 is a chain of length-prefixed blocks. The epoch header
86
+ * carries the GPS week, receiver time (ms of week) and satellite count;
87
+ * each satellite has a variable-length header (system, PRN, GLONASS
88
+ * frequency channel, elevation/azimuth, flags) followed by one
89
+ * measurement block per tracked signal. The first block of a satellite
90
+ * carries a full pseudorange (U4, 2⁻⁷ m — 2⁻⁶ for SBAS/QZSS); later
91
+ * blocks carry a signed 2-byte difference to it (2⁻⁸ m). Carrier phase
92
+ * is a signed 6-byte field (2⁻¹⁵ cycles, negated for the RINEX sign
93
+ * like RTKLIB's record-17 path); Doppler, when flagged, is a signed
94
+ * 3-byte field (2⁻⁸ Hz). Output records mirror `parseNovatelRange`.
95
+ *
96
+ * An epoch that does not fit in one 15-page message overflows into a
97
+ * following message that shares the same reply id and carries no epoch
98
+ * header (pure satellite-block continuation); such messages are joined
99
+ * onto the epoch by reply id. This reply-run joining is an extension of
100
+ * RTKLIB's per-message model, driven by the DLF100 capture.
101
+ */
102
+
103
+ interface TrimbleMeasurement {
104
+ /** RINEX PRN, e.g. "G04", "R11", "E12", "C21", "S27". */
105
+ prn: string;
106
+ /** RINEX band+attribute, e.g. "1C", "2W", "5Q". */
107
+ code: string;
108
+ /** Pseudorange (m), null when the range is not loaded. */
109
+ pr: number | null;
110
+ /** Carrier phase (cycles, RINEX sign), null when phase is not loaded. */
111
+ cp: number | null;
112
+ /** Instantaneous Doppler (Hz), null when absent. */
113
+ doppler: number | null;
114
+ /** C/N0 (dB-Hz). */
115
+ cn0: number;
116
+ /** Rolling cycle-slip counter (0–255). */
117
+ cycleSlipCount: number;
118
+ /** True when the measurement's cycle-slip flag is set. */
119
+ cycleSlip: boolean;
120
+ /** GLONASS frequency channel k (−7…+6), null for CDMA systems. */
121
+ gloChannel: number | null;
122
+ }
123
+ interface TrimbleEpoch {
124
+ /** Epoch (GPS-scale ms — same convention as the RINEX parser). */
125
+ timeMs: number;
126
+ meas: TrimbleMeasurement[];
127
+ }
128
+ interface TrimbleParseResult {
129
+ epochs: TrimbleEpoch[];
130
+ /** Observation codes seen per system letter, in first-seen order. */
131
+ obsCodes: Record<string, string[]>;
132
+ /** RAWDATA frame counts per record type, for diagnostics. */
133
+ recordCounts: Record<number, number>;
134
+ /** RETSVDATA frame counts per subtype, for diagnostics. */
135
+ retsvCounts: Record<number, number>;
136
+ /** Frames whose checksum failed (corruption indicator). */
137
+ badChecksum: number;
138
+ }
139
+ /**
140
+ * Decode every RT27 (record type 27) measurement epoch in a Trimble
141
+ * binary byte stream. RETSVDATA and unsupported RAWDATA record types
142
+ * are counted and skipped. Navigation messages (ephemerides, ION/UTC)
143
+ * are decoded separately by {@link parseTrimbleNav}.
144
+ */
145
+ declare function parseTrimble(data: Uint8Array): TrimbleParseResult;
146
+
147
+ export { type TrimbleEpoch, type TrimbleFrame, type TrimbleMeasurement, type TrimbleNavResult, type TrimbleParseResult, parseTrimble, parseTrimbleNav, trimbleFrames };
@@ -0,0 +1,10 @@
1
+ import {
2
+ parseTrimble,
3
+ parseTrimbleNav,
4
+ trimbleFrames
5
+ } from "./chunk-CKRNXZHT.js";
6
+ export {
7
+ parseTrimble,
8
+ parseTrimbleNav,
9
+ trimbleFrames
10
+ };
package/dist/ubx.js CHANGED
@@ -5,9 +5,10 @@ import {
5
5
  parseUbxRawNav,
6
6
  parseUbxRawx,
7
7
  ubxFrames
8
- } from "./chunk-MCAVU3XL.js";
9
- import "./chunk-VTX3VCL4.js";
10
- import "./chunk-WZDFZ76K.js";
8
+ } from "./chunk-FEOMYZEU.js";
9
+ import "./chunk-5AUK42AL.js";
10
+ import "./chunk-726LQBGM.js";
11
+ import "./chunk-IQ5OIMQD.js";
11
12
  import "./chunk-HVXYFUCB.js";
12
13
  import "./chunk-LEEU5OIO.js";
13
14
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.24.0",
3
+ "version": "1.26.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,
@@ -45,6 +45,16 @@
45
45
  "import": "./dist/sbf.js",
46
46
  "require": "./dist/sbf.cjs"
47
47
  },
48
+ "./trimble": {
49
+ "types": "./dist/trimble.d.ts",
50
+ "import": "./dist/trimble.js",
51
+ "require": "./dist/trimble.cjs"
52
+ },
53
+ "./binex": {
54
+ "types": "./dist/binex.d.ts",
55
+ "import": "./dist/binex.js",
56
+ "require": "./dist/binex.cjs"
57
+ },
48
58
  "./rtcm3": {
49
59
  "types": "./dist/rtcm3.d.ts",
50
60
  "import": "./dist/rtcm3.js",