Commit Graph

12 Commits

Author SHA1 Message Date
ApsisRS contributors f48c4d9bd7 docs: render formulas as math with a vendored MathJax
The rustdoc in this toolchain does not parse math (its pulldown-cmark options
omit ENABLE_MATH, `--mathjax` and `html_mathjax` are gone, and a `$$...$$`
paragraph is emitted verbatim). Display formulas were therefore written as
```text code blocks, which the request asked to replace with math syntax.

MathJax 3.2.2 (tex-svg-full, Apache-2.0) is vendored under
docs/vendor/mathjax so the rendered pages need no network access.
docs/mathjax.html loads it from the documentation root computed from rustdoc's
own static file prefix; crates/apsis-rs/build.rs copies it into that root, and
scripts/build-docs.sh makes the copy reliable. Each formula is wrapped in a
raw HTML `<div>` so the markdown layer leaves the LaTeX untouched, because
markdown would otherwise consume the backslashes in `\\\\`, `\,`, `\!` and
`\_`.

All 54 formula blocks (27 formulas, English and Chinese) become `$$...$$`;
the 22 command, 2 diagram and 2 scenario-format blocks stay as ```text.
2026-10-02 12:28:20 +08:00
ApsisRS contributors 655e214a5e docs: repair partial translations, sentence splits and duplicated blocks
The bilingual sweep had left some blocks with only their last paragraph
translated, a few with the Chinese inserted inside an English sentence,
and some with a repeated paragraph from a re-applied table. A rewrite of
the coverage checks found them; this fixes every block and restores the
comment separators that a cleanup pass had emptied.
2026-10-02 02:18:15 +08:00
ApsisRS contributors 4f90474610 docs: bilingual comments for the orbit tests 2026-10-02 01:56:29 +08:00
ApsisRS contributors 7bb3138229 docs: bilingual module docs for the orbit layer 2026-10-02 01:47:49 +08:00
ApsisRS contributors e41e2c77bb docs: extend the bilingual sweep into routing, topology, access and rf
A translation table for the sentences that recur across the error types
and the simple accessors let the same wording be applied everywhere at
once, which both keeps the Chinese consistent and covers a hundred and
twenty-nine sites in a single pass. Routing, topology, access and the radio
frequency crates are now part of the sweep.
2026-10-02 01:10:40 +08:00
ApsisRS contributors 5c11b60069 docs: bilingual comments for the foundation, physics and orbit layers
Applies the glossary across apsis-math, apsis-time, apsis-leap,
apsis-coord, apsis-geodesy and the five orbit crates that were already
implemented, plus apsis-ephemeris, apsis-maneuver and apsis-orbit. Five
hundred and seven comment blocks now carry the English paragraph and the
Chinese one.

The checker learned to skip a comment that is only a formula, since a bare
symbol has no prose to translate and repeating it in Chinese would be noise.
The SGP4 cross-check still passes, so nothing in the numerical path moved.
2026-10-02 00:53:42 +08:00
ApsisRS contributors 4e69a0123a fix: reject an unordered sample sequence in the access search
The search binary searches the sample list to interpolate between the two
samples that straddle a crossing, and a binary search over an unordered
list returns a wrong index instead of failing. Only the first and last
times were checked, so a sequence whose ends were in order but whose
middle was not refined each crossing against the wrong pair of positions
and reported a pass that never happened. On a circular ground track,
shuffling two samples changed the result from three passes to two and
still returned Ok.

The whole sequence is now checked, with a new UnorderedSamples error kind
that says which pair is out of order. The test covers the middle-of-
sequence case that the end check missed.

Two comments also described something other than what the code does, and
two Option-returning accessors did not say what makes them None:

- GravityModel::x2o3 is the constant 2/3, used as an exponent in the
  mean motion and drag corrections, not 2 * xke^2 as its comment claimed;
  the sgp4 reference implementation uses the same constant the same way.
- WalkerPattern::plane_spacing and phase_offset returned None without
  saying so, which is the case a caller has to handle.

Both READMEs claimed twelve expect sites where there are thirteen, because
apsis-math/src/parallel.rs added one and the count was not carried over.
2026-10-02 00:03:22 +08:00
ApsisRS contributors f0f6e54fbe docs: record the parallelism decision, interfaces, and measurements
The choice of which loops to thread follows the cost of one item and the
size of the batch, and the note records both ends: the propagation that
gains five fold over a month and barely gains over a day, and the
visibility sweep that is slower in parallel below a few hundred satellites
because a single test costs a few nanoseconds. The interfaces say the same
thing, so a caller knows when to reach for them.
2026-09-30 18:43:14 +08:00
ApsisRS contributors ba2e928e0a sgp4: propagate a track across several threads
A coverage run wants a satellite's state at every minute of a day, and each
state is independent, so the loop is a candidate for several cores and the
work is large enough to pay for the threads. The parallel form returns the
same values in the same order as the sequential one, including reporting a
decayed instant as None rather than stopping early.
2026-09-30 18:36:14 +08:00
ApsisRS contributors 4d45d4cf41 workspace: remove dependencies that are declared but never used
Thirty four crates listed apsis-core or apsis-math without referencing it,
and apsis-kepler listed apsis-time and apsis-tle as well. Each was verified
removable by compiling with it taken out. An unused dependency still costs
build time and makes the dependency graph and the layer check report
relations that do not exist. The layer check now reports 104 edges, down
from 141.
2026-09-26 23:36:38 +08:00
ApsisRS contributors 6eaaa86e30 orbit: add SGP4 and SDP4 propagator 2026-09-26 14:16:23 +08:00
ApsisRS contributors d3afe86dfc workspace: initialize workspace with all layer crates 2026-09-26 12:53:13 +08:00