@neilberkman/sidereon 4.0.0 → 4.2.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/CHANGELOG.md CHANGED
@@ -1,6 +1,41 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## [4.2.0] - 2026-11-26
4
+
5
+ ### Added
6
+
7
+ - JPL DE binary ephemerides, analytic GCRS Sun and Moon positions, and IERS 2010 daily Earth orientation.
8
+ - ICGEM gravity fields with time-variable coefficients and tide-system conversion.
9
+ - Eckstein–Hechler and Brouwer–Lyddane propagation and mean element conversions.
10
+ - Earth and Moon eclipse geometry and gradients, GNSS attitude laws, and instantaneous yaw and solar axes.
11
+ - GNSS attitude and GCRF sampling along SP3, broadcast, scoring, analytic and continuous numerical orbits at TDB seconds past J2000. DP5(4) propagation can return a dense output handle with chronological coverage bounds for use as an attitude trajectory.
12
+ - ECOM1, ECOM2, empirical RTN and Earth radiation pressure forces, force parameter partials, variational propagation, and orbit parameter fitting.
13
+ - Prediction horizon scoring against SP3 for predicted products, broadcast ephemerides and sampled trajectories.
14
+ - Numerical state propagation and parameter fitting accept ordered additional force handles alongside built-in gravity and fixed or table-driven drag.
15
+
16
+ ### Changed
17
+
18
+ - Engine update to `sidereon` and `sidereon-core` 4.2.0.
19
+ - Numerical propagation integrates in elapsed TT. Atmospheric drag uses UT1 orientation and UTC weather epochs.
20
+ - Solar radiation pressure defaults to apparent-disc occultation, WGS84 Earth and lunar occultation. Radiation pressure and third-body gravity use GCRS Sun and Moon vectors.
21
+ - Spherical harmonic gravity uses the Holmes–Featherstone recursion. Precise orbit fits evaluate force models at TDB and keep sample times in their original scales.
22
+
23
+ ### Fixed
24
+
25
+ - State propagation honors the supplied Earth orientation and ephemeris context. New numerical propagation, fitting, and decay inputs reject unknown keys. `propagateState` and `OrbitFitOptions` retain their existing handling of extra keys, including ignoring `denseOutput`.
26
+ - GNSS attitude trajectory constructors preserve the caller's IERS 2010 provider handle.
27
+ - The engine returns typed force errors for invalid inputs and recovers finite accelerations and partials after intermediate overflow or underflow.
28
+ - J2 gravity follows the Orekit evaluation order.
29
+
30
+ ## 4.1.0 - 2026-11-19
31
+
32
+ ### Changed
33
+
34
+ - Engine update: `sidereon` / `sidereon-core` 4.1.0.
35
+ - `Constellation.groundTracks`, `groundTrackOutcomes`, `lookAngleArcs`, `lookAngleArcOutcomes`, `visible` and `coverageLookAngles` evaluate each epoch's Earth-orientation transform once for all satellites instead of once per satellite; results are unchanged bit for bit. Median times in Node:
36
+ - `groundTracks`, 143 satellites × 51 epochs: 559.8 ms → 42.1 ms (40 satellites: 167.0 ms → 20.2 ms).
37
+ - `lookAngleArcs`, 143 satellites × 51 epochs: 474.3 ms → 37.3 ms (40 satellites: 146.9 ms → 23.2 ms).
38
+ - `visible`, 143 satellites at one epoch: 8.83 ms → 0.16 ms.
4
39
 
5
40
  ## 4.0.0 - 2026-11-16
6
41
 
@@ -53,6 +88,7 @@
53
88
 
54
89
  - Adds `Sp3.toSp3StringWithRounding()`, returning SP3 text and maximum absolute
55
90
  record-field changes in SI units, while keeping `toSp3String()` strict.
91
+
56
92
  ### Fixed
57
93
 
58
94
  - Writes source-grid-derived SP3 merge means at record precision and keeps the
@@ -157,7 +193,7 @@ restates an engine change as it reaches the JavaScript API.
157
193
  from the first configured pair whose carriers resolve, and a satellite no
158
194
  pair resolves for is left out of that epoch and listed in the new
