From 722a65b01217fe83bccae9bf2a0f64d967c1e445 Mon Sep 17 00:00:00 2001 From: ApsisRS contributors Date: Wed, 30 Sep 2026 18:40:49 +0800 Subject: [PATCH] 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. --- crates/foundation/apsis-math/src/parallel.rs | 2 +- crates/network/apsis-access/tests/batch.rs | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/foundation/apsis-math/src/parallel.rs b/crates/foundation/apsis-math/src/parallel.rs index 1b5aef7..f3a73d7 100644 --- a/crates/foundation/apsis-math/src/parallel.rs +++ b/crates/foundation/apsis-math/src/parallel.rs @@ -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 diff --git a/crates/network/apsis-access/tests/batch.rs b/crates/network/apsis-access/tests/batch.rs index 0cb1f5f..02e6d1d 100644 --- a/crates/network/apsis-access/tests/batch.rs +++ b/crates/network/apsis-access/tests/batch.rs @@ -34,13 +34,17 @@ fn track(satellite: &Satellite, samples: usize) -> Vec { (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) })