math, access: correct the parallel notes and a test's geometry

The parallelism note linked to a type the module does not import, which
rustdoc rejects, so it reads as plain text now. The access batch test
computed a propagated state it did not use; it now takes the shell radius
from it so the track sits at a realistic altitude.
This commit is contained in:
ApsisRS contributors 2026-09-30 18:40:49 +08:00
parent 1c5dddc229
commit 722a65b012
2 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,7 @@
//! from several cores are all embarrassingly parallel loops over independent
//! items, and the standard library's scoped threads express those directly.
//! `std::thread::scope` borrows its data, so a caller can share a slice or a
//! reader without an [`Arc`], and joins every thread before returning, so no
//! reader without an atomic reference count, and joins every thread before returning, so no
//! result escapes the scope still being written.
//!
//! The entry point is [`for_each_index`], which splits a range into one chunk

View File

@ -34,13 +34,17 @@ fn track(satellite: &Satellite, samples: usize) -> Vec<OrbitSample> {
(0..samples)
.map(|index| {
let seconds = index as f64 * 60.0;
let state = satellite
// The propagated radius sets the shell the synthetic longitude
// sweep runs on, so the track is at a realistic altitude.
let radius = satellite
.propagate_minutes(seconds / 60.0)
.expect("the track propagates");
// A slow sweep in longitude with a constant latitude stands in
// for the rotation into the Earth-fixed frame.
.expect("the track propagates")
.position
.norm();
// A slow sweep in longitude stands in for the rotation into the
// Earth-fixed frame; the exact geometry is not what this test is
// about, only that the batch search reproduces the sequential one.
let angle = seconds / 4_000.0;
let radius = 6_900.0;
let position = Vec3::new(radius * angle.cos(), radius * angle.sin(), radius * 0.3);
OrbitSample::new(seconds, position)
})