gnss-js 2.9.0 → 2.10.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/rtcm3.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { b as Rtcm3Frame, E as EphemerisInfo } from './ephemeris-BAnBLLB9.js';
2
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
+ import { a as ObsEpoch, O as ObsDecodeOptions } from './msm-CcQJV3PC.js';
4
+ export { b as ObsSatObs, c as ObsSignal, d as decodeMsmFull, o as obsEpochToDate, r as resetGloFreqCache, s as setGloFreqNumber } from './msm-CcQJV3PC.js';
3
5
 
4
6
  /** One code bias for a specific signal (DF380/DF381 + DF383). */
5
7
  interface SsrCodeBias {
@@ -116,91 +118,6 @@ interface IgsSsrIonoLayer {
116
118
  */
117
119
  declare function decodeIgsSsr(frame: Rtcm3Frame): IgsSsrMessage | null;
118
120
 
119
- /**
120
- * Full RTCM3 MSM4-7 decoder — extracts pseudorange, carrier phase,
121
- * Doppler, and C/N0 for every satellite × signal cell.
122
- *
123
- * Reference: BNC 2.13.4 RTCM3Decoder.cpp (BKG) and RTCM 10403.3 §3.5.
124
- *
125
- * Only MSM types 4-7 are decoded (full data). Types 1-3 carry partial
126
- * data and are skipped.
127
- */
128
-
129
- /** Single signal observation for one satellite */
130
- interface ObsSignal {
131
- /** RINEX 2-char obs code, e.g. "1C", "5X" */
132
- rinexCode: string;
133
- /** Pseudorange in meters (undefined if invalid) */
134
- pseudorange?: number;
135
- /** Carrier phase in cycles (undefined if invalid) */
136
- phase?: number;
137
- /** Doppler in Hz (undefined if invalid) */
138
- doppler?: number;
139
- /** Signal-to-noise ratio in dB-Hz */
140
- cn0?: number;
141
- /** Lock time in seconds */
142
- lockTime?: number;
143
- /** Half-cycle ambiguity indicator */
144
- halfCycle?: boolean;
145
- /** Wavelength used (meters) — needed for RINEX phase */
146
- wavelength: number;
147
- }
148
- /** All observations for one satellite in one epoch */
149
- interface ObsSatObs {
150
- /** PRN string, e.g. "G01", "R15", "E04" */
151
- prn: string;
152
- /** System letter: G, R, E, C, J, I, S */
153
- system: string;
154
- /** Signal observations */
155
- signals: ObsSignal[];
156
- }
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 {
163
- /** Message type (1074, 1077, etc.) */
164
- messageType: number;
165
- /** Epoch time as GPS milliseconds of week (or GLONASS day-of-week ms, BDS SOW) */
166
- epochMs: number;
167
- /** System letter */
168
- system: string;
169
- /** Observations per satellite */
170
- observations: ObsSatObs[];
171
- }
172
- /**
173
- * Decode a single RTCM3 MSM4-7 frame into full observations.
174
- * Returns null for non-MSM or MSM1-3 frames.
175
- */
176
- declare function decodeMsmFull(frame: Rtcm3Frame): ObsEpoch | null;
177
- /**
178
- * Convert an observation epoch timestamp to a Date.
179
- * For GPS/Galileo/BDS/QZSS: epochMs is ms of GPS week.
180
- * For GLONASS: epochMs is day-of-week × 86400000 + ms of day (UTC+3).
181
- *
182
- * Requires an approximate reference time to resolve the current week.
183
- */
184
- /**
185
- * NOTE: returns a GPS-scale Date — the clock-face convention used by
186
- * the RINEX parser and every consumer of epoch milliseconds in this
187
- * library (satellite propagation, SPP, RINEX epoch tags). It is NOT
188
- * UTC: converting to UTC here put every downstream satellite position
189
- * 18 s (the current leap-second count) off — a ±14 km per-satellite
190
- * range error that scattered live SPP solutions by kilometres.
191
- */
192
- declare function obsEpochToDate(sys: string, epochMs: number, refTime?: Date): Date;
193
- /**
194
- * Set a GLONASS FDMA frequency number (k = -7..+13) for a slot (1-24),
195
- * e.g. from a decoded 1020 ephemeris. MSM4/6 carry no DF419, so without
196
- * this the wavelength — and hence carrier phase — stays unknown.
197
- */
198
- declare function setGloFreqNumber(slot: number, k: number): void;
199
- /**
200
- * Reset the GLONASS frequency number cache (e.g., when switching mountpoints).
201
- */
202
- declare function resetGloFreqCache(): void;
203
-
204
121
  /**
205
122
  * Decode a legacy RTCM3 observation frame (1001–1004 GPS, 1009–1012 GLONASS)
206
123
  * into an {@link ObsEpoch}, or null for any other message type.
@@ -208,13 +125,14 @@ declare function resetGloFreqCache(): void;
208
125
  declare function decodeLegacyObs(frame: Rtcm3Frame): ObsEpoch | null;
209
126
  /**
210
127
  * Decode any RTCM3 observation frame into an {@link ObsEpoch}: MSM4–7 first
211
- * ({@link decodeMsmFull}), then the legacy fixed-layout obs (1001–1004 GPS,
128
+ * ({@link decodeMsmFull}; MSM1–3 too with `opts.compactMsm` — resolve those
129
+ * with `resolveMsmRanges` before use), then the legacy fixed-layout obs (1001–1004 GPS,
212
130
  * 1009–1012 GLONASS) via {@link decodeLegacyObs}. Returns null for any
213
131
  * non-observation message. This is the single obs entry point every consumer
214
132
  * (stream stats, live SPP/QC/RTK, station monitor) should call, so a new obs
215
133
  * source is added here once rather than at every call site.
216
134
  */
217
- declare function decodeObs(frame: Rtcm3Frame): ObsEpoch | null;
135
+ declare function decodeObs(frame: Rtcm3Frame, opts?: ObsDecodeOptions): ObsEpoch | null;
218
136
 
219
137
  /** One announced message in the station's schedule (DF055/DF056/DF057). */
220
138
  interface SystemParamsMessage {
@@ -319,4 +237,4 @@ declare function rtcm3Constellation(msgType: number): string | null;
319
237
  declare function createStreamStats(): StreamStats;
320
238
  declare function updateStreamStats(stats: StreamStats, frames: Rtcm3Frame[], rawBytes: number): void;
321
239
 
322
- 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 };
240
+ export { EphemerisInfo, type IgsSsrIonoLayer, type IgsSsrMessage, type MessageTypeStats, ObsDecodeOptions, ObsEpoch, 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, decodeObs, decodeSsr, decodeSystemParams, isSsrMessage, rtcm3Constellation, updateStationMeta, updateStreamStats };
package/dist/rtcm3.js CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  setRtcm3DebugHandler,
22
22
  updateStationMeta,
23
23
  updateStreamStats
24
- } from "./chunk-7GNRNKBR.js";
24
+ } from "./chunk-N6GQUHM4.js";
25
25
  import "./chunk-HVXYFUCB.js";
26
26
  import "./chunk-LEEU5OIO.js";
27
27
  import "./chunk-FIEWO4J4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "2.9.0",
3
+ "version": "2.10.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,