gnss-js 2.5.0 → 2.7.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.
@@ -14,13 +14,29 @@ declare function deg2dms(deg: number): [number, number, number];
14
14
  * Vincenty's inverse formula — orthodromic (great-circle) distance,
15
15
  * initial bearing, and final bearing on the WGS84 ellipsoid.
16
16
  * All angles in radians.
17
- * @returns { distance (m), initialBearing (rad), finalBearing (rad) }
17
+ * @returns { distance (m), initialBearing (rad), finalBearing (rad),
18
+ * converged } — `converged` is false for near-antipodal pairs, where the
19
+ * iteration fails and a spherical approximation is returned instead
20
+ * (distance good to ~0.5 %, bearings unreliable).
18
21
  */
19
22
  declare function vincenty(lat1: number, lon1: number, lat2: number, lon2: number): {
20
23
  distance: number;
21
24
  initialBearing: number;
22
25
  finalBearing: number;
26
+ converged: boolean;
23
27
  };
28
+ /**
29
+ * Vincenty's direct formula — the point reached from (lat1, lon1) after
30
+ * `distance` metres along the geodesic leaving at `bearing` (radians,
31
+ * clockwise from north) on the WGS84 ellipsoid.
32
+ * @returns [lat, lon] in radians, lon wrapped to (-π, π]
33
+ */
34
+ declare function vincentyDirect(lat1: number, lon1: number, bearing: number, distance: number): [number, number];
35
+ /**
36
+ * Meridian arc length from the equator to geodetic latitude `lat` (radians)
37
+ * on WGS84, via the rectifying latitude (Helmert series in n, sub-mm).
38
+ */
39
+ declare function meridianArc(lat: number): number;
24
40
  /**
25
41
  * Loxodromic (rhumb line) distance and constant bearing on the WGS84 ellipsoid.
26
42
  * Uses the ellipsoidal rhumb-line formula with isometric latitudes.
@@ -41,7 +57,8 @@ declare function rhumbLine(lat1: number, lon1: number, lat2: number, lon2: numbe
41
57
  */