159
195
  `unresolvedCarriers` as `{ receiver, epochIndex, satelliteId,
160
- observableCode }`.
196
+ observableCode }`.
161
197
  - **Breaking.** A PPP observation whose code is zero or negative is no longer
162
198
  solved at a meaningless transmission epoch. It is left out and reported in
163
199
  the new `unplacedObservations` on `PppFloatSolution` and
@@ -202,8 +238,8 @@ restates an engine change as it reaches the JavaScript API.
202
238
  a spent robust budget reports `converged: false`. The status is typed as the
203
239
  new `SolveStatus` union, and the metadata as `StaticSolveMetadata`.
204
240
  - `SppSolution.metadata` reports how the solve ran and ended, `{ iterations,
205
- converged, status, outerIterations, finalRobustScaleM, ionosphereApplied,
206
- troposphereApplied, usedCount }` (`SppSolveMetadata`).
241
+ converged, status, outerIterations, finalRobustScaleM, ionosphereApplied,
242
+ troposphereApplied, usedCount }` (`SppSolveMetadata`).
207
243
  - The SPP carrier check applies only when a frequency-dependent term is
208
244
  applied, so a solve without the ionosphere correction no longer leaves out a
209
245
  satellite for want of a carrier. The PPP auto-init SPP seed passes each
@@ -335,7 +371,7 @@ restates an engine change as it reaches the JavaScript API.
335
371
  matrix is refused. `matrix` returns the stored values unvalidated and
336
372
  `toValidatedMatrix()` checks positive semidefiniteness.
337
373
  - **Breaking.** `OemSegment(metadata, states, covariances, dataComments?,
338
- covarianceComments?)` throws on invalid input. `skippedStates` is an array of
374
+ covarianceComments?)` throws on invalid input. `skippedStates` is an array of
339
375
  `{ line, segment, text, reason, itemCount, field, issue }`, with the count in
340
376
  `skippedStateCount`.
341
377
  - Every record the messages define is retained: OMM `classification`,
@@ -361,7 +397,7 @@ restates an engine change as it reaches the JavaScript API.
361
397
  - **Breaking.** Bias lookups (`codeOsbSeconds`, `phaseOsbCycles`,
362
398
  `codeDsbSeconds`, `codeBiasModelM`) return a `BiasLookup`,
363
399
  `{ status, value, records, overridden, productScale, queryScale,
364
- observable }`, instead of a number or `undefined`, so an absent, ambiguous or
400
+ observable }`, instead of a number or `undefined`, so an absent, ambiguous or
365
401
  out-of-scale lookup is distinct from a value. `phaseOsbCycles` takes
366
402
  `timeScale?` and `carrierHz?`.
367
403
  - Bias records carry `family`, `unit`, `svn`, `validFrom`, `validUntil`,
@@ -397,8 +433,8 @@ restates an engine change as it reaches the JavaScript API.
397
433
  departs from RTCM 3. It returned the frames it could read. Use
398
434
  `decodeRtcmStream` for noisy input.
399
435
  - **Breaking.** `decodeRtcmStream(bytes, policy?)`, `decodeRtcmFrame(bytes,
400
- policy?)`, `encodeRtcm(message, policy?)` and `encodeRtcmFrame(message,
401
- policy?, reserved?)` take a policy, `"strict"` (the default) or
436
+ policy?)`, `encodeRtcm(message, policy?)` and `encodeRtcmFrame(message,
437
+ policy?, reserved?)` take a policy, `"strict"` (the default) or
402
438
  `"lenient"`. Messages carry `trailingBits`, MSM messages `signalMask` and
403
439
  GLONASS fields `negativeZero`, so a lenient decode re-encodes byte for byte.
404
440
  Stream diagnostics gain `crcFailures` and `departures`, and skipped frames
@@ -455,6 +491,7 @@ restates an engine change as it reaches the JavaScript API.
455
491
  - a map inheriting an earlier map's `EXPONENT`, reported as `EXPONENT_CARRIED_INTO_MAP`
456
492
 
457
493
  `slantDelay` also interpolates across the longitude seam of a grid that closes the circle, and returns a value along a line of sight through a pole.
494
+
458
495
  - **Breaking.** The reader refuses what it used to misplace or pass over:
459
496
  - a `MAP DIMENSION 3` product, or an `HGT1 / HGT2 / DHGT` giving several heights
460
497
  - a band whose latitude, longitude or height is not a grid node
@@ -514,6 +551,7 @@ restates an engine change as it reaches the JavaScript API.
514
551
  - in the file header only: `RINEX VERSION / TYPE`, `TIME OF FIRST OBS`, `TIME OF LAST OBS`, `LEAP SECONDS` and `# OF SATELLITES`
515
552
 
516
553
  Two scale factors for one code and two channels for one GLONASS slot are refused too. The later record used to win. Conflicting phase shifts or GLONASS biases are kept and read as `ambiguous` instead of being refused.
