gnss-js 1.3.1 → 1.4.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.cjs CHANGED
@@ -67,6 +67,7 @@ __export(src_exports, {
67
67
  GLO_F2_BASE: () => GLO_F2_BASE,
68
68
  GLO_F2_STEP: () => GLO_F2_STEP,
69
69
  GLO_F3: () => GLO_F3,
70
+ IonoAccumulator: () => IonoAccumulator,
70
71
  MILLISECONDS_GPS_TAI: () => MILLISECONDS_GPS_TAI,
71
72
  MILLISECONDS_IN_DAY: () => MILLISECONDS_IN_DAY,
72
73
  MILLISECONDS_IN_HOUR: () => MILLISECONDS_IN_HOUR,
@@ -75,6 +76,7 @@ __export(src_exports, {
75
76
  MILLISECONDS_IN_WEEK: () => MILLISECONDS_IN_WEEK,
76
77
  MILLISECONDS_TT_TAI: () => MILLISECONDS_TT_TAI,
77
78
  MultipathAccumulator: () => MultipathAccumulator,
79
+ OMEGA_E: () => OMEGA_E,
78
80
  REFERENCE_FRAMES: () => REFERENCE_FRAMES,
79
81
  RINEX_CODES: () => RINEX_CODES,
80
82
  RTCM3_MESSAGE_NAMES: () => RTCM3_MESSAGE_NAMES,
@@ -308,6 +310,7 @@ var SYS_SHORT = {
308
310
  S: "SBS"
309
311
  };
310
312
  var C_LIGHT = 299792458;
313
+ var OMEGA_E = 72921151467e-15;
311
314
  var FREQ = {
312
315
  G: { "1": 157542e4, "2": 12276e5, "5": 117645e4 },
313
316
  // R bands 4/6 are the CDMA L1OC/L2OC center frequencies
@@ -3814,6 +3817,7 @@ var RTCM3_MESSAGE_NAMES = {
3814
3817
  1031: "GLONASS Network RTK Residual",
3815
3818
  1032: "Physical Reference Station",
3816
3819
  1033: "Receiver+Antenna Descriptor",
3820
+ 1041: "NavIC Ephemeris",
3817
3821
  1042: "BeiDou Ephemeris",
3818
3822
  1043: "SBAS Ephemeris",
3819
3823
  1044: "QZSS Ephemeris",
@@ -3878,6 +3882,8 @@ var RTCM3_MESSAGE_NAMES = {
3878
3882
  1064: "GLONASS SSR Clock",
3879
3883
  1065: "GLONASS SSR Code Bias",
3880
3884
  1066: "GLONASS SSR Orbit+Clock",
3885
+ // Biases
3886
+ 1230: "GLONASS Code-Phase Biases",
3881
3887
  // IGS SSR
3882
3888
  4076: "IGS SSR"
3883
3889
  };
@@ -3886,6 +3892,7 @@ function rtcm3Constellation(msgType) {
3886
3892
  if (msgType >= 1009 && msgType <= 1012) return "GLONASS";
3887
3893
  if (msgType === 1019) return "GPS";
3888
3894
  if (msgType === 1020) return "GLONASS";
3895
+ if (msgType === 1041) return "NavIC";
3889
3896
  if (msgType === 1042) return "BeiDou";
3890
3897
  if (msgType === 1043) return "SBAS";
3891
3898
  if (msgType === 1044) return "QZSS";
@@ -3897,6 +3904,7 @@ function rtcm3Constellation(msgType) {
3897
3904
  if (msgType >= 1111 && msgType <= 1117) return "QZSS";
3898
3905
  if (msgType >= 1121 && msgType <= 1127) return "BeiDou";
3899
3906
  if (msgType >= 1131 && msgType <= 1137) return "NavIC";
3907
+ if (msgType === 1230) return "GLONASS";
3900
3908
  return null;
3901
3909
  }
3902
3910
  function createStreamStats() {
@@ -3991,7 +3999,6 @@ var GM_GPS = 3986005e8;
3991
3999
  var GM_GAL = 3986004418e5;
3992
4000
  var GM_BDS = 3986004418e5;
3993
4001
  var GM_GLO = 39860044e7;
3994
- var OMEGA_E = 72921151467e-15;
3995
4002
  var BDS_GEO_MAX_INCLINATION_RAD = 0.1;
3996
4003
  var BDS_GEO_MIN_SEMIMAJOR_AXIS_M = 4e7;
3997
4004
  var AE_GLO = 6378136;
@@ -4726,8 +4733,7 @@ function tropoDelay(elevationRad) {
4726
4733
  return 2.47 / (sinEl + 0.0121);
4727
4734
  }
4728
4735
  function sagnac(pos, travelTimeS) {
4729
- const OMEGA_E2 = 72921151467e-15;
4730
- const theta = OMEGA_E2 * travelTimeS;
4736
+ const theta = OMEGA_E * travelTimeS;
4731
4737
  const c = Math.cos(theta);
4732
4738
  const s = Math.sin(theta);
4733
4739
  return [pos.x * c + pos.y * s, -pos.x * s + pos.y * c, pos.z];
@@ -5038,6 +5044,14 @@ async function connectToMountpoint(proxyUrl, info, signal) {
5038
5044
 
5039
5045
  // src/analysis/multipath.ts
5040
5046
  var MIN_ARC_LENGTH = 10;
5047
+ var MP_JUMP_M = 1.25;
5048
+ var MP_JUMP_WINDOW = 5;
5049
+ var MP_EDIT_SIGMA = 3;
5050
+ function median(values) {
5051
+ const s = [...values].sort((a, b) => a - b);
5052
+ const m = s.length >> 1;
5053
+ return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
5054
+ }
5041
5055
  var MultipathAccumulator = class {
5042
5056
  state = /* @__PURE__ */ new Map();
5043
5057
  results = [];
@@ -5094,6 +5108,11 @@ var MultipathAccumulator = class {
5094
5108
  const gap = bandState.lastTime > 0 ? (time - bandState.lastTime) / 1e3 : 0;
5095
5109
  if (bandState.lastTime > 0 && gap > this.interval * ARC_GAP_FACTOR) {
5096
5110
  this.closeArc(prn, band, refBand, bandState);
5111
+ } else if (bandState.arc.rawMp.length > 0) {
5112
+ const recent = bandState.arc.rawMp.slice(-MP_JUMP_WINDOW);
5113
+ if (Math.abs(mp - median(recent)) > MP_JUMP_M) {
5114
+ this.closeArc(prn, band, refBand, bandState);
5115
+ }
5097
5116
  }
5098
5117
  bandState.arc.times.push(time);
5099
5118
  bandState.arc.rawMp.push(mp);
@@ -5113,13 +5132,25 @@ var MultipathAccumulator = class {
5113
5132
  closeArc(prn, band, refBand, state) {
5114
5133
  const arc = state.arc;
5115
5134
  if (arc.times.length >= MIN_ARC_LENGTH) {
5116
- const mean = arc.rawMp.reduce((a, b) => a + b, 0) / arc.rawMp.length;
5135
+ let keep = arc.times.map((_, i) => i);
5136
+ let mean = 0;
5137
+ for (let pass = 0; pass < 3; pass++) {
5138
+ mean = keep.reduce((s, i) => s + arc.rawMp[i], 0) / keep.length;
5139
+ const sigma = Math.sqrt(
5140
+ keep.reduce((s, i) => s + (arc.rawMp[i] - mean) ** 2, 0) / keep.length
5141
+ );
5142
+ const kept = keep.filter(
5143
+ (i) => Math.abs(arc.rawMp[i] - mean) <= MP_EDIT_SIGMA * sigma
5144
+ );
5145
+ if (kept.length === keep.length || kept.length < MIN_ARC_LENGTH) break;
5146
+ keep = kept;
5147
+ }
5117
5148
  const sys = prn[0];
5118
5149
  const bLabel = BAND_LABELS[sys]?.[band] ?? band;
5119
5150
  const rLabel = BAND_LABELS[sys]?.[refBand] ?? refBand;
5120
5151
  const label2 = `${prn} MP ${bLabel}-${rLabel}`;
5121
- const points = arc.times.map((t, i) => ({
5122
- time: t,
5152
+ const points = keep.map((i) => ({
5153
+ time: arc.times[i],
5123
5154
  mp: arc.rawMp[i] - mean
5124
5155
  }));
5125
5156
  const rms = Math.sqrt(
@@ -5173,7 +5204,7 @@ var MultipathAccumulator = class {
5173
5204
  refBand,
5174
5205
  rms,
5175
5206
  count,
5176
- satellites: seriesList.length
5207
+ satellites: new Set(seriesList.map((s) => s.prn)).size
5177
5208
  });
5178
5209
  }
5179
5210
  const sysOrder = "GRECIJS";
@@ -5491,11 +5522,178 @@ var CompletenessAccumulator = class {
5491
5522
  }
5492
5523
  };
5493
5524
 
5525
+ // src/analysis/ionosphere.ts
5526
+ var TEC_FACTOR = 403e15;
5527
+ var GF_JUMP_M = 0.15;
5528
+ var MIN_ARC_LENGTH2 = 10;
5529
+ function median2(values) {
5530
+ const s = [...values].sort((a, b) => a - b);
5531
+ const m = s.length >> 1;
5532
+ return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
5533
+ }
5534
+ var IonoAccumulator = class {
5535
+ state = /* @__PURE__ */ new Map();
5536
+ closed = /* @__PURE__ */ new Map();
5537
+ interval;
5538
+ obsIndices;
5539
+ gloChannels;
5540
+ pairLabel = /* @__PURE__ */ new Map();
5541
+ constructor(header) {
5542
+ this.interval = header.interval ?? 30;
5543
+ this.obsIndices = buildObsIndices(header);
5544
+ this.gloChannels = buildGloChannelMap(header.glonassSlots);
5545
+ }
5546
+ /** Observation callback — wire this into parseRinexStream. */
5547
+ onObservation = (time, prn, _codes, values) => {
5548
+ const sys = prn[0];
5549
+ const bandMap = this.obsIndices.get(sys) ?? this.obsIndices.get("_v2");
5550
+ if (!bandMap) return;
5551
+ const bandData = /* @__PURE__ */ new Map();
5552
+ for (const [band, { C, L }] of bandMap) {
5553
+ if (C === null) continue;
5554
+ const cVal = values[C];
5555
+ const lVal = values[L];
5556
+ const freq = getFreq(this.gloChannels, prn, band);
5557
+ if (cVal != null && cVal !== 0 && lVal != null && lVal !== 0 && freq) {
5558
+ bandData.set(band, { C: cVal, L: lVal, f: freq });
5559
+ }
5560
+ }
5561
+ if (bandData.size < 2) return;
5562
+ const pairs = DUAL_FREQ_PAIRS[sys] ?? [];
5563
+ for (const [bi, bj] of pairs) {
5564
+ const di = bandData.get(bi);
5565
+ const dj = bandData.get(bj);
5566
+ if (!di || !dj) continue;
5567
+ const \u03BBi = C_LIGHT / di.f;
5568
+ const \u03BBj = C_LIGHT / dj.f;
5569
+ const gamma = di.f * di.f / (dj.f * dj.f);
5570
+ const l4 = di.L * \u03BBi - dj.L * \u03BBj;
5571
+ const p4 = dj.C - di.C;
5572
+ const pairKey = `${bi}-${bj}`;
5573
+ if (!this.pairLabel.has(`${sys}:${pairKey}`)) {
5574
+ const bLabel = BAND_LABELS[sys]?.[bi] ?? bi;
5575
+ const rLabel = BAND_LABELS[sys]?.[bj] ?? bj;
5576
+ this.pairLabel.set(`${sys}:${pairKey}`, `${bLabel}-${rLabel}`);
5577
+ }
5578
+ this.push(prn, pairKey, time, l4, p4, di.f, gamma);
5579
+ break;
5580
+ }
5581
+ };
5582
+ push(prn, pairKey, time, l4, p4, fi, gamma) {
5583
+ if (!isFinite(l4) || !isFinite(p4)) return;
5584
+ let satStates = this.state.get(prn);
5585
+ if (!satStates) {
5586
+ satStates = /* @__PURE__ */ new Map();
5587
+ this.state.set(prn, satStates);
5588
+ }
5589
+ let ps = satStates.get(pairKey);
5590
+ if (!ps) {
5591
+ ps = {
5592
+ arc: { times: [], l4: [], p4: [], fi, gamma },
5593
+ lastTime: 0,
5594
+ lastL4: 0
5595
+ };
5596
+ satStates.set(pairKey, ps);
5597
+ }
5598
+ const gap = ps.lastTime > 0 ? (time - ps.lastTime) / 1e3 : 0;
5599
+ if (ps.lastTime > 0 && gap > this.interval * ARC_GAP_FACTOR) {
5600
+ this.closeArc(prn, pairKey, ps);
5601
+ } else if (ps.arc.times.length > 0 && Math.abs(l4 - ps.lastL4) > GF_JUMP_M) {
5602
+ this.closeArc(prn, pairKey, ps);
5603
+ }
5604
+ if (ps.arc.times.length === 0) {
5605
+ ps.arc.fi = fi;
5606
+ ps.arc.gamma = gamma;
5607
+ }
5608
+ ps.arc.times.push(time);
5609
+ ps.arc.l4.push(l4);
5610
+ ps.arc.p4.push(p4);
5611
+ ps.lastTime = time;
5612
+ ps.lastL4 = l4;
5613
+ }
5614
+ /** External cycle-slip notification — close affected arcs. */
5615
+ notifySlip(_time, prn, bands) {
5616
+ const satStates = this.state.get(prn);
5617
+ if (!satStates) return;
5618
+ for (const [pairKey, ps] of satStates) {
5619
+ const [bi, bj] = pairKey.split("-");
5620
+ if (bands.has(bi) || bands.has(bj)) {
5621
+ this.closeArc(prn, pairKey, ps);
5622
+ }
5623
+ }
5624
+ }
5625
+ closeArc(prn, pairKey, ps) {
5626
+ const arc = ps.arc;
5627
+ if (arc.times.length >= MIN_ARC_LENGTH2) {
5628
+ const level = median2(arc.l4.map((v, k) => v - arc.p4[k]));
5629
+ const toTecu = arc.fi * arc.fi / TEC_FACTOR / (arc.gamma - 1);
5630
+ let satArcs = this.closed.get(prn);
5631
+ if (!satArcs) {
5632
+ satArcs = /* @__PURE__ */ new Map();
5633
+ this.closed.set(prn, satArcs);
5634
+ }
5635
+ let points = satArcs.get(pairKey);
5636
+ if (!points) {
5637
+ points = [];
5638
+ satArcs.set(pairKey, points);
5639
+ }
5640
+ for (let k = 0; k < arc.times.length; k++) {
5641
+ points.push({
5642
+ time: arc.times[k],
5643
+ stec: (arc.l4[k] - level) * toTecu
5644
+ });
5645
+ }
5646
+ }
5647
+ ps.arc = { times: [], l4: [], p4: [], fi: arc.fi, gamma: arc.gamma };
5648
+ }
5649
+ /** Finalize: close remaining arcs, keep one pair per satellite. */
5650
+ finalize() {
5651
+ for (const [prn, satStates] of this.state) {
5652
+ for (const [pairKey, ps] of satStates) {
5653
+ this.closeArc(prn, pairKey, ps);
5654
+ }
5655
+ }
5656
+ const series = [];
5657
+ let sum = 0;
5658
+ let count = 0;
5659
+ let maxStec = 0;
5660
+ for (const [prn, satArcs] of this.closed) {
5661
+ let bestKey = null;
5662
+ let bestLen = 0;
5663
+ for (const [pairKey, points2] of satArcs) {
5664
+ if (points2.length > bestLen) {
5665
+ bestLen = points2.length;
5666
+ bestKey = pairKey;
5667
+ }
5668
+ }
5669
+ if (!bestKey) continue;
5670
+ const points = satArcs.get(bestKey);
5671
+ points.sort((a, b) => a.time - b.time);
5672
+ const sys = prn[0];
5673
+ for (const p of points) {
5674
+ sum += p.stec;
5675
+ count++;
5676
+ if (p.stec > maxStec) maxStec = p.stec;
5677
+ }
5678
+ series.push({
5679
+ prn,
5680
+ system: sys,
5681
+ label: this.pairLabel.get(`${sys}:${bestKey}`) ?? bestKey,
5682
+ points
5683
+ });
5684
+ }
5685
+ series.sort((a, b) => a.prn.localeCompare(b.prn));
5686
+ return { series, maxStec, meanStec: count > 0 ? sum / count : 0 };
5687
+ }
5688
+ };
5689
+
5494
5690
  // src/analysis/quality-analysis.ts
5495
5691
  async function analyzeQuality(file, header, onProgress, signal) {
5496
5692
  const mpAccum = new MultipathAccumulator(header);
5693
+ const ionoAccum = new IonoAccumulator(header);
5497
5694
  const csAccum = new CycleSlipAccumulator(header, (time, prn, bands) => {
5498
5695
  mpAccum.notifySlip(time, prn, bands);
5696
+ ionoAccum.notifySlip(time, prn, bands);
5499
5697
  });
5500
5698
  const compAccum = new CompletenessAccumulator(header);
5501
5699
  await parseRinexStream(
@@ -5505,6 +5703,7 @@ async function analyzeQuality(file, header, onProgress, signal) {
5505
5703
  (time, prn, codes, values) => {
5506
5704
  csAccum.onObservation(time, prn, codes, values);
5507
5705
  mpAccum.onObservation(time, prn, codes, values);
5706
+ ionoAccum.onObservation(time, prn, codes, values);
5508
5707
  compAccum.onObservation(time, prn, codes, values);
5509
5708
  },
5510
5709
  true
@@ -5513,7 +5712,8 @@ async function analyzeQuality(file, header, onProgress, signal) {
5513
5712
  return {
5514
5713
  cycleSlips: csAccum.finalize(),
5515
5714
  completeness: compAccum.finalize(),
5516
- multipath: mpAccum.finalize()
5715
+ multipath: mpAccum.finalize(),
5716
+ iono: ionoAccum.finalize()
5517
5717
  };
5518
5718
  }
5519
5719
 
@@ -6755,6 +6955,7 @@ function computePsdDb(centerMHz, halfSpanChips, numPoints, psdFn, f0 = 1023e3, f
6755
6955
  GLO_F2_BASE,
6756
6956
  GLO_F2_STEP,
6757
6957
  GLO_F3,
6958
+ IonoAccumulator,
6758
6959
  MILLISECONDS_GPS_TAI,
6759
6960
  MILLISECONDS_IN_DAY,
6760
6961
  MILLISECONDS_IN_HOUR,
@@ -6763,6 +6964,7 @@ function computePsdDb(centerMHz, halfSpanChips, numPoints, psdFn, f0 = 1023e3, f
6763
6964
  MILLISECONDS_IN_WEEK,
6764
6965
  MILLISECONDS_TT_TAI,
6765
6966
  MultipathAccumulator,
6967
+ OMEGA_E,
6766
6968
  REFERENCE_FRAMES,
6767
6969
  RINEX_CODES,
6768
6970
  RTCM3_MESSAGE_NAMES,
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { D as DAYS_MJD2000_MJD, a as DAYS_MJD_JULIAN, H as HourCode, M as MILLISECONDS_GPS_TAI, b as MILLISECONDS_IN_DAY, c as MILLISECONDS_IN_HOUR, d as MILLISECONDS_IN_MINUTE, e as MILLISECONDS_IN_SECOND, f as MILLISECONDS_IN_WEEK, g as MILLISECONDS_TT_TAI, R as RINEX_CODES, S as SECONDS_IN_DAY, h as SECONDS_IN_HOUR, i as SECONDS_IN_MINUTE, j as SECONDS_IN_WEEK, k as START_BDS_TIME, l as START_GAL_TIME, m as START_GLO_LEAP, n as START_GPS_TIME, o as START_JULIAN_TAI, p as START_MJD_UNIX_SECONDS, q as START_NTP_TIME, r as START_TAI_TIME, s as START_UNIX_TIME, T as TimeDifference } from './time-DnI1VpE8.cjs';
2
2
  export { WGS84_ECCENTRICITY_SQUARED, WGS84_FLATTENING, WGS84_SEMI_MAJOR_AXIS, WGS84_SEMI_MINOR_AXIS } from './constants.cjs';
3
- export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OnSlipDetected, S as SYSTEM_NAMES, i as SYS_SHORT, j as buildGloChannelMap, k as buildObsIndices, l as formatUTCTime, m as getFreq, n as gloFreq } from './gnss-BT6ulR17.cjs';
3
+ export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OMEGA_E, i as OnSlipDetected, S as SYSTEM_NAMES, j as SYS_SHORT, k as buildGloChannelMap, l as buildObsIndices, m as formatUTCTime, n as getFreq, o as gloFreq } from './gnss-BtXrG3zH.cjs';
4
4
  export { Scale, getBdsTime, getDateFromBdsTime, getDateFromDayOfWeek, getDateFromDayOfYear, getDateFromGalTime, getDateFromGloN, getDateFromGpsData, getDateFromGpsTime, getDateFromHourCode, getDateFromJulianDate, getDateFromMJD, getDateFromMJD2000, getDateFromRINEX, getDateFromTai, getDateFromTimeOfDay, getDateFromTt, getDateFromUnixTime, getDateFromUtc, getDayOfWeek, getDayOfYear, getGalTime, getGloN4, getGloNA, getGpsLeap, getGpsTime, getHourCode, getHoursFromTimeDifference, getJulianDate, getLeap, getMJD, getMJD2000, getMinutesFromTimeDifference, getNtpTime, getRINEX, getSecondsFromTimeDifference, getTaiDate, getTimeDifference, getTimeDifferenceFromDays, getTimeDifferenceFromHours, getTimeDifferenceFromMinutes, getTimeDifferenceFromObject, getTimeDifferenceFromSeconds, getTimeOfDay, getTimeOfWeek, getTotalDaysFromTimeDifference, getTtDate, getUnixTime, getUtcDate, getWeekNumber, getWeekOfYear } from './time.cjs';
5
5
  export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, rad2deg, rhumbLine, vincenty } from './coordinates.cjs';
6
6
  export { c as clampUnit, e as ecefToGeodetic, g as geodeticToEcef, a as getAer, b as getEnuDifference } from './ecef-CF0uAysr.cjs';
@@ -13,7 +13,7 @@ export { AllPositionsData, DopValues, EpochSkyData, SatAzEl, SatPoint, SatPositi
13
13
  export { Helmert14, REFERENCE_FRAMES, ReferenceFrame, applyHelmert, dateToEpoch, transformFrame } from './frames.cjs';
14
14
  export { SppOptions, SppSolution, ionoFree, satClockCorrection, solveSpp } from './positioning.cjs';
15
15
  export { NtripCaster, NtripConnectionInfo, NtripNetwork, NtripStream, NtripStreamConnection, NtripVersion, Sourcetable, SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable } from './ntrip.cjs';
16
- export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, CompletenessResult, CycleSlipAccumulator, CycleSlipEvent, CycleSlipResult, CycleSlipSignalStats, MultipathAccumulator, MultipathPoint, MultipathResult, MultipathSeries, MultipathSignalStat, QualityResult, analyzeQuality } from './analysis.cjs';
16
+ export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, CompletenessResult, CycleSlipAccumulator, CycleSlipEvent, CycleSlipResult, CycleSlipSignalStats, IonoAccumulator, IonoPoint, IonoResult, IonoSeries, MultipathAccumulator, MultipathPoint, MultipathResult, MultipathSeries, MultipathSignalStat, QualityResult, analyzeQuality } from './analysis.cjs';
17
17
  export { AntennaEntry, AntexFile, FrequencyData, frequencyLabel, parseAntex } from './antex.cjs';
18
18
  export { NmeaFix, NmeaStats, NmeaTrack, computeStats, nmeaCoordToDecimal, parseNmeaFile, verifyChecksum } from './nmea.cjs';
19
19
  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';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { D as DAYS_MJD2000_MJD, a as DAYS_MJD_JULIAN, H as HourCode, M as MILLISECONDS_GPS_TAI, b as MILLISECONDS_IN_DAY, c as MILLISECONDS_IN_HOUR, d as MILLISECONDS_IN_MINUTE, e as MILLISECONDS_IN_SECOND, f as MILLISECONDS_IN_WEEK, g as MILLISECONDS_TT_TAI, R as RINEX_CODES, S as SECONDS_IN_DAY, h as SECONDS_IN_HOUR, i as SECONDS_IN_MINUTE, j as SECONDS_IN_WEEK, k as START_BDS_TIME, l as START_GAL_TIME, m as START_GLO_LEAP, n as START_GPS_TIME, o as START_JULIAN_TAI, p as START_MJD_UNIX_SECONDS, q as START_NTP_TIME, r as START_TAI_TIME, s as START_UNIX_TIME, T as TimeDifference } from './time-DnI1VpE8.js';
2
2
  export { WGS84_ECCENTRICITY_SQUARED, WGS84_FLATTENING, WGS84_SEMI_MAJOR_AXIS, WGS84_SEMI_MINOR_AXIS } from './constants.js';
3
- export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OnSlipDetected, S as SYSTEM_NAMES, i as SYS_SHORT, j as buildGloChannelMap, k as buildObsIndices, l as formatUTCTime, m as getFreq, n as gloFreq } from './gnss-C-tgoYNa.js';
3
+ export { A as ARC_GAP_FACTOR, B as BAND_LABELS, a as BDS_SATELLITES, b as BdsSatellite, C as C_LIGHT, D as DEFAULT_ELEV_MASK_DEG, c as DUAL_FREQ_PAIRS, F as FREQ, G as GLO_CHANNEL_FALLBACK, d as GLO_F1_BASE, e as GLO_F1_STEP, f as GLO_F2_BASE, g as GLO_F2_STEP, h as GLO_F3, O as OMEGA_E, i as OnSlipDetected, S as SYSTEM_NAMES, j as SYS_SHORT, k as buildGloChannelMap, l as buildObsIndices, m as formatUTCTime, n as getFreq, o as gloFreq } from './gnss-DhnEr0Dy.js';
4
4
  export { Scale, getBdsTime, getDateFromBdsTime, getDateFromDayOfWeek, getDateFromDayOfYear, getDateFromGalTime, getDateFromGloN, getDateFromGpsData, getDateFromGpsTime, getDateFromHourCode, getDateFromJulianDate, getDateFromMJD, getDateFromMJD2000, getDateFromRINEX, getDateFromTai, getDateFromTimeOfDay, getDateFromTt, getDateFromUnixTime, getDateFromUtc, getDayOfWeek, getDayOfYear, getGalTime, getGloN4, getGloNA, getGpsLeap, getGpsTime, getHourCode, getHoursFromTimeDifference, getJulianDate, getLeap, getMJD, getMJD2000, getMinutesFromTimeDifference, getNtpTime, getRINEX, getSecondsFromTimeDifference, getTaiDate, getTimeDifference, getTimeDifferenceFromDays, getTimeDifferenceFromHours, getTimeDifferenceFromMinutes, getTimeDifferenceFromObject, getTimeDifferenceFromSeconds, getTimeOfDay, getTimeOfWeek, getTotalDaysFromTimeDifference, getTtDate, getUnixTime, getUtcDate, getWeekNumber, getWeekOfYear } from './time.js';
5
5
  export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, rad2deg, rhumbLine, vincenty } from './coordinates.js';
6
6
  export { c as clampUnit, e as ecefToGeodetic, g as geodeticToEcef, a as getAer, b as getEnuDifference } from './ecef-CF0uAysr.js';
@@ -13,7 +13,7 @@ export { AllPositionsData, DopValues, EpochSkyData, SatAzEl, SatPoint, SatPositi
13
13
  export { Helmert14, REFERENCE_FRAMES, ReferenceFrame, applyHelmert, dateToEpoch, transformFrame } from './frames.js';
14
14
  export { SppOptions, SppSolution, ionoFree, satClockCorrection, solveSpp } from './positioning.js';
15
15
  export { NtripCaster, NtripConnectionInfo, NtripNetwork, NtripStream, NtripStreamConnection, NtripVersion, Sourcetable, SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable } from './ntrip.js';
16
- export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, CompletenessResult, CycleSlipAccumulator, CycleSlipEvent, CycleSlipResult, CycleSlipSignalStats, MultipathAccumulator, MultipathPoint, MultipathResult, MultipathSeries, MultipathSignalStat, QualityResult, analyzeQuality } from './analysis.js';
16
+ export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, CompletenessResult, CycleSlipAccumulator, CycleSlipEvent, CycleSlipResult, CycleSlipSignalStats, IonoAccumulator, IonoPoint, IonoResult, IonoSeries, MultipathAccumulator, MultipathPoint, MultipathResult, MultipathSeries, MultipathSignalStat, QualityResult, analyzeQuality } from './analysis.js';
17
17
  export { AntennaEntry, AntexFile, FrequencyData, frequencyLabel, parseAntex } from './antex.js';
18
18
  export { NmeaFix, NmeaStats, NmeaTrack, computeStats, nmeaCoordToDecimal, parseNmeaFile, verifyChecksum } from './nmea.js';
19
19
  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';
package/dist/index.js CHANGED
@@ -6,9 +6,10 @@ import {
6
6
  import {
7
7
  CompletenessAccumulator,
8
8
  CycleSlipAccumulator,
9
+ IonoAccumulator,
9
10
  MultipathAccumulator,
10
11
  analyzeQuality
11
- } from "./chunk-G3N4S3DM.js";
12
+ } from "./chunk-3ZAFWOT6.js";
12
13
  import {
13
14
  frequencyLabel,
14
15
  parseAntex
@@ -53,7 +54,7 @@ import {
53
54
  phiBOCc,
54
55
  phiBOCs,
55
56
  phiBPSK
56
- } from "./chunk-5SPJH4MG.js";
57
+ } from "./chunk-2K3FCJBX.js";
57
58
  import {
58
59
  Scale,
59
60
  getDateFromDayOfWeek,
@@ -97,7 +98,7 @@ import {
97
98
  ionoFree,
98
99
  satClockCorrection,
99
100
  solveSpp
100
- } from "./chunk-USHP4IND.js";
101
+ } from "./chunk-PX7TPPTQ.js";
101
102
  import {
102
103
  computeAllPositions,
103
104
  computeDop,
@@ -110,7 +111,7 @@ import {
110
111
  keplerPosition,
111
112
  navTimesFromEph,
112
113
  selectEphemeris
113
- } from "./chunk-CC2R4JGS.js";
114
+ } from "./chunk-PQYBTE42.js";
114
115
  import {
115
116
  getBdsTime,
116
117
  getDateFromBdsTime,
@@ -178,7 +179,7 @@ import {
178
179
  parseRinexStream,
179
180
  systemCmp,
180
181
  systemName
181
- } from "./chunk-OZCYOM5D.js";
182
+ } from "./chunk-3U5AX7PY.js";
182
183
  import {
183
184
  BitReader,
184
185
  RTCM3_MESSAGE_NAMES,
@@ -196,7 +197,7 @@ import {
196
197
  setRtcm3DebugHandler,
197
198
  updateStationMeta,
198
199
  updateStreamStats
199
- } from "./chunk-7EEWQ5DU.js";
200
+ } from "./chunk-65CQINSB.js";
200
201
  import {
201
202
  DAYS_MJD2000_MJD,
202
203
  DAYS_MJD_JULIAN,
@@ -236,6 +237,7 @@ import {
236
237
  GLO_F2_BASE,
237
238
  GLO_F2_STEP,
238
239
  GLO_F3,
240
+ OMEGA_E,
239
241
  SYSTEM_NAMES,
240
242
  SYS_SHORT,
241
243
  buildGloChannelMap,
@@ -243,7 +245,7 @@ import {
243
245
  formatUTCTime,
244
246
  getFreq,
245
247
  gloFreq
246
- } from "./chunk-W5WKEV7U.js";
248
+ } from "./chunk-FIEWO4J4.js";
247
249
  export {
248
250
  ARC_GAP_FACTOR,
249
251
  BAND_LABELS,
@@ -292,6 +294,7 @@ export {
292
294
  GLO_F2_BASE,
293
295
  GLO_F2_STEP,
294
296
  GLO_F3,
297
+ IonoAccumulator,
295
298
  MILLISECONDS_GPS_TAI,
296
299
  MILLISECONDS_IN_DAY,
297
300
  MILLISECONDS_IN_HOUR,
@@ -300,6 +303,7 @@ export {
300
303
  MILLISECONDS_IN_WEEK,
301
304
  MILLISECONDS_TT_TAI,
302
305
  MultipathAccumulator,
306
+ OMEGA_E,
303
307
  REFERENCE_FRAMES,
304
308
  RINEX_CODES,
305
309
  RTCM3_MESSAGE_NAMES,
package/dist/orbit.cjs CHANGED
@@ -80,6 +80,9 @@ var START_GPS_TIME = /* @__PURE__ */ new Date("1980-01-06T00:00:00Z");
80
80
  var START_BDS_TIME = /* @__PURE__ */ new Date("2006-01-01T00:00:14Z");
81
81
  var START_NTP_TIME = /* @__PURE__ */ new Date("1900-01-01T00:00:00Z");
82
82
 
83
+ // src/constants/gnss.ts
84
+ var OMEGA_E = 72921151467e-15;
85
+
83
86
  // src/time/gnss.ts
84
87
  function getTaiDate(date) {
85
88
  return new Date(date.getTime() + MILLISECONDS_GPS_TAI);
@@ -167,7 +170,6 @@ var GM_GPS = 3986005e8;
167
170
  var GM_GAL = 3986004418e5;
168
171
  var GM_BDS = 3986004418e5;
169
172
  var GM_GLO = 39860044e7;
170
- var OMEGA_E = 72921151467e-15;
171
173
  var BDS_GEO_MAX_INCLINATION_RAD = 0.1;
172
174
  var BDS_GEO_MIN_SEMIMAJOR_AXIS_M = 4e7;
173
175
  var AE_GLO = 6378136;
package/dist/orbit.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  keplerPosition,
11
11
  navTimesFromEph,
12
12
  selectEphemeris
13
- } from "./chunk-CC2R4JGS.js";
13
+ } from "./chunk-PQYBTE42.js";
14
14
  import "./chunk-HVXYFUCB.js";
15
15
  import {
16
16
  ecefToGeodetic,
@@ -18,6 +18,7 @@ import {
18
18
  } from "./chunk-37QNKGTC.js";
19
19
  import "./chunk-6FAL6P4G.js";
20
20
  import "./chunk-LEEU5OIO.js";
21
+ import "./chunk-FIEWO4J4.js";
21
22
  export {
22
23
  computeAllPositions,
23
24
  computeDop,
@@ -63,6 +63,10 @@ var START_GPS_TIME = /* @__PURE__ */ new Date("1980-01-06T00:00:00Z");
63
63
  var START_BDS_TIME = /* @__PURE__ */ new Date("2006-01-01T00:00:14Z");
64
64
  var START_NTP_TIME = /* @__PURE__ */ new Date("1900-01-01T00:00:00Z");
65
65
 
66
+ // src/constants/gnss.ts
67
+ var C_LIGHT = 299792458;
68
+ var OMEGA_E = 72921151467e-15;
69
+
66
70
  // src/time/gnss.ts
67
71
  function getTaiDate(date) {
68
72
  return new Date(date.getTime() + MILLISECONDS_GPS_TAI);
@@ -150,7 +154,6 @@ var GM_GPS = 3986005e8;
150
154
  var GM_GAL = 3986004418e5;
151
155
  var GM_BDS = 3986004418e5;
152
156
  var GM_GLO = 39860044e7;
153
- var OMEGA_E = 72921151467e-15;
154
157
  var BDS_GEO_MAX_INCLINATION_RAD = 0.1;
155
158
  var BDS_GEO_MIN_SEMIMAJOR_AXIS_M = 4e7;
156
159
  var AE_GLO = 6378136;
@@ -366,9 +369,6 @@ function computeSatPosition(eph, timeMs) {
366
369
  var GPS_EPOCH_MS = START_GPS_TIME.getTime();
367
370
  var BDS_EPOCH_MS = START_BDS_TIME.getTime();
368
371
 
369
- // src/constants/gnss.ts
370
- var C_LIGHT = 299792458;
371
-
372
372
  // src/positioning/index.ts
373
373
  var GM_GPS2 = 3986005e8;
374
374
  var F_REL = -4442807633e-19;
@@ -400,8 +400,7 @@ function tropoDelay(elevationRad) {
400
400
  return 2.47 / (sinEl + 0.0121);
401
401
  }
402
402
  function sagnac(pos, travelTimeS) {
403
- const OMEGA_E2 = 72921151467e-15;
404
- const theta = OMEGA_E2 * travelTimeS;
403
+ const theta = OMEGA_E * travelTimeS;
405
404
  const c = Math.cos(theta);
406
405
  const s = Math.sin(theta);
407
406
  return [pos.x * c + pos.y * s, -pos.x * s + pos.y * c, pos.z];
@@ -2,13 +2,13 @@ import {
2
2
  ionoFree,
3
3
  satClockCorrection,
4
4
  solveSpp
5
- } from "./chunk-USHP4IND.js";
6
- import "./chunk-CC2R4JGS.js";
5
+ } from "./chunk-PX7TPPTQ.js";
6
+ import "./chunk-PQYBTE42.js";
7
7
  import "./chunk-HVXYFUCB.js";
8
8
  import "./chunk-37QNKGTC.js";
9
9
  import "./chunk-6FAL6P4G.js";
10
10
  import "./chunk-LEEU5OIO.js";
11
- import "./chunk-W5WKEV7U.js";
11
+ import "./chunk-FIEWO4J4.js";
12
12
  export {
13
13
  ionoFree,
14
14
  satClockCorrection,
package/dist/rinex.js CHANGED
@@ -16,8 +16,8 @@ import {
16
16
  parseRinexStream,
17
17
  systemCmp,
18
18
  systemName
19
- } from "./chunk-OZCYOM5D.js";
20
- import "./chunk-W5WKEV7U.js";
19
+ } from "./chunk-3U5AX7PY.js";
20
+ import "./chunk-FIEWO4J4.js";
21
21
  export {
22
22
  EMPTY_WARNINGS,
23
23
  SYSTEM_ORDER,
package/dist/rtcm3.cjs CHANGED
@@ -1319,6 +1319,7 @@ var RTCM3_MESSAGE_NAMES = {
1319
1319
  1031: "GLONASS Network RTK Residual",
1320
1320
  1032: "Physical Reference Station",
1321
1321
  1033: "Receiver+Antenna Descriptor",
1322
+ 1041: "NavIC Ephemeris",
1322
1323
  1042: "BeiDou Ephemeris",
1323
1324
  1043: "SBAS Ephemeris",
1324
1325
  1044: "QZSS Ephemeris",
@@ -1383,6 +1384,8 @@ var RTCM3_MESSAGE_NAMES = {
1383
1384
  1064: "GLONASS SSR Clock",
1384
1385
  1065: "GLONASS SSR Code Bias",
1385
1386
  1066: "GLONASS SSR Orbit+Clock",
1387
+ // Biases
1388
+ 1230: "GLONASS Code-Phase Biases",
1386
1389
  // IGS SSR
1387
1390
  4076: "IGS SSR"
1388
1391
  };
@@ -1391,6 +1394,7 @@ function rtcm3Constellation(msgType) {
1391
1394
  if (msgType >= 1009 && msgType <= 1012) return "GLONASS";
1392
1395
  if (msgType === 1019) return "GPS";
1393
1396
  if (msgType === 1020) return "GLONASS";
1397
+ if (msgType === 1041) return "NavIC";
1394
1398
  if (msgType === 1042) return "BeiDou";
1395
1399
  if (msgType === 1043) return "SBAS";
1396
1400
  if (msgType === 1044) return "QZSS";
@@ -1402,6 +1406,7 @@ function rtcm3Constellation(msgType) {
1402
1406
  if (msgType >= 1111 && msgType <= 1117) return "QZSS";
1403
1407
  if (msgType >= 1121 && msgType <= 1127) return "BeiDou";
1404
1408
  if (msgType >= 1131 && msgType <= 1137) return "NavIC";
1409
+ if (msgType === 1230) return "GLONASS";
1405
1410
  return null;
1406
1411
  }
1407
1412
  function createStreamStats() {
package/dist/rtcm3.js CHANGED
@@ -15,9 +15,9 @@ import {
15
15
  setRtcm3DebugHandler,
16
16
  updateStationMeta,
17
17
  updateStreamStats
18
- } from "./chunk-7EEWQ5DU.js";
18
+ } from "./chunk-65CQINSB.js";
19
19
  import "./chunk-LEEU5OIO.js";
20
- import "./chunk-W5WKEV7U.js";
20
+ import "./chunk-FIEWO4J4.js";
21
21
  export {
22
22
  BitReader,
23
23
  RTCM3_MESSAGE_NAMES,
package/dist/signals.js CHANGED
@@ -32,8 +32,8 @@ import {
32
32
  phiBOCc,
33
33
  phiBOCs,
34
34
  phiBPSK
35
- } from "./chunk-5SPJH4MG.js";
36
- import "./chunk-W5WKEV7U.js";
35
+ } from "./chunk-2K3FCJBX.js";
36
+ import "./chunk-FIEWO4J4.js";
37
37
  export {
38
38
  BAND_PRESETS,
39
39
  CONSTELLATIONS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.3.1",
3
+ "version": "1.4.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,