@neilberkman/sidereon 2.1.1 → 3.0.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/README.md CHANGED
@@ -53,6 +53,20 @@ console.log(look.azimuthDeg[0], look.elevationDeg[0], look.rangeKm[0]);
53
53
  `BigInt64Array` of unix-microsecond epochs) and `findPasses(station, start, end,
54
54
  minElevationDeg)` for visibility windows.
55
55
 
56
+ An OMM uses the same SGP4 kernel through its canonical mean-element bridge:
57
+
58
+ ```js
59
+ import { parseOmmKvn, Sgp4Satellite } from "@neilberkman/sidereon";
60
+
61
+ const omm = parseOmmKvn(ommText);
62
+ const satellite = Sgp4Satellite.fromOmm(omm);
63
+ const state = satellite.propagate(epochs);
64
+ console.log(state.positionKm, state.velocityKmS);
65
+ ```
66
+
67
+ `fromOmm` throws a typed `OmmError` when required SGP4 fields are absent or
68
+ the message states an incompatible theory, center, frame, or time system.
69
+
56
70
  ### Node (ESM or CommonJS)
57
71
 
58
72
  Both module systems resolve to the Node build, which initializes the wasm while
@@ -279,10 +293,13 @@ and [Earthdata Login data access](https://urs.earthdata.nasa.gov/documentation/f
279
293
 
280
294
  Use `raim` on per-satellite post-fit residuals after a solve. The direct result
281
295
  has `faultDetected`, `testStatistic`, `threshold`, `worstSat`,
282
- `reducedChiSquare`, `normalizedResiduals`, `rmsM`, and `dof`. RAIM residual
283
- tests must use per-satellite residual variances; unit weights on metre-scale
284
- residuals make `faultDetected` saturate near 100%. The JS API takes
285
- inverse-variance weights, so compute them from your variance model.
296
+ `reducedChiSquare`, `normalizedResiduals`, `rmsM`, `dof`, and `testable`. Raw
297
+ `raim` input defaults to solution variances and therefore requires a
298
+ `variancesM2` array aligned with `usedSats` and `residualsM`; use
299
+ `weights: { isUnit: true }` for explicit unit weights, or pass explicit
300
+ inverse-variance weights. Unit weights on metre-scale residuals can make
301
+ `faultDetected` saturate near 100%. `raimForSolution` reads the actual variances
302
+ and clock count retained by the solution.
286
303
 
287
304
  ```js
288
305
  import { RaimWeights, raim } from "@neilberkman/sidereon";
@@ -306,6 +323,16 @@ const integrity = raim(
306
323
  console.log(integrity.faultDetected, integrity.testStatistic, integrity.worstSat);
307
324
  ```
308
325
 
326
+ `Sp3.fde` uses the solve's own variances by default, tries one exclusion by
327
+ default, and rejects a candidate whose residual RMS exceeds 100 m. Set
328
+ `weightsMode` to `"unit"` or `"bySatellite"` to select other detection weights;
329
+ `maxExclusions` and `maxExclusionRmsM` override the exclusion policy;
330
+ `maxIterations` is rejected. An explicitly empty legacy `weights` list still
331
+ means unit weights. The
332
+ accepted `FdeSolution.raim` is the core detection result for the retained
333
+ solution. An unresolved fault throws a `PositioningError` with its reason, last
334
+ solution, ordered exclusions, and complete RAIM result.
335
+
309
336
  Use `araim(geometry, ism, allocation)` for protection levels from line-of-sight
310
337
  geometry and an integrity support message. `araimLpv200Allocation()` provides the
311
338
  default LPV-200 budget. The direct result has `hplM`, `vplM`, `sigmaAccHM`, and
@@ -340,11 +367,18 @@ record.
340
367
  returns a `RinexNavParse` with supported `records` in file order and `skipped`
341
368
  diagnostics for malformed supported blocks. `recordCount` and `skippedCount`
342
369
  are available as convenience getters. Header and UTF-8 failures throw; a
343
- skipped block exposes its `satellite` and core `message`.
370
+ skipped block exposes its `satellite`, starting `line` and core `message`.
371
+ `departures` lists what the reader read past, and `other` the blocks it keeps
372
+ without evaluating them. A field the message does not state (a CNAV record's
373
+ IODE, for example) is `undefined`, never `0`.
374
+
375
+ `parseRinexNavFile(bytes)` returns a `RinexNavFile` that keeps every entry of
376
+ the file, supported or not, and writes it back with `toRinexString()`.
344
377
 
345
378
  `encodeRinexNav(records)` accepts any caller-supplied JavaScript array of
346
379
  `BroadcastRecordJs` objects and delegates the deterministic RINEX NAV encoding
347
- to the core engine. The record wrapper list is consumed at the WASM boundary.
380
+ to the core engine. It throws instead of writing a record set that would not
381
+ read back. The record wrapper list is consumed at the WASM boundary.
348
382
 
349
383
  `rinexObservationFrequencyHz(system, code, rinexVersion, glonassChannel)` and
350
384
  `rinexObservationWavelengthM(...)` use the core's direct full observation-code
@@ -356,8 +390,30 @@ canonical band lookups.
356
390
  `parseSbasEmsLines(text)` and `parseSbasRtklibLines(text)` return full
357
391
  timestamped `SbasLogBlock` objects from the core engine. Each block exposes
358
392
  `satellite`/`satelliteId`, GPS `week` and `towS`, the selected wire `form`, raw
359
- `bytes`, and `decode()` for the structured SBAS message. Malformed recognized
360
- blocks throw an engine `Error`; unrelated lines are ignored.
393
+ `bytes`, its `declaredMessageType`, and `decode(policy?)` for the structured
394
+ SBAS message. Malformed recognized blocks throw an engine `Error`; unrelated
395
+ lines are ignored. `parseSbasEmsLog(text, options)` and
396
+ `parseSbasRtklibLog(text, options)` (`options` is `{ policy?, referenceWeek? }`)
397
+ return an `SbasLog` that also reports the lines read as no record
398
+ (`skippedLines`), the record lines refused (`refusedLines`) and, under
399
+ `policy: "lenient"`, the departures read (`departures`).
400
+
401
+ ## Strict and lenient readers
402
+
403
+ Readers that meet a departure from their format refuse it by default and name
404
+ it; `"lenient"` reads it and reports it. This holds for `new Tle` and
405
+ `parseTleFile` (checksum digits, reported in `checksumWarnings`),
406
+ `decodeRtcm`/`decodeRtcmStream`/`decodeRtcmFrame` and the RTCM encoders,
407
+ `decodeSbasMessage` and the SBAS log readers, `loadBiasSinex` and
408
+ `loadCodeDcb` (reported in `notices`), and the space-weather lookups
409
+ (`sampleAt`, `apHistoryAt`). Functions that read UT1 refuse an instant outside
410
+ the UT1 table; each has a `WithValidity` variant that takes `"permissive"`
411
+ and returns `{ value, ut1Degraded }`.
412
+
413
+ CCSDS OMM, OPM, OEM and CDM readers and writers throw `OmmError`, `OpmError`,
414
+ `OemError` and `CdmError`; `error.detail` is an `NdmErrorDetail` naming the
415
+ engine variant (`kind`) and its fields. A value a message does not carry reads
416
+ as `undefined`.
361
417
 
362
418
  ## Capabilities
363
419
 
@@ -76,9 +76,9 @@ source documents how it is based on and differs from the original. The complete
76
76
  official IERS notice is reproduced in
77
77
  `licenses/IERS-Conventions-Software-License.txt`.
78
78
 
79
- The exact public non-test tide sources distributed in `sidereon-core` 0.36.3
80
- (byte-identical to the 0.35.0 sources) are included under
81
- `third_party_source/sidereon-core-0.36.3/tides/`. These copies provide the
79
+ The exact public non-test tide sources distributed in `sidereon-core` 3.0.0
80
+ are included under
81
+ `third_party_source/sidereon-core-3.0.0/tides/`. These copies provide the
82
82
  source for every tide routine in the compiled WebAssembly artifact; they are
83
83
  not represented as original IERS software or as endorsed by the IERS
84
84
  Conventions Center.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neilberkman/sidereon",
3
- "version": "2.1.1",
3
+ "version": "3.0.0",
4
4
  "description": "WebAssembly / JavaScript interface over the sidereon GNSS + astrodynamics engine: SP3 loading and multi-product merge, SPP / RTK (float + fixed) / PPP (float + fixed) positioning, IONEX slant delay, SGP4 and numerical orbit propagation, RINEX observation/navigation/clock parsing, CRINEX (Hatanaka) decoding, observable-domain math (carrier combinations, cycle slips, Hatch smoothing, weighting, velocity, GPS C/A signal), and the astro domain (scale-tagged time, frame transforms, Sun/Moon ephemerides, eclipse / body angles, DOP, passes / visibility, conjunction + collision probability, CDM / OMM / ANTEX parsing, RF link budget)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,9 +46,9 @@
46
46
  "licenses/IERS-Conventions-Software-License.txt",
47
47
  "licenses/SciPy-BSD-3-Clause.txt",
48
48
  "licenses/libloading-ISC.txt",
49
- "third_party_source/sidereon-core-0.36.3/tides/mod.rs",
50
- "third_party_source/sidereon-core-0.36.3/tides/ocean.rs",
51
- "third_party_source/sidereon-core-0.36.3/tides/pole.rs",
49
+ "third_party_source/sidereon-core-3.0.0/tides/mod.rs",
50
+ "third_party_source/sidereon-core-3.0.0/tides/ocean.rs",
51
+ "third_party_source/sidereon-core-3.0.0/tides/pole.rs",
52
52
  "pkg/sidereon.js",
53
53
  "pkg/sidereon.d.ts",
54
54
  "pkg/sidereon_bg.wasm",
@@ -66,7 +66,7 @@
66
66
  "README.md"
67
67
  ],
68
68
  "scripts": {
69
- "build": "wasm-pack build --target web --out-dir pkg --out-name sidereon && wasm-pack build --target nodejs --out-dir pkg-node --out-name sidereon && node scripts/postbuild.mjs",
69
+ "build": "wasm-pack build --target web --out-dir pkg --out-name sidereon -- --locked && wasm-pack build --target nodejs --out-dir pkg-node --out-name sidereon -- --locked && node scripts/postbuild.mjs",
70
70
  "test": "node --test",
71
71
  "typecheck": "tsc --noEmit",
72
72
  "check:package": "node scripts/check-package.mjs",