554
+
517
555
  - Flag 6 epochs are read as cycle slips into `ObsEpoch.cycleSlips` and `cycleSlipSatellites`, with `satellites` and `observations` empty, and `rinexObsCycleSlipFlag()` returns the flag. New `ObsEpoch` getters: `observations`, `rcvClockOffsetS`, `epochPicoseconds`, `declaredRecordCount` and `specialRecords` (the records an event carried, verbatim; they used to be discarded).
518
556
  - New `ObsHeader` getters: `rinex2Types`, `rinex2System`, `programRunByDate`, `comments`, `markerNumber`, `markerType`, `observer`, `agency`, `receiver`, `antenna`, `timeOfLastObsEpoch`, `timeOfLastObsScale`, `declaredSatelliteCount`, `prnObsCounts`, `scaleFactors`, `signalStrengthUnit` and `unretainedHeaderLabels`. `leapSeconds` is an `ObsLeapSeconds` with `bigint` fields and a `timeSystem` that keeps blank and `GPS` distinct. `RinexObs.skippedRecords` is also new.
519
557
  - `ObsHeader.glonassCodPhsBis` returns the record as written, with `biasM: null` for a blank bias. A header with a blank bias used to be refused. `glonassCodePhaseBias(code)` returns `available`, `none`, `unknown` or `ambiguous`.
@@ -610,6 +648,7 @@ restates an engine change as it reaches the JavaScript API.
610
648
  - a comment in which a word `ORDER` is followed by labels to the end of the line
611
649
 
612
650
  A header naming a label outside the eleven constituents, repeating one, or holding another count is refused with a `BlqParseError`.
651
+
613
652
  - The BLQ writer throws a `BlqWriteError` with the zero-based `block` index for a block that would not read back unchanged:
614
653
  - a station that is empty, holds a line break or surrounding whitespace, or reads as a comment, header or row
615
654
  - a non-finite coefficient
@@ -724,21 +763,6 @@ restates an engine change as it reaches the JavaScript API.
724
763
  - Engine update: sidereon 1.2.0 / sidereon-core 1.2.0, which corrects lenient
725
764
  RINEX 4 CNAV decoding and RTKLIB SBAS wire-form preservation.
726
765
 
727
- ## Unreleased
728
-
729
- ### Added
730
-
731
- - Lenient RINEX NAV parsing with core skipped-block diagnostics and standalone
732
- encoding for arbitrary caller-supplied record lists.
733
- - Direct, RINEX-version-aware observation-code frequency and wavelength
734
- mappings.
735
- - EMS and RTKLIB SBAS text-log parsers returning timestamped raw message
736
- blocks with structured decode access.
737
- - Added core-backed `secondOfDay`, `dayOfYear`, and `dataDayOfYear` calendar
738
- helpers.
739
- - Added core-backed six-by-six covariance unit conversion, PSD interpolation,
740
- and ECI/RTN transform helpers using flat row-major arrays.
741
-
742
766
  ## 1.1.1 - 2026-08-26
743
767
 
744
768
  ### Changed
package/README.md CHANGED
@@ -15,7 +15,7 @@ checked against IGS products.
15
15
  ## Install
16
16
 
17
17
  ```sh
18
- npm install @neilberkman/sidereon@4.0.0
18
+ npm install @neilberkman/sidereon@4.2.0
19
19
  ```
20
20
 
21
21
  The package is dual ESM/CJS and ships prebuilt wasm with bundled TypeScript
@@ -428,6 +428,131 @@ CCSDS OMM, OPM, OEM and CDM readers and writers throw `OmmError`, `OpmError`,
428
428
  engine variant (`kind`) and its fields. A value a message does not carry reads
429
429
  as `undefined`.
430
430
 
