gnss-js 1.19.0 → 1.21.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/index.d.cts CHANGED
@@ -10,9 +10,9 @@ export { C as CnavEphemeris, E as Ephemeris, G as GlonassEphemeris, K as KeplerE
10
10
  export { B as BitReader, E as EphemerisInfo, R as Rtcm3DebugHandler, a as Rtcm3Decoder, b as Rtcm3Frame, d as decodeEphemeris, r as readString, c as reportDecodeError, s as setRtcm3DebugHandler } from './ephemeris-Ohl6NAfw.cjs';
11
11
  export { MessageTypeStats, MsmEpoch, MsmSatObs, MsmSignal, RTCM3_MESSAGE_NAMES, SatCn0, SignalCn0, StationMeta, StreamStats, createStationMeta, createStreamStats, decodeMsmFull, msmEpochToDate, resetGloFreqCache, rtcm3Constellation, setGloFreqNumber, updateStationMeta, updateStreamStats } from './rtcm3.cjs';
12
12
  export { UbxCnavResult, UbxFrame, UbxIonoUtcResult, UbxMeasurement, UbxNavOptions, UbxNavResult, UbxParseResult, UbxRawxEpoch, parseUbxCnav, parseUbxIonoUtc, parseUbxNav, parseUbxRawx, ubxFrames } from './ubx.cjs';
13
- export { SbfAlmanac, SbfAlmanacResult, SbfCnavEphemeris, SbfCnavResult, SbfGlonassAlmanac, SbfIonoUtcResult, SbfKeplerAlmanac, SbfMeasEpoch, SbfMeasurement, SbfNavResult, SbfParseResult, parseSbfAlmanac, parseSbfCnav, parseSbfIonoUtc, parseSbfMeas, parseSbfNav, sbfCrc16, scanSbfFrames } from './sbf.cjs';
13
+ export { HasMessage, SbfBdsNavResult, SbfCnavEphemeris, SbfCnavResult, SbfGalEphemeris, SbfGalNavResult, SbfGloNavResult, SbfHasMessage, SbfHasResult, SbfIonoUtcResult, SbfMeasEpoch, SbfMeasurement, SbfParseResult, parseSbfBdsNav, parseSbfCnav, parseSbfGalNav, parseSbfGloNav, parseSbfHas, parseSbfIonoUtc, parseSbfMeas, sbfCrc16, scanSbfFrames } from './sbf.cjs';
14
14
  export { NovatelEpoch, NovatelMeasurement, NovatelNavResult, NovatelParseResult, OEM4_HLEN, Oem4Frame, crc32, oem4Frames, parseNovatelNav, parseNovatelRange } from './novatel.cjs';
15
- export { AllPositionsData, DopValues, EpochSkyData, SatAzEl, SatPoint, SatPosition, VisibilityPass, VisibilityResult, computeAllPositions, computeDop, computeLiveSkyPositions, computeSatPosition, computeVisibility, computeVisibilityFromPositions, dopplerHz, ecefToAzEl, ephInfoToEphemeris, glonassPosition, keplerPosition, maskRadForAzimuth, navTimesFromEph, rangeRate, selectEphemeris } from './orbit.cjs';
15
+ export { AllPositionsData, AlmanacPosition, DopValues, EpochSkyData, SatAzEl, SatPoint, SatPosition, VisibilityPass, VisibilityResult, almanacEpochMs, almanacSatPosition, computeAllPositions, computeDop, computeLiveSkyPositions, computeSatPosition, computeVisibility, computeVisibilityFromPositions, dopplerHz, ecefToAzEl, ephInfoToEphemeris, glonassAlmanacEpochMs, glonassAlmanacPosition, glonassPosition, keplerPosition, maskRadForAzimuth, navTimesFromEph, rangeRate, selectEphemeris } from './orbit.cjs';
16
16
  export { Helmert14, REFERENCE_FRAMES, ReferenceFrame, applyHelmert, dateToEpoch, transformFrame } from './frames.cjs';
17
17
  export { KlobucharCoeffs, SppOptions, SppSolution, ionoFree, klobucharDelay, satClockCorrection, solveSpp } from './positioning.cjs';
18
18
  export { NtripCaster, NtripConnectionInfo, NtripNetwork, NtripStream, NtripStreamConnection, NtripVersion, Sourcetable, SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable } from './ntrip.cjs';
@@ -20,3 +20,4 @@ export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, Comple
20
20
  export { AntennaEntry, AntexFile, FrequencyData, frequencyLabel, parseAntex } from './antex.cjs';
21
21
  export { NmeaFix, NmeaStats, NmeaTrack, computeStats, nmeaCoordToDecimal, parseNmeaFile, verifyChecksum } from './nmea.cjs';
22
22
  export { BAND_PRESETS, BandPreset, CONSTELLATIONS, ConstellationRow, DELTA_GLO_L1, DELTA_GLO_L2, FREQ_BDS_B1A, FREQ_BDS_B1C, FREQ_BDS_B1I, FREQ_BDS_B2I, FREQ_BDS_B3A, FREQ_BDS_B3I, FREQ_GAL_E1, FREQ_GAL_E5, FREQ_GAL_E5a, FREQ_GAL_E5b, FREQ_GAL_E6, FREQ_GLO_L1, FREQ_GLO_L1OC, FREQ_GLO_L2, FREQ_GLO_L2OC, FREQ_GLO_L3OC, FREQ_GPS_L1, FREQ_GPS_L2, FREQ_GPS_L5, FREQ_NAVIC_L5, FREQ_QZS_L1, FREQ_QZS_L2, FREQ_QZS_L5, FREQ_QZS_L6, Modulation, SignalDef, computePsdDb, phiAltBOC, phiBOCc, phiBOCs, phiBPSK } from './signals.cjs';
23
+ 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';
package/dist/index.d.ts CHANGED
@@ -10,9 +10,9 @@ export { C as CnavEphemeris, E as Ephemeris, G as GlonassEphemeris, K as KeplerE
10
10
  export { B as BitReader, E as EphemerisInfo, R as Rtcm3DebugHandler, a as Rtcm3Decoder, b as Rtcm3Frame, d as decodeEphemeris, r as readString, c as reportDecodeError, s as setRtcm3DebugHandler } from './ephemeris-Ohl6NAfw.js';
11
11
  export { MessageTypeStats, MsmEpoch, MsmSatObs, MsmSignal, RTCM3_MESSAGE_NAMES, SatCn0, SignalCn0, StationMeta, StreamStats, createStationMeta, createStreamStats, decodeMsmFull, msmEpochToDate, resetGloFreqCache, rtcm3Constellation, setGloFreqNumber, updateStationMeta, updateStreamStats } from './rtcm3.js';
12
12
  export { UbxCnavResult, UbxFrame, UbxIonoUtcResult, UbxMeasurement, UbxNavOptions, UbxNavResult, UbxParseResult, UbxRawxEpoch, parseUbxCnav, parseUbxIonoUtc, parseUbxNav, parseUbxRawx, ubxFrames } from './ubx.js';
13
- export { SbfAlmanac, SbfAlmanacResult, SbfCnavEphemeris, SbfCnavResult, SbfGlonassAlmanac, SbfIonoUtcResult, SbfKeplerAlmanac, SbfMeasEpoch, SbfMeasurement, SbfNavResult, SbfParseResult, parseSbfAlmanac, parseSbfCnav, parseSbfIonoUtc, parseSbfMeas, parseSbfNav, sbfCrc16, scanSbfFrames } from './sbf.js';
13
+ export { HasMessage, SbfBdsNavResult, SbfCnavEphemeris, SbfCnavResult, SbfGalEphemeris, SbfGalNavResult, SbfGloNavResult, SbfHasMessage, SbfHasResult, SbfIonoUtcResult, SbfMeasEpoch, SbfMeasurement, SbfParseResult, parseSbfBdsNav, parseSbfCnav, parseSbfGalNav, parseSbfGloNav, parseSbfHas, parseSbfIonoUtc, parseSbfMeas, sbfCrc16, scanSbfFrames } from './sbf.js';
14
14
  export { NovatelEpoch, NovatelMeasurement, NovatelNavResult, NovatelParseResult, OEM4_HLEN, Oem4Frame, crc32, oem4Frames, parseNovatelNav, parseNovatelRange } from './novatel.js';
15
- export { AllPositionsData, DopValues, EpochSkyData, SatAzEl, SatPoint, SatPosition, VisibilityPass, VisibilityResult, computeAllPositions, computeDop, computeLiveSkyPositions, computeSatPosition, computeVisibility, computeVisibilityFromPositions, dopplerHz, ecefToAzEl, ephInfoToEphemeris, glonassPosition, keplerPosition, maskRadForAzimuth, navTimesFromEph, rangeRate, selectEphemeris } from './orbit.js';
15
+ export { AllPositionsData, AlmanacPosition, DopValues, EpochSkyData, SatAzEl, SatPoint, SatPosition, VisibilityPass, VisibilityResult, almanacEpochMs, almanacSatPosition, computeAllPositions, computeDop, computeLiveSkyPositions, computeSatPosition, computeVisibility, computeVisibilityFromPositions, dopplerHz, ecefToAzEl, ephInfoToEphemeris, glonassAlmanacEpochMs, glonassAlmanacPosition, glonassPosition, keplerPosition, maskRadForAzimuth, navTimesFromEph, rangeRate, selectEphemeris } from './orbit.js';
16
16
  export { Helmert14, REFERENCE_FRAMES, ReferenceFrame, applyHelmert, dateToEpoch, transformFrame } from './frames.js';
17
17
  export { KlobucharCoeffs, SppOptions, SppSolution, ionoFree, klobucharDelay, satClockCorrection, solveSpp } from './positioning.js';
18
18
  export { NtripCaster, NtripConnectionInfo, NtripNetwork, NtripStream, NtripStreamConnection, NtripVersion, Sourcetable, SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable } from './ntrip.js';
@@ -20,3 +20,4 @@ export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, Comple
20
20
  export { AntennaEntry, AntexFile, FrequencyData, frequencyLabel, parseAntex } from './antex.js';
21
21
  export { NmeaFix, NmeaStats, NmeaTrack, computeStats, nmeaCoordToDecimal, parseNmeaFile, verifyChecksum } from './nmea.js';
22
22
  export { BAND_PRESETS, BandPreset, CONSTELLATIONS, ConstellationRow, DELTA_GLO_L1, DELTA_GLO_L2, FREQ_BDS_B1A, FREQ_BDS_B1C, FREQ_BDS_B1I, FREQ_BDS_B2I, FREQ_BDS_B3A, FREQ_BDS_B3I, FREQ_GAL_E1, FREQ_GAL_E5, FREQ_GAL_E5a, FREQ_GAL_E5b, FREQ_GAL_E6, FREQ_GLO_L1, FREQ_GLO_L1OC, FREQ_GLO_L2, FREQ_GLO_L2OC, FREQ_GLO_L3OC, FREQ_GPS_L1, FREQ_GPS_L2, FREQ_GPS_L5, FREQ_NAVIC_L5, FREQ_QZS_L1, FREQ_QZS_L2, FREQ_QZS_L5, FREQ_QZS_L6, Modulation, SignalDef, computePsdDb, phiAltBOC, phiBOCc, phiBOCs, phiBPSK } from './signals.js';
23
+ 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';
package/dist/index.js CHANGED
@@ -39,23 +39,27 @@ import {
39
39
  parseUbxNav,
40
40
  parseUbxRawx,
41
41
  ubxFrames
42
- } from "./chunk-JW2ICDR7.js";
42
+ } from "./chunk-DLXTTHRK.js";
43
43
  import {
44
44
  crc16,
45
45
  parseSbfAlmanac,
46
+ parseSbfBdsNav,
46
47
  parseSbfCnav,
48
+ parseSbfGalNav,
49
+ parseSbfGloNav,
50
+ parseSbfHas,
47
51
  parseSbfIonoUtc,
48
52
  parseSbfMeas,
49
53
  parseSbfNav,
50
54
  scanSbfFrames
51
- } from "./chunk-5S5HMAKW.js";
55
+ } from "./chunk-K3V3NHWL.js";
52
56
  import {
53
57
  OEM4_HLEN,
54
58
  crc32,
55
59
  oem4Frames,
56
60
  parseNovatelNav,
57
61
  parseNovatelRange
58
- } from "./chunk-2IM5VXNI.js";
62
+ } from "./chunk-7RKLWE6R.js";
59
63
  import {
60
64
  connectToMountpoint,
61
65
  fetchSourcetable,
@@ -126,8 +130,10 @@ import {
126
130
  klobucharDelay,
127
131
  satClockCorrection,
128
132
  solveSpp
129
- } from "./chunk-QXZZNXE3.js";
133
+ } from "./chunk-B5LU4746.js";
130
134
  import {
135
+ almanacEpochMs,
136
+ almanacSatPosition,
131
137
  computeAllPositions,
132
138
  computeDop,
133
139
  computeLiveSkyPositions,
@@ -137,13 +143,15 @@ import {
137
143
  dopplerHz,
138
144
  ecefToAzEl,
139
145
  ephInfoToEphemeris,
146
+ glonassAlmanacEpochMs,
147
+ glonassAlmanacPosition,
140
148
  glonassPosition,
141
149
  keplerPosition,
142
150
  maskRadForAzimuth,
143
151
  navTimesFromEph,
144
152
  rangeRate,
145
153
  selectEphemeris
146
- } from "./chunk-OMVL3X7V.js";
154
+ } from "./chunk-JNFV5BYB.js";
147
155
  import {
148
156
  clampUnit,
149
157
  ecefToGeodetic,
@@ -178,9 +186,8 @@ import {
178
186
  writeRinexNav,
179
187
  writeRinexNav4,
180
188
  writeRinexObsBlob
181
- } from "./chunk-K73SERD5.js";
182
- import "./chunk-6NCMACDO.js";
183
- import "./chunk-IQ5OIMQD.js";
189
+ } from "./chunk-NOQAAUGY.js";
190
+ import "./chunk-WZDFZ76K.js";
184
191
  import {
185
192
  SYSTEM_ORDER,
186
193
  crxDecompress,
@@ -376,6 +383,8 @@ export {
376
383
  WGS84_SEMI_MAJOR_AXIS,
377
384
  WGS84_SEMI_MINOR_AXIS,
378
385
  WarningAccumulator,
386
+ almanacEpochMs,
387
+ almanacSatPosition,
379
388
  analyzeQuality,
380
389
  applyHelmert,
381
390
  applyIonoDcb,
@@ -472,6 +481,8 @@ export {
472
481
  getWeekNumber,
473
482
  getWeekOfYear,
474
483
  gloFreq,
484
+ glonassAlmanacEpochMs,
485
+ glonassAlmanacPosition,
475
486
  glonassPosition,
476
487
  greatCircleMidpoint,
477
488
  hdrLine,
@@ -495,7 +506,11 @@ export {
495
506
  parseNovatelRange,
496
507
  parseRinexStream,
497
508
  parseSbfAlmanac,
509
+ parseSbfBdsNav,
498
510
  parseSbfCnav,
511
+ parseSbfGalNav,
512
+ parseSbfGloNav,
513
+ parseSbfHas,
499
514
  parseSbfIonoUtc,
500
515
  parseSbfMeas,
501
516
  parseSbfNav,
@@ -0,0 +1,137 @@
1
+ import { E as Ephemeris } from './nav-DImXUdbp.cjs';
2
+
3
+ /**
4
+ * Septentrio SBF decoded navigation and almanac blocks.
5
+ *
6
+ * Nav blocks (GPSNav 5891, GLONav 4004, GALNav 4002, BDSNav 4081,
7
+ * QZSNav 4095) carry the fully decoded broadcast ephemeris; they are
8
+ * mapped onto the same `Ephemeris` union the RINEX nav parser produces,
9
+ * with identical units and conventions (sqrtA in m^1/2, angles in rad,
10
+ * semicircle fields scaled by π, GLONASS tauN with the RINEX sign, BDS
11
+ * epochs/weeks on the BDT scale like a RINEX file).
12
+ *
13
+ * Almanac blocks (GPSAlm 5892, GALAlm 4003, GLOAlm 4005, BDSAlm 4119)
14
+ * are decoded into dedicated types with all per-system relative fields
15
+ * (GPS/BDS δi, Galileo δi and ΔsqrtA) normalized to absolute values.
16
+ *
17
+ * Ported from RTKLIB demo5 (rtklibexplorer), src/rcv/septentrio.c
18
+ * (decode_gpsnav / decode_glonav / decode_galnav / decode_cmpnav /
19
+ * decode_qzssnav / decode_gpsalm / decode_galalm / decode_cmpalm),
20
+ * BSD-2-Clause, and cross-checked field by field against the Septentrio
21
+ * mosaic-X5 reference guide, which also supplies the GLOAlm layout
22
+ * (not decoded by RTKLIB).
23
+ */
24
+
25
+ interface SbfNavResult {
26
+ ephemerides: Ephemeris[];
27
+ /** Frames whose CRC failed (corruption indicator). */
28
+ badCrc: number;
29
+ }
30
+ /**
31
+ * Decode every GPSNav/GLONav/GALNav/BDSNav/QZSNav block in an SBF byte
32
+ * stream into the RINEX-parser `Ephemeris` union. Every block is
33
+ * emitted (no issue-of-data dedup); other block types are skipped.
34
+ */
35
+ declare function parseSbfNav(data: Uint8Array): SbfNavResult;
36
+ /**
37
+ * GPS / Galileo / BeiDou almanac, normalized to ABSOLUTE Keplerian
38
+ * elements (units matching `KeplerEphemeris`: sqrtA in m^1/2, angles
39
+ * in rad, rates in rad/s) so a Kepler propagator can consume the
40
+ * record directly with all correction terms at zero.
41
+ *
42
+ * Normalizations applied per system:
43
+ * - GPS (`G`): the SIS δi (relative to 0.3 semicircles) is folded in —
44
+ * `i0OrDeltaI` = 0.3π + δi·π. `weekAlm` is the full GPS week
45
+ * (8-bit SIS week disambiguated against the receiver week).
46
+ * - Galileo (`E`): the SIS ΔsqrtA (relative to √29 600 000 m^1/2) and
47
+ * δi (relative to 56°) are folded in — `sqrtA` and `i0OrDeltaI` are
48
+ * absolute. `weekAlm` is the full GPS-aligned week (2-bit SIS week
49
+ * disambiguated). `health` is the raw SBF bit field: bit 0 set ⇒
50
+ * bits 1-2 are the L1-B HS, bit 3 set ⇒ bits 4-5 E5b HS, bit 6 set
51
+ * ⇒ bits 7-8 E5a HS (0 = healthy).
52
+ * - BeiDou (`C`): δi is relative to 0.3 semicircles for MEO/IGSO and
53
+ * to 0 for GEO satellites (PRN 1-5 and 59-63) per the BDS ICD; the
54
+ * reference is folded in. `weekAlm` is the full BDS week (add 1356
55
+ * for the GPS week) and `toaSec` is BDT seconds of week
56
+ * (BDT = GPST − 14 s). `health` is the 9-bit SIS health word.
57
+ */
58
+ interface SbfKeplerAlmanac {
59
+ system: 'G' | 'E' | 'C';
60
+ /** Satellite PRN, e.g. "G14". */
61
+ prn: string;
62
+ /** Full almanac reference week (see per-system notes above). */
63
+ weekAlm: number;
64
+ /** Almanac reference time of week in seconds (system time scale). */
65
+ toaSec: number;
66
+ /** Square root of semi-major axis in m^(1/2), absolute. */
67
+ sqrtA: number;
68
+ /** Eccentricity (dimensionless). */
69
+ e: number;
70
+ /** Inclination at reference time in rad, absolute (normalized). */
71
+ i0OrDeltaI: number;
72
+ /** Longitude of ascending node at the weekly epoch in rad. */
73
+ omega0: number;
74
+ /** Argument of perigee in rad. */
75
+ omega: number;
76
+ /** Mean anomaly at reference time in rad. */
77
+ m0: number;
78
+ /** Rate of right ascension in rad/s. */
79
+ omegaDot: number;
80
+ /** SV clock bias in seconds. */
81
+ af0: number;
82
+ /** SV clock drift in s/s. */
83
+ af1: number;
84
+ /** Health word, 0 = healthy (see per-system notes above). */
85
+ health: number;
86
+ }
87
+ /**
88
+ * GLONASS almanac (GLONASS ICD orbital parameters). Semicircle fields
89
+ * are converted to radians; everything else keeps the ICD units.
90
+ */
91
+ interface SbfGlonassAlmanac {
92
+ system: 'R';
93
+ /** Satellite slot, e.g. "R05". */
94
+ prn: string;
95
+ /** Frequency channel number HnA (−7…+6). */
96
+ freqNr: number;
97
+ /** Full GPS week of the almanac reference time. */
98
+ weekAlm: number;
99
+ /** Almanac reference time of week in seconds, GPS time frame. */
100
+ toaSec: number;
101
+ /** εnA: orbit eccentricity. */
102
+ epsilon: number;
103
+ /** λnA: longitude of first ascending node in rad. */
104
+ lambda: number;
105
+ /** tλnA: time of first ascending node passage in s of day. */
106
+ tLambda: number;
107
+ /** ΔinA: inclination correction to 63° in rad. */
108
+ deltaI: number;
109
+ /** ωnA: argument of perigee in rad. */
110
+ omega: number;
111
+ /** ΔTnA: correction to the mean Draconian period (s / orbit). */
112
+ deltaT: number;
113
+ /** dΔTnA: rate of change of ΔT (s / orbit²). */
114
+ deltaTDot: number;
115
+ /** τnA: coarse satellite clock correction in s. */
116
+ tau: number;
117
+ /** CnA general health flag: 1 = healthy. */
118
+ health: number;
119
+ /** NA: calendar day number within the 4-year period. */
120
+ nDay: number;
121
+ /** N4: 4-year interval number since 1996. */
122
+ n4: number;
123
+ }
124
+ type SbfAlmanac = SbfKeplerAlmanac | SbfGlonassAlmanac;
125
+ interface SbfAlmanacResult {
126
+ almanacs: SbfAlmanac[];
127
+ /** Frames whose CRC failed (corruption indicator). */
128
+ badCrc: number;
129
+ }
130
+ /**
131
+ * Decode every GPSAlm/GALAlm/GLOAlm/BDSAlm block in an SBF byte
132
+ * stream. Every block is emitted in stream order; other block types
133
+ * are skipped.
134
+ */
135
+ declare function parseSbfAlmanac(data: Uint8Array): SbfAlmanacResult;
136
+
137
+ export { type SbfAlmanac as S, type SbfAlmanacResult as a, type SbfGlonassAlmanac as b, type SbfKeplerAlmanac as c, type SbfNavResult as d, parseSbfNav as e, parseSbfAlmanac as p };
@@ -0,0 +1,137 @@
1
+ import { E as Ephemeris } from './nav-DImXUdbp.js';
2
+
3
+ /**
4
+ * Septentrio SBF decoded navigation and almanac blocks.
5
+ *
6
+ * Nav blocks (GPSNav 5891, GLONav 4004, GALNav 4002, BDSNav 4081,
7
+ * QZSNav 4095) carry the fully decoded broadcast ephemeris; they are
8
+ * mapped onto the same `Ephemeris` union the RINEX nav parser produces,
9
+ * with identical units and conventions (sqrtA in m^1/2, angles in rad,
10
+ * semicircle fields scaled by π, GLONASS tauN with the RINEX sign, BDS
11
+ * epochs/weeks on the BDT scale like a RINEX file).
12
+ *
13
+ * Almanac blocks (GPSAlm 5892, GALAlm 4003, GLOAlm 4005, BDSAlm 4119)
14
+ * are decoded into dedicated types with all per-system relative fields
15
+ * (GPS/BDS δi, Galileo δi and ΔsqrtA) normalized to absolute values.
16
+ *
17
+ * Ported from RTKLIB demo5 (rtklibexplorer), src/rcv/septentrio.c
18
+ * (decode_gpsnav / decode_glonav / decode_galnav / decode_cmpnav /
19
+ * decode_qzssnav / decode_gpsalm / decode_galalm / decode_cmpalm),
20
+ * BSD-2-Clause, and cross-checked field by field against the Septentrio
21
+ * mosaic-X5 reference guide, which also supplies the GLOAlm layout
22
+ * (not decoded by RTKLIB).
23
+ */
24
+
25
+ interface SbfNavResult {
26
+ ephemerides: Ephemeris[];
27
+ /** Frames whose CRC failed (corruption indicator). */
28
+ badCrc: number;
29
+ }
30
+ /**
31
+ * Decode every GPSNav/GLONav/GALNav/BDSNav/QZSNav block in an SBF byte
32
+ * stream into the RINEX-parser `Ephemeris` union. Every block is
33
+ * emitted (no issue-of-data dedup); other block types are skipped.
34
+ */
35
+ declare function parseSbfNav(data: Uint8Array): SbfNavResult;
36
+ /**
37
+ * GPS / Galileo / BeiDou almanac, normalized to ABSOLUTE Keplerian
38
+ * elements (units matching `KeplerEphemeris`: sqrtA in m^1/2, angles
39
+ * in rad, rates in rad/s) so a Kepler propagator can consume the
40
+ * record directly with all correction terms at zero.
41
+ *
42
+ * Normalizations applied per system:
43
+ * - GPS (`G`): the SIS δi (relative to 0.3 semicircles) is folded in —
44
+ * `i0OrDeltaI` = 0.3π + δi·π. `weekAlm` is the full GPS week
45
+ * (8-bit SIS week disambiguated against the receiver week).
46
+ * - Galileo (`E`): the SIS ΔsqrtA (relative to √29 600 000 m^1/2) and
47
+ * δi (relative to 56°) are folded in — `sqrtA` and `i0OrDeltaI` are
48
+ * absolute. `weekAlm` is the full GPS-aligned week (2-bit SIS week
49
+ * disambiguated). `health` is the raw SBF bit field: bit 0 set ⇒
50
+ * bits 1-2 are the L1-B HS, bit 3 set ⇒ bits 4-5 E5b HS, bit 6 set
51
+ * ⇒ bits 7-8 E5a HS (0 = healthy).
52
+ * - BeiDou (`C`): δi is relative to 0.3 semicircles for MEO/IGSO and
53
+ * to 0 for GEO satellites (PRN 1-5 and 59-63) per the BDS ICD; the
54
+ * reference is folded in. `weekAlm` is the full BDS week (add 1356
55
+ * for the GPS week) and `toaSec` is BDT seconds of week
56
+ * (BDT = GPST − 14 s). `health` is the 9-bit SIS health word.
57
+ */
58
+ interface SbfKeplerAlmanac {
59
+ system: 'G' | 'E' | 'C';
60
+ /** Satellite PRN, e.g. "G14". */
61
+ prn: string;
62
+ /** Full almanac reference week (see per-system notes above). */
63
+ weekAlm: number;
64
+ /** Almanac reference time of week in seconds (system time scale). */
65
+ toaSec: number;
66
+ /** Square root of semi-major axis in m^(1/2), absolute. */
67
+ sqrtA: number;
68
+ /** Eccentricity (dimensionless). */
69
+ e: number;
70
+ /** Inclination at reference time in rad, absolute (normalized). */
71
+ i0OrDeltaI: number;
72
+ /** Longitude of ascending node at the weekly epoch in rad. */
73
+ omega0: number;
74
+ /** Argument of perigee in rad. */
75
+ omega: number;
76
+ /** Mean anomaly at reference time in rad. */
77
+ m0: number;
78
+ /** Rate of right ascension in rad/s. */
79
+ omegaDot: number;
80
+ /** SV clock bias in seconds. */
81
+ af0: number;
82
+ /** SV clock drift in s/s. */
83
+ af1: number;
84
+ /** Health word, 0 = healthy (see per-system notes above). */
85
+ health: number;
86
+ }
87
+ /**
88
+ * GLONASS almanac (GLONASS ICD orbital parameters). Semicircle fields
89
+ * are converted to radians; everything else keeps the ICD units.
90
+ */
91
+ interface SbfGlonassAlmanac {
92
+ system: 'R';
93
+ /** Satellite slot, e.g. "R05". */
94
+ prn: string;
95
+ /** Frequency channel number HnA (−7…+6). */
96
+ freqNr: number;
97
+ /** Full GPS week of the almanac reference time. */
98
+ weekAlm: number;
99
+ /** Almanac reference time of week in seconds, GPS time frame. */
100
+ toaSec: number;
101
+ /** εnA: orbit eccentricity. */
102
+ epsilon: number;
103
+ /** λnA: longitude of first ascending node in rad. */
104
+ lambda: number;
105
+ /** tλnA: time of first ascending node passage in s of day. */
106
+ tLambda: number;
107
+ /** ΔinA: inclination correction to 63° in rad. */
108
+ deltaI: number;
109
+ /** ωnA: argument of perigee in rad. */
110
+ omega: number;
111
+ /** ΔTnA: correction to the mean Draconian period (s / orbit). */
112
+ deltaT: number;
113
+ /** dΔTnA: rate of change of ΔT (s / orbit²). */
114
+ deltaTDot: number;
115
+ /** τnA: coarse satellite clock correction in s. */
116
+ tau: number;
117
+ /** CnA general health flag: 1 = healthy. */
118
+ health: number;
119
+ /** NA: calendar day number within the 4-year period. */
120
+ nDay: number;
121
+ /** N4: 4-year interval number since 1996. */
122
+ n4: number;
123
+ }
124
+ type SbfAlmanac = SbfKeplerAlmanac | SbfGlonassAlmanac;
125
+ interface SbfAlmanacResult {
126
+ almanacs: SbfAlmanac[];
127
+ /** Frames whose CRC failed (corruption indicator). */
128
+ badCrc: number;
129
+ }
130
+ /**
131
+ * Decode every GPSAlm/GALAlm/GLOAlm/BDSAlm block in an SBF byte
132
+ * stream. Every block is emitted in stream order; other block types
133
+ * are skipped.
134
+ */
135
+ declare function parseSbfAlmanac(data: Uint8Array): SbfAlmanacResult;
136
+
137
+ export { type SbfAlmanac as S, type SbfAlmanacResult as a, type SbfGlonassAlmanac as b, type SbfKeplerAlmanac as c, type SbfNavResult as d, parseSbfNav as e, parseSbfAlmanac as p };