42
58
  declare function euclidean3D(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number;
43
59
  /**
44
- * Geodetic midpoint along the great-circle arc.
60
+ * Midpoint of the geodesic (shortest path on the WGS84 ellipsoid) between
61
+ * two points: half the Vincenty distance along the initial bearing.
45
62
  * @returns [lat, lon] in radians
46
63
  */
47
64
  declare function greatCircleMidpoint(lat1: number, lon1: number, lat2: number, lon2: number): [number, number];
@@ -57,12 +74,18 @@ declare function horizonDistance(heightMeters: number): number;
57
74
  * Convert geodetic coordinates to UTM.
58
75
  * @param lat Latitude in radians
59
76
  * @param lon Longitude in radians
77
+ * @returns easting/northing (m), zone (1–60, with the Norway/Svalbard
78
+ * exceptions), hemisphere, MGRS latitude `band` letter (C–X), and
79
+ * `inRange` — false outside UTM's 80°S–84°N, where the values are
80
+ * computed at the clamped latitude and are not a valid UTM position.
60
81
  */
61
82
  declare function geodeticToUtm(lat: number, lon: number): {
62
83
  easting: number;
63
84
  northing: number;
64
85
  zone: number;
65
86
  hemisphere: 'N' | 'S';
87
+ band: string;
88
+ inRange: boolean;
66
89
  };
67
90
  /**
68
91
  * Maidenhead grid locator (6 characters) from geodetic coordinates.
@@ -78,4 +101,4 @@ declare function geodeticToMaidenhead(lat: number, lon: number): string;
78
101
  */
79
102
  declare function geodeticToGeohash(lat: number, lon: number, precision?: number): string;
80
103
 
81
- export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, rad2deg, rhumbLine, vincenty };
104
+ export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, meridianArc, rad2deg, rhumbLine, vincenty, vincentyDirect };
@@ -7,10 +7,12 @@ import {
7
7
  geodeticToUtm,
8
8
  greatCircleMidpoint,
9
9
  horizonDistance,
10
+ meridianArc,
10
11
  rad2deg,
11
12
  rhumbLine,
12
- vincenty
13
- } from "./chunk-MIIM4LDY.js";
13
+ vincenty,
14
+ vincentyDirect
15
+ } from "./chunk-CVCTRIWU.js";
14
16
  import {
15
17
  clampUnit,
16
18
  ecefToGeodetic,
@@ -33,7 +35,9 @@ export {
33
35
  getEnuDifference,
34
36
  greatCircleMidpoint,
35
37
  horizonDistance,
38
+ meridianArc,
36
39
  rad2deg,
37
40
  rhumbLine,
38
- vincenty
41
+ vincenty,
42
+ vincentyDirect
39
43
  };
package/dist/index.cjs CHANGED
@@ -113,6 +113,7 @@ __export(src_exports, {
113
113
  WGS84_SEMI_MAJOR_AXIS: () => WGS84_SEMI_MAJOR_AXIS,
114
114
  WGS84_SEMI_MINOR_AXIS: () => WGS84_SEMI_MINOR_AXIS,
115
115
  WarningAccumulator: () => WarningAccumulator,
116
+ ZeroBaselineEngine: () => ZeroBaselineEngine,
116
117
  almanacEpochMs: () => almanacEpochMs,
117
118
  almanacSatPosition: () => almanacSatPosition,
118
119
  analyzeQuality: () => analyzeQuality,
@@ -260,6 +261,7 @@ __export(src_exports, {
260
261
  lambdaSearch: () => lambdaSearch,
261
262
  looksLikeRtcm2: () => looksLikeRtcm2,
262
263
  maskRadForAzimuth: () => maskRadForAzimuth,
264
+ meridianArc: () => meridianArc,
263
265
  moonEcef: () => moonEcef,
264
266
  navTimesFromEph: () => navTimesFromEph,
265
267
  niellMapping: () => niellMapping,
@@ -354,6 +356,7 @@ __export(src_exports, {
354
356
  updateStreamStats: () => updateStreamStats,
355
357
  verifyChecksum: () => verifyChecksum,
356
358
  vincenty: () => vincenty,
359
+ vincentyDirect: () => vincentyDirect,
357
360
  wlWavelength: () => wlWavelength,
358
361
  writeCrx: () => writeCrx,
359
362
  writeModernObsBlob: () => writeModernObsBlob,
@@ -1124,7 +1127,12 @@ function vincenty(lat1, lon1, lat2, lon2) {
1124
1127
  (cosU2 * sinLambda2) ** 2 + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda2) ** 2
1125
1128
  );
1126
1129
  if (sinSigma === 0) {
1127
- return { distance: 0, initialBearing: 0, finalBearing: 0 };
1130
+ return {
1131
+ distance: 0,
1132
+ initialBearing: 0,
1133
+ finalBearing: 0,
1134
+ converged: true
1135
+ };
1128
1136
  }
1129
1137
  cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda2;
1130
1138
  sigma = Math.atan2(sinSigma, cosSigma);
@@ -1154,7 +1162,7 @@ function vincenty(lat1, lon1, lat2, lon2) {
1154
1162
  cosLat1 * Math.sin(-dLon),
1155
1163
  -sinLat1 * cosLat2 + cosLat1 * sinLat2 * Math.cos(-dLon)
1156
1164
  );
1157
- return { distance: distance2, initialBearing: ib, finalBearing: fb };
1165
+ return { distance: distance2, initialBearing: ib, finalBearing: fb, converged: false };
1158
1166
  }
1159
1167
  const uSq = cos2Alpha * (WGS84_SEMI_MAJOR_AXIS ** 2 - WGS84_SEMI_MINOR_AXIS ** 2) / WGS84_SEMI_MINOR_AXIS ** 2;
1160
1168
  const A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
@@ -1171,10 +1179,53 @@ function vincenty(lat1, lon1, lat2, lon2) {
1171
1179
  cosU1 * sinLambda,
1172
1180
  -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda
1173
1181
  );
1174
- return { distance, initialBearing, finalBearing };
1182
+ return { distance, initialBearing, finalBearing, converged: true };
1183
+ }
1184
+ function vincentyDirect(lat1, lon1, bearing, distance) {
1185
+ const a = WGS84_SEMI_MAJOR_AXIS, b = WGS84_SEMI_MINOR_AXIS, f = WGS84_FLATTENING;
1186
+ const sinA1 = Math.sin(bearing), cosA1 = Math.cos(bearing);
1187
+ const tanU1 = (1 - f) * Math.tan(lat1);
1188
+ const cosU1 = 1 / Math.sqrt(1 + tanU1 ** 2), sinU1 = tanU1 * cosU1;
1189
+ const sigma1 = Math.atan2(tanU1, cosA1);
1190
+ const sinAlpha = cosU1 * sinA1;
1191
+ const cos2Alpha = 1 - sinAlpha ** 2;
1192
+ const uSq = cos2Alpha * (a ** 2 - b ** 2) / b ** 2;
1193
+ const A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
1194
+ const B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
1195
+ let sigma = distance / (b * A);
1196
+ let sigmaPrev;
1197
+ let cos2SigmaM, sinSigma, cosSigma;
1198
+ let iter = 0;
1199
+ do {
1200
+ cos2SigmaM = Math.cos(2 * sigma1 + sigma);
1201
+ sinSigma = Math.sin(sigma);
1202
+ cosSigma = Math.cos(sigma);
1203
+ const deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM ** 2) - B / 6 * cos2SigmaM * (-3 + 4 * sinSigma ** 2) * (-3 + 4 * cos2SigmaM ** 2)));
1204
+ sigmaPrev = sigma;
1205
+ sigma = distance / (b * A) + deltaSigma;
1206
+ } while (Math.abs(sigma - sigmaPrev) > 1e-12 && ++iter < 200);
1207
+ const tmp = sinU1 * sinSigma - cosU1 * cosSigma * cosA1;
1208
+ const lat2 = Math.atan2(
1209
+ sinU1 * cosSigma + cosU1 * sinSigma * cosA1,
1210
+ (1 - f) * Math.sqrt(sinAlpha ** 2 + tmp ** 2)
1211
+ );
1212
+ const lambda = Math.atan2(
1213
+ sinSigma * sinA1,
1214
+ cosU1 * cosSigma - sinU1 * sinSigma * cosA1
1215
+ );
1216
+ const C2 = f / 16 * cos2Alpha * (4 + f * (4 - 3 * cos2Alpha));
1217
+ const L = lambda - (1 - C2) * f * sinAlpha * (sigma + C2 * sinSigma * (cos2SigmaM + C2 * cosSigma * (-1 + 2 * cos2SigmaM ** 2)));
1218
+ let lon2 = lon1 + L;
1219
+ lon2 = Math.atan2(Math.sin(lon2), Math.cos(lon2));
1220
+ return [lat2, lon2];
1221
+ }
1222
+ function meridianArc(lat) {
1223
+ const n = WGS84_FLATTENING / (2 - WGS84_FLATTENING);
1224
+ const n2 = n * n, n3 = n2 * n, n4 = n3 * n;
1225
+ const mu = lat + (-3 * n / 2 + 9 * n3 / 16) * Math.sin(2 * lat) + (15 * n2 / 16 - 15 * n4 / 32) * Math.sin(4 * lat) + -35 * n3 / 48 * Math.sin(6 * lat) + 315 * n4 / 512 * Math.sin(8 * lat);
1226
+ return WGS84_SEMI_MAJOR_AXIS / (1 + n) * (1 + n2 / 4 + n4 / 64) * mu;
1175
1227
  }
1176
1228
  function rhumbLine(lat1, lon1, lat2, lon2) {
1177
- const dLat = lat2 - lat1;
1178
1229
  let dLon = lon2 - lon1;
1179
1230
  const MAX_LAT = Math.PI / 2 - 1e-10;
1180
1231
  const isometricLat = (lat) => {
@@ -1188,33 +1239,28 @@ function rhumbLine(lat1, lon1, lat2, lon2) {
1188
1239
  const psi1 = isometricLat(lat1);
1189
1240
  const psi2 = isometricLat(lat2);
1190
1241
  const dPsi = psi2 - psi1;
1191
- const q = Math.abs(dPsi) > 1e-12 ? dLat / dPsi : Math.cos(lat1);
1192
1242
  if (Math.abs(dLon) > Math.PI) {
1193
1243
  dLon = dLon > 0 ? -(2 * Math.PI - dLon) : 2 * Math.PI + dLon;
1194
1244
  }
1195
1245
  const bearing = Math.atan2(dLon, dPsi);
1196
- const e22 = WGS84_ECCENTRICITY_SQUARED;
1197
- const e4 = e22 * e22;
1198
- const e6 = e4 * e22;
1199
- const meridionalRadius = WGS84_SEMI_MAJOR_AXIS * (1 - e22) * (1 + 3 / 4 * e22 + 45 / 64 * e4 + 175 / 256 * e6);
1200
- const distance = Math.sqrt(dLat ** 2 + q ** 2 * dLon ** 2) * meridionalRadius;
1246
+ const dM = meridianArc(lat2) - meridianArc(lat1);
1247
+ let q;
1248
+ if (Math.abs(dPsi) > 1e-6) {
1249
+ q = dM / dPsi;
1250
+ } else {
1251
+ const latM = (lat1 + lat2) / 2;
1252
+ q = WGS84_SEMI_MAJOR_AXIS * Math.cos(latM) / Math.sqrt(1 - WGS84_ECCENTRICITY_SQUARED * Math.sin(latM) ** 2);
1253
+ }
1254
+ const distance = Math.sqrt(dM ** 2 + (q * dLon) ** 2);
1201
1255
  return { distance, bearing };
1202
1256
  }
1203
1257
  function euclidean3D(x12, y1, z1, x22, y2, z2) {
1204
1258
  return Math.sqrt((x22 - x12) ** 2 + (y2 - y1) ** 2 + (z2 - z1) ** 2);
1205
1259
  }
1206
1260
  function greatCircleMidpoint(lat1, lon1, lat2, lon2) {
1207
- const dLon = lon2 - lon1;
1208
- const Bx = Math.cos(lat2) * Math.cos(dLon);
1209
- const By = Math.cos(lat2) * Math.sin(dLon);
1210
- const sumX = Math.cos(lat1) + Bx;
1211
- const denom = Math.sqrt(sumX ** 2 + By ** 2);
1212
- if (denom < 1e-15) {
1213
- return [(lat1 + lat2) / 2, lon1];
1214
- }
1215
- const latMid = Math.atan2(Math.sin(lat1) + Math.sin(lat2), denom);
1216
- const lonMid = lon1 + Math.atan2(By, sumX);
1217
- return [latMid, lonMid];
1261
+ const { distance, initialBearing } = vincenty(lat1, lon1, lat2, lon2);
1262
+ if (distance === 0) return [lat1, lon1];
1263
+ return vincentyDirect(lat1, lon1, initialBearing, distance / 2);
1218
1264
  }
1219
1265
  function horizonDistance(heightMeters) {
1220
1266
  if (heightMeters <= 0) return 0;
@@ -1227,18 +1273,36 @@ function horizonDistance(heightMeters) {
1227
1273
  // src/coordinates/projections.ts
1228
1274
  var e2 = WGS84_ECCENTRICITY_SQUARED;
1229
1275
  var k0 = 0.9996;
1276
+ var UTM_BANDS = "CDEFGHJKLMNPQRSTUVWX";
1277
+ function utmZone(latDeg, lonDeg) {
1278
+ let zone = Math.floor((lonDeg + 180) / 6) + 1;
1279
+ if (zone > 60) zone = 1;
1280
+ if (latDeg >= 56 && latDeg < 64 && lonDeg >= 3 && lonDeg < 12) return 32;
1281
+ if (latDeg >= 72 && latDeg <= 84) {
1282
+ if (lonDeg >= 0 && lonDeg < 9) return 31;
1283
+ if (lonDeg >= 9 && lonDeg < 21) return 33;
1284
+ if (lonDeg >= 21 && lonDeg < 33) return 35;
1285
+ if (lonDeg >= 33 && lonDeg < 42) return 37;
1286
+ }
1287
+ return zone;
1288
+ }
1230
1289
  function geodeticToUtm(lat, lon) {
1290
+ const rawLatDeg = lat * 180 / Math.PI;
1291
+ const inRange = rawLatDeg >= -80 && rawLatDeg <= 84;
1231
1292
  const MAX_UTM_LAT = 84 * (Math.PI / 180);
1232
1293
  lat = Math.max(-MAX_UTM_LAT, Math.min(MAX_UTM_LAT, lat));
1233
1294
  const latDeg = lat * 180 / Math.PI;
1295
+ lon = Math.atan2(Math.sin(lon), Math.cos(lon));
1234
1296
  const lonDeg = lon * 180 / Math.PI;
1235
- const zone = Math.floor((lonDeg + 180) / 6) + 1;
1297
+ const zone = utmZone(latDeg, lonDeg);
1298
+ const band = UTM_BANDS[Math.max(0, Math.min(19, Math.floor((latDeg + 80) / 8)))];
1236
1299
  const lon0 = ((zone - 1) * 6 - 180 + 3) * (Math.PI / 180);
1237
1300
  const ep2 = e2 / (1 - e2);
1238
1301
  const N = WGS84_SEMI_MAJOR_AXIS / Math.sqrt(1 - e2 * Math.sin(lat) ** 2);
1239
1302
  const T = Math.tan(lat) ** 2;
1240
1303
  const C2 = ep2 * Math.cos(lat) ** 2;
1241
- const A = Math.cos(lat) * (lon - lon0);
1304
+ const dLon0 = Math.atan2(Math.sin(lon - lon0), Math.cos(lon - lon0));
1305
+ const A = Math.cos(lat) * dLon0;
1242
1306
  const M = WGS84_SEMI_MAJOR_AXIS * ((1 - e2 / 4 - 3 * e2 ** 2 / 64 - 5 * e2 ** 3 / 256) * lat - (3 * e2 / 8 + 3 * e2 ** 2 / 32 + 45 * e2 ** 3 / 1024) * Math.sin(2 * lat) + (15 * e2 ** 2 / 256 + 45 * e2 ** 3 / 1024) * Math.sin(4 * lat) - 35 * e2 ** 3 / 3072 * Math.sin(6 * lat));
1243
1307
  const easting = k0 * N * (A + (1 - T + C2) * A ** 3 / 6 + (5 - 18 * T + T ** 2 + 72 * C2 - 58 * ep2) * A ** 5 / 120) + 5e5;
1244
1308
  let northing = k0 * (M + N * Math.tan(lat) * (A ** 2 / 2 + (5 - T + 9 * C2 + 4 * C2 ** 2) * A ** 4 / 24 + (61 - 58 * T + T ** 2 + 600 * C2 - 330 * ep2) * A ** 6 / 720));
@@ -1246,7 +1310,7 @@ function geodeticToUtm(lat, lon) {
1246
1310
  if (hemisphere === "S") {
1247
1311
  northing += 1e7;
1248
1312
  }
1249
- return { easting, northing, zone, hemisphere };
1313
+ return { easting, northing, zone, hemisphere, band, inRange };
1250
1314
  }
1251
1315
  function geodeticToMaidenhead(lat, lon) {
1252
1316
  const latDeg = Math.max(0, Math.min(179.999999, lat * 180 / Math.PI + 90));
@@ -14636,6 +14700,162 @@ function postProcessRtk(base, rover, ephemerides, baseEcef, opts = {}) {
14636
14700
  return { track, solved, unmatched, fixRate: solved ? fixed / solved : 0 };
14637
14701
  }
14638
14702
 
14703
+ // src/positioning/zero-baseline.ts
14704
+ function carrierFreqHz2(sys, band, gloChannel) {
14705
+ if (sys === "R") {
14706
+ if (band === "1") return 1602e6 + (gloChannel ?? 0) * 562500;
14707
+ if (band === "2") return 1246e6 + (gloChannel ?? 0) * 437500;
14708
+ return FREQ.R?.[band] ?? 0;
14709
+ }
14710
+ return FREQ[sys]?.[band] ?? 0;
14711
+ }
14712
+ function median(a) {
14713
+ if (a.length === 0) return 0;
14714
+ const s = [...a].sort((x, y) => x - y);
14715
+ const m = s.length >> 1;
14716
+ return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
14717
+ }
14718
+ var ZeroBaselineEngine = class {
14719
+ ref;
14720
+ refSys;
14721
+ slip;
14722
+ /** Per (receiver|prn|code) continuous phase-SD arc. */
14723
+ arcs = /* @__PURE__ */ new Map();
14724
+ /** Per receiver: integrated phase-smoothed clock (m). */
14725
+ phaseClock = /* @__PURE__ */ new Map();
14726
+ /** Per (receiver|system): accumulated ISB (m) + count. */
14727
+ isb = /* @__PURE__ */ new Map();
14728
+ constructor(opts) {
14729
+ this.ref = opts.reference;
14730
+ this.refSys = opts.referenceSystem ?? "G";
14731
+ this.slip = opts.slipThreshM ?? 0.05;
14732
+ }
14733
+ reset() {
14734
+ this.arcs.clear();
14735
+ this.phaseClock.clear();
14736
+ this.isb.clear();
14737
+ }
14738
+ /** ISB/IFB estimates accumulated so far, per receiver × system. */
14739
+ biases() {
14740
+ const out = [];
14741
+ for (const [key, { sum, n }] of this.isb) {
14742
+ const [receiver, system] = key.split("|");
14743
+ out.push({ receiver, system, biasM: sum / n, n });
14744
+ }
14745
+ return out;
14746
+ }
14747
+ /**
14748
+ * Ingest one time-aligned instant: observations per receiver id. Returns one
14749
+ * {@link ReceiverClockSample} per non-reference receiver present this epoch.
14750
+ */
14751
+ process(epoch) {
14752
+ const refObs = epoch.obs[this.ref];
14753
+ if (!refObs) return [];
14754
+ const refByKey = /* @__PURE__ */ new Map();
14755
+ for (const o of refObs)
14756
+ if (o.pr != null && Number.isFinite(o.pr))
14757
+ refByKey.set(`${o.prn}|${o.code}`, o);
14758
+ const out = [];
14759
+ for (const rx of Object.keys(epoch.obs)) {
14760
+ if (rx === this.ref) continue;
14761
+ out.push(
14762
+ this.processReceiver(rx, epoch.obs[rx], refByKey, epoch.timeMs)
14763
+ );
14764
+ }
14765
+ return out;
14766
+ }
14767
+ processReceiver(rx, obs, refByKey, t) {
14768
+ const codeBySys = /* @__PURE__ */ new Map();
14769
+ const phase = [];
14770
+ for (const o of obs) {
14771
+ if (o.pr == null || !Number.isFinite(o.pr)) continue;
14772
+ const r = refByKey.get(`${o.prn}|${o.code}`);
14773
+ if (!r || r.pr == null) continue;
14774
+ const sys = o.prn[0];
14775
+ (codeBySys.get(sys) ?? codeBySys.set(sys, []).get(sys)).push(
14776
+ o.pr - r.pr
14777
+ );
14778
+ if (o.cp != null && r.cp != null) {
14779
+ const f = carrierFreqHz2(
14780
+ sys,
14781
+ o.code[0],
14782
+ o.gloChannel ?? r.gloChannel ?? null
14783
+ );
14784
+ if (f > 0)
14785
+ phase.push({
14786
+ key: `${rx}|${o.prn}|${o.code}`,
14787
+ sdM: (o.cp - r.cp) * (C_LIGHT / f),
14788
+ lock: o.lockTimeS
14789
+ });
14790
+ }
14791
+ }
14792
+ if (codeBySys.size === 0)
14793
+ return {
14794
+ t,
14795
+ receiver: rx,
14796
+ clockOffsetM: null,
14797
+ clockOffsetPhaseM: this.phaseClock.get(rx) ?? null,
14798
+ used: 0,
14799
+ rejected: 0,
14800
+ residualRmsM: 0
14801
+ };
14802
+ const sysMedian = /* @__PURE__ */ new Map();
14803
+ for (const [sys, v] of codeBySys) sysMedian.set(sys, median(v));
14804
+ const allSd = [];
14805
+ for (const v of codeBySys.values()) allSd.push(...v);
14806
+ const clk = sysMedian.get(this.refSys) ?? median(allSd);
14807
+ for (const [sys, med] of sysMedian) {
14808
+ if (sys === this.refSys) continue;
14809
+ const cur = this.isb.get(`${rx}|${sys}`) ?? { sum: 0, n: 0 };
14810
+ cur.sum += med - clk;
14811
+ cur.n += 1;
14812
+ this.isb.set(`${rx}|${sys}`, cur);
14813
+ }
14814
+ let ss = 0, used = 0, rejected = 0;
14815
+ for (const [sys, v] of codeBySys) {
14816
+ const isb = sys === this.refSys ? 0 : sysMedian.get(sys) - clk;
14817
+ for (const sd2 of v) {
14818
+ const res = sd2 - clk - isb;
14819
+ if (Math.abs(res) > 5) {
14820
+ rejected++;
14821
+ continue;
14822
+ }
14823
+ ss += res * res;
14824
+ used++;
14825
+ }
14826
+ }
14827
+ const residualRmsM = used ? Math.sqrt(ss / used) : 0;
14828
+ const deltas = [];
14829
+ for (const p of phase) {
14830
+ const arc = this.arcs.get(p.key);
14831
+ this.arcs.set(p.key, { lastPhaseSdM: p.sdM, lastLock: p.lock });
14832
+ if (!arc) continue;
14833
+ const lockReset = p.lock != null && arc.lastLock != null && p.lock < arc.lastLock;
14834
+ if (lockReset) continue;
14835
+ deltas.push(p.sdM - arc.lastPhaseSdM);
14836
+ }
14837
+ let phaseClockM = this.phaseClock.get(rx) ?? null;
14838
+ if (phaseClockM == null) {
14839
+ phaseClockM = clk;
14840
+ } else if (deltas.length) {
14841
+ const md = median(deltas);
14842
+ const good = deltas.filter((d) => Math.abs(d - md) < this.slip);
14843
+ const step = good.length ? good.reduce((a, b) => a + b, 0) / good.length : md;
14844
+ phaseClockM += step;
14845
+ }
14846
+ this.phaseClock.set(rx, phaseClockM);
14847
+ return {
14848
+ t,
14849
+ receiver: rx,
14850
+ clockOffsetM: clk,
14851
+ clockOffsetPhaseM: phaseClockM,
14852
+ used,
14853
+ rejected,
14854
+ residualRmsM
14855
+ };
14856
+ }
14857
+ };
14858
+
14639
14859
  // src/positioning/sbas.ts
14640
14860
  var P2_11 = 2 ** -11;
14641
14861
  var P2_31 = 2 ** -31;
@@ -17183,7 +17403,7 @@ async function connectToMountpoint(proxyUrl, info, signal) {
17183
17403
 
17184
17404
  // src/analysis/stats-util.ts
17185
17405
  var MIN_ARC_LENGTH = 10;
17186
- function median(values) {
17406
+ function median2(values) {
17187
17407
  const s = [...values].sort((a, b) => a - b);
17188
17408
  const m = s.length >> 1;
17189
17409
  return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
@@ -17262,7 +17482,7 @@ var MultipathAccumulator = class {
17262
17482
  this.closeArc(prn, band, refBand, bandState);
17263
17483
  } else if (bandState.arc.rawMp.length > 0) {
17264
17484
  const recent = bandState.arc.rawMp.slice(-MP_JUMP_WINDOW);
17265
- if (Math.abs(mp - median(recent)) > MP_JUMP_M) {
17485
+ if (Math.abs(mp - median2(recent)) > MP_JUMP_M) {
17266
17486
  this.closeArc(prn, band, refBand, bandState);
17267
17487
  }
17268
17488
  }
@@ -17783,7 +18003,7 @@ var IonoAccumulator = class {
17783
18003
  closeArc(prn, pairKey, ps) {
17784
18004
  const arc = ps.arc;
17785
18005
  if (arc.times.length >= MIN_ARC_LENGTH) {
17786
- const level = median(arc.l4.map((v, k) => v - arc.p4[k]));
18006
+ const level = median2(arc.l4.map((v, k) => v - arc.p4[k]));
17787
18007
  const toTecu = arc.fi * arc.fi / TEC_FACTOR / (arc.gamma - 1);
17788
18008
  let satArcs = this.closed.get(prn);
17789
18009
  if (!satArcs) {
@@ -19387,6 +19607,7 @@ function computePsdDb(centerMHz, halfSpanChips, numPoints, psdFn, f0 = 1023e3, f
19387
19607
  WGS84_SEMI_MAJOR_AXIS,
19388
19608
  WGS84_SEMI_MINOR_AXIS,
19389
19609
  WarningAccumulator,
19610
+ ZeroBaselineEngine,
19390
19611
  almanacEpochMs,
19391
19612
  almanacSatPosition,
19392
19613
  analyzeQuality,
@@ -19534,6 +19755,7 @@ function computePsdDb(centerMHz, halfSpanChips, numPoints, psdFn, f0 = 1023e3, f
19534
19755
  lambdaSearch,
19535
19756
  looksLikeRtcm2,
19536
19757
  maskRadForAzimuth,
19758
+ meridianArc,
19537
19759
  moonEcef,
19538
19760
  navTimesFromEph,
19539
19761
  niellMapping,
@@ -19628,6 +19850,7 @@ function computePsdDb(centerMHz, halfSpanChips, numPoints, psdFn, f0 = 1023e3, f
19628
19850
  updateStreamStats,
19629
19851
  verifyChecksum,
19630
19852
  vincenty,
19853
+ vincentyDirect,
19631
19854
  wlWavelength,
19632
19855
  writeCrx,
19633
19856
  writeModernObsBlob,
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ export { D as DAYS_MJD2000_MJD, a as DAYS_MJD_JULIAN, H as HourCode, M as MILLIS
3
3
  export { WGS84_ECCENTRICITY_SQUARED, WGS84_FLATTENING, WGS84_SEMI_MAJOR_AXIS, WGS84_SEMI_MINOR_AXIS } from './constants.cjs';
4
4
  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';
5
5
  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';
6
- export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, rad2deg, rhumbLine, vincenty } from './coordinates.cjs';
6
+ export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, meridianArc, rad2deg, rhumbLine, vincenty, vincentyDirect } from './coordinates.cjs';
7
7
  export { c as clampUnit, e as ecefToGeodetic, g as geodeticToEcef, a as getAer, b as getEnuDifference } from './ecef-CF0uAysr.cjs';
8
8
  export { BiasRecord, BiasSinex, CompactEpoch, CrxField, DiffState, EMPTY_WARNINGS, Nav4Input, RinexWarning, RinexWarnings, WarningAccumulator, WarningSeverity, WriteCrxOptions, biasMetres, createGzipLineSink, crxDecompress, crxRepair, findSatBias, fmtD, fmtF, hdrLine, padL, padR, parseBiasSinex, parseCrxDataLine, stationHeaderLines, writeCrx, writeModernObsBlob, writeRinex2ObsBlob, writeRinex4ObsBlob, writeRinexNav, writeRinexNav4, writeRinexObsBlob } from './rinex.cjs';
9
9
  export { E as EpochSummary, P as ParseOptions, R as RinexHeader, a as RinexResult, b as RinexStats, S as SYSTEM_ORDER, c as SatObsCallback, p as parseRinexStream, s as systemCmp, d as systemName } from './parser-JPjjFgeP.cjs';
@@ -19,7 +19,7 @@ export { TrimbleEpoch, TrimbleFrame, TrimbleMeasurement, TrimbleNavResult, Trimb
19
19
  export { BinexEpoch, BinexMeasurement, BinexParseResult, BinexRecord, binexCrc16, binexCrc32, binexCsum8, binexRecords, decodeBinexEph, getBnxi, parseBinex } from './binex.cjs';
20
20
  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';
21
21
  export { Helmert14, REFERENCE_FRAMES, ReferenceFrame, applyHelmert, dateToEpoch, transformFrame } from './frames.cjs';
22
- export { AntennaOffset, AppliedOrbitClock, ArFixedSat, ArOptions, ArResult, ArSat, CorrectionResult, Degradation, DgnssOptions, DgnssSolution, EphemerisSource, FixedPositionResult, IONO_L1_M_PER_TECU, KlobucharCoeffs, LambdaResult, NetworkFcbResult, NetworkFcbSummary, NlArc, NlFcbResult, OrbitClockCorrection, PppAntennaModel, PppArc, PppCorrectionConfig, PppCorrections, PppEngine, PppEphemerisSource, PppEpoch, PppEpochContext, PppEpochResult, PppFixState, PppOptions, PppSatObs, PppSolution, RawObservation, RtkAntennaConfig, RtkAntennaModel, RtkAntennaOffset, RtkEpochMeasurements, RtkFloatEngine, RtkFloatOptions, RtkFloatSolution, RtkMeasurement, RtkObsEpoch, RtkObsInput, RtkPostProcessOptions, RtkPostProcessResult, RtkReceiverAntenna, RtkTrackPoint, SatGeom, SatSample, SbasCorrectionSource, SbasIgp, SbasIonoDelay, SbasProcessor, SbasSatCorrection, Sp3EphemerisSource, SppOptions, SppSolution, TropoMapping, WlArc, WlFcbOptions, WlFcbResult, WlObs, antexFreqOfGroup, applyOrbitClock, buildPppAntenna, buildRtkAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, rcvAntennaRangeM, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength } from './positioning.cjs';
22
+ export { AntennaOffset, AppliedOrbitClock, ArFixedSat, ArOptions, ArResult, ArSat, CorrectionResult, Degradation, DgnssOptions, DgnssSolution, EphemerisSource, FixedPositionResult, IONO_L1_M_PER_TECU, KlobucharCoeffs, LambdaResult, NetworkFcbResult, NetworkFcbSummary, NlArc, NlFcbResult, OrbitClockCorrection, PppAntennaModel, PppArc, PppCorrectionConfig, PppCorrections, PppEngine, PppEphemerisSource, PppEpoch, PppEpochContext, PppEpochResult, PppFixState, PppOptions, PppSatObs, PppSolution, RawObservation, ReceiverBias, ReceiverClockSample, RtkAntennaConfig, RtkAntennaModel, RtkAntennaOffset, RtkEpochMeasurements, RtkFloatEngine, RtkFloatOptions, RtkFloatSolution, RtkMeasurement, RtkObsEpoch, RtkObsInput, RtkPostProcessOptions, RtkPostProcessResult, RtkReceiverAntenna, RtkTrackPoint, SatGeom, SatSample, SbasCorrectionSource, SbasIgp, SbasIonoDelay, SbasProcessor, SbasSatCorrection, Sp3EphemerisSource, SppOptions, SppSolution, TropoMapping, WlArc, WlFcbOptions, WlFcbResult, WlObs, ZeroBaselineEngine, ZeroBaselineOptions, antexFreqOfGroup, applyOrbitClock, buildPppAntenna, buildRtkAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, rcvAntennaRangeM, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength } from './positioning.cjs';
23
23
  export { NtripCaster, NtripConnectionInfo, NtripNetwork, NtripStream, NtripStreamConnection, NtripVersion, Sourcetable, SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable } from './ntrip.cjs';
24
24
  export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, CompletenessResult, CycleSlipAccumulator, CycleSlipEvent, CycleSlipResult, CycleSlipSignalStats, IonoAccumulator, IonoDcbResult, IonoPoint, IonoRatePoint, IonoRateSeries, IonoResult, IonoSeries, MultipathAccumulator, MultipathPoint, MultipathResult, MultipathSeries, MultipathSignalStat, QualityResult, SatDcbMap, analyzeQuality, applyIonoDcb, computeIonoRate, detrendIonoArcs, parseSinexBiasDcb } from './analysis.cjs';
25
25
  export { AntennaEntry, AntexFile, FrequencyData, frequencyLabel, parseAntex } from './antex.cjs';
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { D as DAYS_MJD2000_MJD, a as DAYS_MJD_JULIAN, H as HourCode, M as MILLIS
3
3
  export { WGS84_ECCENTRICITY_SQUARED, WGS84_FLATTENING, WGS84_SEMI_MAJOR_AXIS, WGS84_SEMI_MINOR_AXIS } from './constants.js';
4
4
  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';
5
5
  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';
6
- export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, rad2deg, rhumbLine, vincenty } from './coordinates.js';
6
+ export { deg2dms, deg2rad, euclidean3D, geodeticToGeohash, geodeticToMaidenhead, geodeticToUtm, greatCircleMidpoint, horizonDistance, meridianArc, rad2deg, rhumbLine, vincenty, vincentyDirect } from './coordinates.js';
7
7
  export { c as clampUnit, e as ecefToGeodetic, g as geodeticToEcef, a as getAer, b as getEnuDifference } from './ecef-CF0uAysr.js';
8
8
  export { BiasRecord, BiasSinex, CompactEpoch, CrxField, DiffState, EMPTY_WARNINGS, Nav4Input, RinexWarning, RinexWarnings, WarningAccumulator, WarningSeverity, WriteCrxOptions, biasMetres, createGzipLineSink, crxDecompress, crxRepair, findSatBias, fmtD, fmtF, hdrLine, padL, padR, parseBiasSinex, parseCrxDataLine, stationHeaderLines, writeCrx, writeModernObsBlob, writeRinex2ObsBlob, writeRinex4ObsBlob, writeRinexNav, writeRinexNav4, writeRinexObsBlob } from './rinex.js';
9
9
  export { E as EpochSummary, P as ParseOptions, R as RinexHeader, a as RinexResult, b as RinexStats, S as SYSTEM_ORDER, c as SatObsCallback, p as parseRinexStream, s as systemCmp, d as systemName } from './parser-JPjjFgeP.js';
@@ -19,7 +19,7 @@ export { TrimbleEpoch, TrimbleFrame, TrimbleMeasurement, TrimbleNavResult, Trimb
19
19
  export { BinexEpoch, BinexMeasurement, BinexParseResult, BinexRecord, binexCrc16, binexCrc32, binexCsum8, binexRecords, decodeBinexEph, getBnxi, parseBinex } from './binex.js';
20
20
  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';
21
21
  export { Helmert14, REFERENCE_FRAMES, ReferenceFrame, applyHelmert, dateToEpoch, transformFrame } from './frames.js';
22
- export { AntennaOffset, AppliedOrbitClock, ArFixedSat, ArOptions, ArResult, ArSat, CorrectionResult, Degradation, DgnssOptions, DgnssSolution, EphemerisSource, FixedPositionResult, IONO_L1_M_PER_TECU, KlobucharCoeffs, LambdaResult, NetworkFcbResult, NetworkFcbSummary, NlArc, NlFcbResult, OrbitClockCorrection, PppAntennaModel, PppArc, PppCorrectionConfig, PppCorrections, PppEngine, PppEphemerisSource, PppEpoch, PppEpochContext, PppEpochResult, PppFixState, PppOptions, PppSatObs, PppSolution, RawObservation, RtkAntennaConfig, RtkAntennaModel, RtkAntennaOffset, RtkEpochMeasurements, RtkFloatEngine, RtkFloatOptions, RtkFloatSolution, RtkMeasurement, RtkObsEpoch, RtkObsInput, RtkPostProcessOptions, RtkPostProcessResult, RtkReceiverAntenna, RtkTrackPoint, SatGeom, SatSample, SbasCorrectionSource, SbasIgp, SbasIonoDelay, SbasProcessor, SbasSatCorrection, Sp3EphemerisSource, SppOptions, SppSolution, TropoMapping, WlArc, WlFcbOptions, WlFcbResult, WlObs, antexFreqOfGroup, applyOrbitClock, buildPppAntenna, buildRtkAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, rcvAntennaRangeM, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength } from './positioning.js';
22
+ export { AntennaOffset, AppliedOrbitClock, ArFixedSat, ArOptions, ArResult, ArSat, CorrectionResult, Degradation, DgnssOptions, DgnssSolution, EphemerisSource, FixedPositionResult, IONO_L1_M_PER_TECU, KlobucharCoeffs, LambdaResult, NetworkFcbResult, NetworkFcbSummary, NlArc, NlFcbResult, OrbitClockCorrection, PppAntennaModel, PppArc, PppCorrectionConfig, PppCorrections, PppEngine, PppEphemerisSource, PppEpoch, PppEpochContext, PppEpochResult, PppFixState, PppOptions, PppSatObs, PppSolution, RawObservation, ReceiverBias, ReceiverClockSample, RtkAntennaConfig, RtkAntennaModel, RtkAntennaOffset, RtkEpochMeasurements, RtkFloatEngine, RtkFloatOptions, RtkFloatSolution, RtkMeasurement, RtkObsEpoch, RtkObsInput, RtkPostProcessOptions, RtkPostProcessResult, RtkReceiverAntenna, RtkTrackPoint, SatGeom, SatSample, SbasCorrectionSource, SbasIgp, SbasIonoDelay, SbasProcessor, SbasSatCorrection, Sp3EphemerisSource, SppOptions, SppSolution, TropoMapping, WlArc, WlFcbOptions, WlFcbResult, WlObs, ZeroBaselineEngine, ZeroBaselineOptions, antexFreqOfGroup, applyOrbitClock, buildPppAntenna, buildRtkAntenna, createPppCorrections, estimateNarrowlaneFcb, estimateNetworkFcbs, estimateWidelaneFcb, extractWidelaneArcs, fixPppPosition, gimSlantIonoDelayL1, gimVerticalTec, gmst, hasToOrbitClock, ionoFree, klobucharDelay, lambdaReduction, lambdaSearch, moonEcef, niellMapping, nlWavelength, postProcessRtk, rcvAntennaRangeM, resolvePppAmbiguities, satClockCorrection, sbasIonoDeg, sbasLongTermDeg, sbasProtectionLevels, solidEarthTide, solveDgnss, solvePpp, solveSpp, sunEcef, toRtkEpoch, wlWavelength } from './positioning.js';
23
23
  export { NtripCaster, NtripConnectionInfo, NtripNetwork, NtripStream, NtripStreamConnection, NtripVersion, Sourcetable, SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable } from './ntrip.js';
24
24
  export { CompleteSatSignal, CompleteSignalStats, CompletenessAccumulator, CompletenessResult, CycleSlipAccumulator, CycleSlipEvent, CycleSlipResult, CycleSlipSignalStats, IonoAccumulator, IonoDcbResult, IonoPoint, IonoRatePoint, IonoRateSeries, IonoResult, IonoSeries, MultipathAccumulator, MultipathPoint, MultipathResult, MultipathSeries, MultipathSignalStat, QualityResult, SatDcbMap, analyzeQuality, applyIonoDcb, computeIonoRate, detrendIonoArcs, parseSinexBiasDcb } from './analysis.js';
25
25
  export { AntennaEntry, AntexFile, FrequencyData, frequencyLabel, parseAntex } from './antex.js';
package/dist/index.js CHANGED
@@ -177,6 +177,7 @@ import {
177
177
  RtkFloatEngine,
178
178
  SbasProcessor,
179
179
  Sp3EphemerisSource,
180
+ ZeroBaselineEngine,
180
181
  antexFreqOfGroup,
181
182
  applyOrbitClock,
182
183
  buildPppAntenna,
@@ -212,7 +213,7 @@ import {
212
213
  sunEcef,
213
214
  toRtkEpoch,
214
215
  wlWavelength
215
- } from "./chunk-B2XWO4RP.js";
216
+ } from "./chunk-BWLLHLLS.js";
216
217
  import "./chunk-WQX354KD.js";
217
218
  import {
218
219
  almanacEpochMs,
@@ -279,10 +280,12 @@ import {
279
280
  geodeticToUtm,
280
281
  greatCircleMidpoint,
281
282
  horizonDistance,
283
+ meridianArc,
282
284
  rad2deg,
283
285
  rhumbLine,
284
- vincenty
285
- } from "./chunk-MIIM4LDY.js";
286
+ vincenty,
287
+ vincentyDirect
288
+ } from "./chunk-CVCTRIWU.js";
286
289
  import {
287
290
  clampUnit,
288
291
  ecefToGeodetic,
@@ -489,6 +492,7 @@ export {
489
492
  WGS84_SEMI_MAJOR_AXIS,
490
493
  WGS84_SEMI_MINOR_AXIS,
491
494
  WarningAccumulator,
495
+ ZeroBaselineEngine,
492
496
  almanacEpochMs,
493
497
  almanacSatPosition,
494
498
  analyzeQuality,
@@ -636,6 +640,7 @@ export {
636
640
  lambdaSearch,
637
641
  looksLikeRtcm2,
638
642
  maskRadForAzimuth,
643
+ meridianArc,
639
644
  moonEcef,
640
645
  navTimesFromEph,
641
646
  niellMapping,
@@ -730,6 +735,7 @@ export {
730
735
  updateStreamStats,
731
736
  verifyChecksum,
732
737
  vincenty,
738
+ vincentyDirect,
733
739
  wlWavelength,
734
740
  writeCrx,
735
741
  writeModernObsBlob,