431
+ ## Numerical forces and propagation
432
+
433
+ `propagateState` accepts a built-in `forceModel`, optional atmospheric
434
+ `drag`, an optional `context`, and an `additionalForces` array. Use
435
+ `propagateStateWithSpaceWeather(request, table, context)` to drive the
436
+ configured drag with a weather table. The engine evaluates additional forces
437
+ in array order after built-in forces and drag.
438
+
439
+ `propagateState` ignores extra keys on the request, `drag` and
440
+ `drag.spaceWeather`. Its `forceModel` configuration rejects unknown keys.
441
+ `propagateStateWithSpaceWeather` checks keys throughout the request.
442
+ The released `OrbitFitOptions.integratorOptions` accepts `denseOutput` for
443
+ compatibility and ignores it.
444
+
445
+ Pass shared `ForceModel` handles in `additionalForces` for either propagation
446
+ or `OrbitParameterFitOptions`. Concrete force classes such as
447
+ `EmpiricalRtnAcceleration` and `SolarRadiationPressure` provide
448
+ `asForceModel()`. The original handles remain available after the call.
449
+ `OrbitParameterFitOptions.forceModel` returns a handle for the configured
450
+ built-in force, including the engine default when omitted. Use that handle
451
+ to inspect parameters and evaluate accelerations and partials.
452
+ `CompositeForceModel` consumes its supplied handles and evaluates them in
453
+ input order.
454
+
455
+ A reusable `StatePropagator` accepts a weather table through
456
+ `setSpaceWeather(table)`. Pass `additionalForces` in the final options object
457
+ of `propagateTo` or `propagateToWithContext`, or as the final argument of
458
+ `ephemerisWithContext`. The state propagator and context-aware covariance
459
+ options, orbit parameter fit options, variational integrator options, and
460
+ context-aware decay requests reject unknown keys, including in nested
461
+ configuration objects.
462
+
463
+ The force APIs expose estimable parameters, replacement parameter values,
464
+ state partials and parameter partials. Matrices are flat row-major
465
+ `Float64Array`s. Parameter partials contain one consecutive three-vector per
466
+ parameter. `propagateVariational` returns the state, state transition matrix,
467
+ and sensitivity to selected parameters. Each propagation epoch is labeled
468
+ in TDB seconds from J2000 and integrated in elapsed Terrestrial Time.
469
+ `VariationalEpoch.fromTdbSeconds` derives the elapsed TT from the TDB epochs.
470
+
471
+ Cannonball solar radiation pressure defaults to apparent-disc lighting,
472
+ the WGS84 oblate Earth and lunar occultation. Select `ShadowFunction.Conical`
473
+ and `EarthShadowModel.Spherical` to use spherical Earth-only conical lighting.
474
+ Earth albedo and thermal radiation pressure can be added to a composite.
475
+ Atmospheric drag uses the UT1 Earth rotation and UTC space-weather epochs.
476
+
477
+ ## Ephemerides, Earth orientation and analytic orbits
478
+
479
+ `DeEphemeris.fromBytes` reads JPL DE data and gives geocentric GCRF Sun and
480
+ Moon states and file constants. `sunMoonGcrs` and its epoch-specific
481
+ variants evaluate analytic Sun and Moon positions on GCRS axes.
482
+ `sunMoonEci` returns mean equator and equinox of date positions.
483
+ `Iers2010EarthOrientationProvider` uses daily EOP samples for GCRF–ITRF
484
+ orientation and rotation rates. Attach either data source to a
485
+ `PropagationContext` for propagation, covariance, decay or estimation.
486
+
487
+ `IcgemGravityField.parse` and `fromBytes` read static and time-variable
488
+ spherical harmonics, coefficient uncertainties and tide-system metadata.
489
+ Field truncation controls the stored degree and order. Gravity built from
490
+ the field evaluates the geopotential and perturbing acceleration with the
491
+ Holmes–Featherstone recursion.
492
+
493
+ `EcksteinHechlerPropagator` handles near-circular zonal orbits using
494
+ `CircularElements`. `BrouwerLyddanePropagator` uses `KeplerianElements` for
495
+ elliptic zonal orbits. Both expose mean and osculating conversions, Cartesian
496
+ states and sampled ephemerides.
497
+
498
+ ## Orbit scoring and parameter estimation
499
+
500
+ `scoreOrbit` compares a `PredictedSp3`, `BroadcastOrbit`, or
501
+ `OrbitTrajectory` against a precise SP3 reference. Reports include
502
+ per-satellite and per-constellation horizon bins, radial/transverse/normal
503
+ errors, SISRE, clock errors and coverage counts. Configure missing-data
504
+ handling with `GapPolicy` and frame reconciliation with
505
+ `Sp3FrameReconciliationOptions`.
506
+
507
+ `fitInertialOrbitParameters` and `fitSp3EcefOrbitParameters` fit the initial
508
+ state and selected named force parameters. Results include the fit
509
+ covariance, RTN residuals, and standard deviations and correlations by
510
+ parameter name. The estimate's epoch and any initial-state seed use TDB.
511
+
512
+ ## Eclipse and GNSS attitude
513
+
514
+ Earth and Moon eclipse functions return shadow fraction or illumination
515
+ status. Gradient functions return the derivative with respect to the
516
+ satellite position. `nominalYaw` and `dybAxes` evaluate instantaneous
517
+ geometry. `GnssBlock` identifies satellite designs, and
518
+ `GnssAttitudeLaw.forBlock` returns the published yaw law and defaults
519
+ for the selected block.
520
+
521
+ Use `gnssAttitude(law, trajectory, tS)` to evaluate a yaw law along an
522
+ `OrbitAttitudeTrajectory`. Both `gnssAttitude` and `trajectory.sample(tS)`
523
+ take TDB seconds past J2000. The sample contains GCRF satellite position,
524
+ velocity and Sun position in metres and metres per second. Analytic and
525
+ numerical inputs must already be in GCRF. Earth-fixed positions must align
526
+ with the provider's ITRF.
527
+
528
+ Construct the trajectory with `fromSp3`, `fromBroadcast`, `fromOrbitSource`,
529
+ `fromEcksteinHechler`, `fromBrouwerLyddane` or `fromDenseOutput`.
530
+ `fromOrbitSource` accepts `PredictedSp3`, `BroadcastOrbit` and
531
+ `OrbitTrajectory`, or their shared `asOrbitSource()` handles.
532
+ For Earth-fixed sources, omitting the orientation argument selects the
533
+ default TDB provider. The trajectory retains its orbit data and a share of
534
+ any supplied `Iers2010EarthOrientationProvider`. The original handles can
535
+ be reused or freed after construction.
536
+
537
+ Use `withDeEphemeris` to supply JPL DE Sun positions and
538
+ `withVelocityHalfStepS` to set the velocity difference interval to twice
539
+ the specified half step on the Earth-fixed source's time axis. Choose a
540
+ half step that reaches an adjacent epoch for a node-only source.
541
+ `sample` returns `undefined` if a sample is unavailable. A yaw law may also
542
+ need samples at nearby epochs and can throw `GnssAttitudeError`.
543
+
544
+ For continuous numerical output, pass `{ denseOutput: true }` to
545
+ `propagateTo(tEnd, options)` or `propagateToWithContext(tEnd, context, options)`
546
+ on a DP5(4) `StatePropagator`. Pass the result's `dense` handle to
547
+ `OrbitAttitudeTrajectory.fromDenseOutput`. The handle's `coverageTdbSeconds()`
548
+ returns the chronological `[start, end]` bounds as a `Float64Array` or
549
+ `undefined` for empty output. Free the result and its returned handles when
550
+ finished with them.
551
+
552
+ Classes that have core value equality expose `equals(other)`. Return values
553
+ owned by a class use `free()` or `Symbol.dispose`. Typed failures carry
554
+ the engine message and structured `kind` and `detail` properties.
555
+
431
556
  ## Capabilities
