gnss-js 1.4.0 → 1.4.1

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/analysis.cjs CHANGED
@@ -251,17 +251,24 @@ var MultipathAccumulator = class {
251
251
  }
252
252
  }
253
253
  if (bandData.size < 2) return;
254
+ const mpOf = (a, b) => {
255
+ const \u03BBa = C_LIGHT / a.f;
256
+ const \u03BBb = C_LIGHT / b.f;
257
+ const \u03B1 = a.f * a.f / (b.f * b.f);
258
+ const coeff = 2 / (\u03B1 - 1);
259
+ return a.C - (1 + coeff) * a.L * \u03BBa + coeff * b.L * \u03BBb;
260
+ };
254
261
  const pairs = DUAL_FREQ_PAIRS[sys] ?? [];
262
+ let primaryDone = false;
255
263
  for (const [bi, bj] of pairs) {
256
264
  const di = bandData.get(bi);
257
265
  const dj = bandData.get(bj);
258
266
  if (!di || !dj) continue;
259
- const \u03BBi = C_LIGHT / di.f;
260
- const \u03BBj = C_LIGHT / dj.f;
261
- const \u03B1 = di.f * di.f / (dj.f * dj.f);
262
- const coeff = 2 / (\u03B1 - 1);
263
- const mp = di.C - (1 + coeff) * di.L * \u03BBi + coeff * dj.L * \u03BBj;
264
- this.pushMp(prn, bi, bj, time, mp);
267
+ if (!primaryDone) {
268
+ this.pushMp(prn, bi, bj, time, mpOf(di, dj));
269
+ primaryDone = true;
270
+ }
271
+ this.pushMp(prn, bj, bi, time, mpOf(dj, di));
265
272
  }
266
273
  };
267
274
  pushMp(prn, band, refBand, time, mp) {
package/dist/analysis.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  IonoAccumulator,
5
5
  MultipathAccumulator,
6
6
  analyzeQuality
7
- } from "./chunk-3ZAFWOT6.js";
7
+ } from "./chunk-UQ7D53R2.js";
8
8
  import "./chunk-3U5AX7PY.js";
9
9
  import "./chunk-FIEWO4J4.js";
10
10
  export {
@@ -50,17 +50,24 @@ var MultipathAccumulator = class {
50
50
  }
51
51
  }
52
52
  if (bandData.size < 2) return;
53
+ const mpOf = (a, b) => {
54
+ const \u03BBa = C_LIGHT / a.f;
55
+ const \u03BBb = C_LIGHT / b.f;
56
+ const \u03B1 = a.f * a.f / (b.f * b.f);
57
+ const coeff = 2 / (\u03B1 - 1);
58
+ return a.C - (1 + coeff) * a.L * \u03BBa + coeff * b.L * \u03BBb;
59
+ };
53
60
  const pairs = DUAL_FREQ_PAIRS[sys] ?? [];
61
+ let primaryDone = false;
54
62
  for (const [bi, bj] of pairs) {
55
63
  const di = bandData.get(bi);
56
64
  const dj = bandData.get(bj);
57
65
  if (!di || !dj) continue;
58
- const \u03BBi = C_LIGHT / di.f;
59
- const \u03BBj = C_LIGHT / dj.f;
60
- const \u03B1 = di.f * di.f / (dj.f * dj.f);
61
- const coeff = 2 / (\u03B1 - 1);
62
- const mp = di.C - (1 + coeff) * di.L * \u03BBi + coeff * dj.L * \u03BBj;
63
- this.pushMp(prn, bi, bj, time, mp);
66
+ if (!primaryDone) {
67
+ this.pushMp(prn, bi, bj, time, mpOf(di, dj));
68
+ primaryDone = true;
69
+ }
70
+ this.pushMp(prn, bj, bi, time, mpOf(dj, di));
64
71
  }
65
72
  };
66
73
  pushMp(prn, band, refBand, time, mp) {
package/dist/index.cjs CHANGED
@@ -5079,17 +5079,24 @@ var MultipathAccumulator = class {
5079
5079
  }
5080
5080
  }
5081
5081
  if (bandData.size < 2) return;
5082
+ const mpOf = (a, b) => {
5083
+ const \u03BBa = C_LIGHT / a.f;
5084
+ const \u03BBb = C_LIGHT / b.f;
5085
+ const \u03B1 = a.f * a.f / (b.f * b.f);
5086
+ const coeff = 2 / (\u03B1 - 1);
5087
+ return a.C - (1 + coeff) * a.L * \u03BBa + coeff * b.L * \u03BBb;
5088
+ };
5082
5089
  const pairs = DUAL_FREQ_PAIRS[sys] ?? [];
5090
+ let primaryDone = false;
5083
5091
  for (const [bi, bj] of pairs) {
5084
5092
  const di = bandData.get(bi);
5085
5093
  const dj = bandData.get(bj);
5086
5094
  if (!di || !dj) continue;
5087
- const \u03BBi = C_LIGHT / di.f;
5088
- const \u03BBj = C_LIGHT / dj.f;
5089
- const \u03B1 = di.f * di.f / (dj.f * dj.f);
5090
- const coeff = 2 / (\u03B1 - 1);
5091
- const mp = di.C - (1 + coeff) * di.L * \u03BBi + coeff * dj.L * \u03BBj;
5092
- this.pushMp(prn, bi, bj, time, mp);
5095
+ if (!primaryDone) {
5096
+ this.pushMp(prn, bi, bj, time, mpOf(di, dj));
5097
+ primaryDone = true;
5098
+ }
5099
+ this.pushMp(prn, bj, bi, time, mpOf(dj, di));
5093
5100
  }
5094
5101
  };
5095
5102
  pushMp(prn, band, refBand, time, mp) {
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  IonoAccumulator,
10
10
  MultipathAccumulator,
11
11
  analyzeQuality
12
- } from "./chunk-3ZAFWOT6.js";
12
+ } from "./chunk-UQ7D53R2.js";
13
13
  import {
14
14
  frequencyLabel,
15
15
  parseAntex
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnss-js",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
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,