432
557
 
433
558
  The package provides these APIs:
@@ -76,13 +76,13 @@ 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` 4.0.0
80
- at commit 3132eeac13ebf30f63766fc608aa9aae9258dd3d are included under
81
- `third_party_source/sidereon-core-4.0.0/tides/`. Their contents match that
79
+ The exact public non-test tide sources distributed in `sidereon-core` 4.2.0
80
+ at commit 17b493fe8cf6d1b45ecc0982e7d594b88cdd2b7b are included under
81
+ `third_party_source/sidereon-core-4.2.0/tides/`. Their contents match that
82
82
  release source. These copies provide the source for every tide routine in the
83
83
  compiled WebAssembly artifact; they are not represented as original IERS
84
84
  software or as endorsed by the IERS Conventions Center.
85
- Source: [sidereon-core tides at the pinned commit](https://github.com/neilberkman/sidereon/tree/3132eeac13ebf30f63766fc608aa9aae9258dd3d/crates/sidereon-core/src/tides).
85
+ Source: [sidereon-core tides at the pinned commit](https://github.com/neilberkman/sidereon/tree/17b493fe8cf6d1b45ecc0982e7d594b88cdd2b7b/crates/sidereon-core/src/tides).
86
86
 
87
87
  --------------------------------------------------------------------------------
88
88
  ## Reference algorithms (no code copied)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neilberkman/sidereon",
3
- "version": "4.0.0",
3
+ "version": "4.2.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-4.0.0/tides/mod.rs",
50
- "third_party_source/sidereon-core-4.0.0/tides/ocean.rs",
51
- "third_party_source/sidereon-core-4.0.0/tides/pole.rs",
49
+ "third_party_source/sidereon-core-4.2.0/tides/mod.rs",
50
+ "third_party_source/sidereon-core-4.2.0/tides/ocean.rs",
51
+ "third_party_source/sidereon-core-4.2.0/tides/pole.rs",
52
52
  "pkg/sidereon.js",
53
53
  "pkg/sidereon.d.ts",
54
54
  "pkg/sidereon_bg.wasm",