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:
parent
1c5dddc229
commit
722a65b012
|
|
@ -5,7 +5,7 @@
|
||||||
//! from several cores are all embarrassingly parallel loops over independent
|
//! from several cores are all embarrassingly parallel loops over independent
|
||||||
//! items, and the standard library's scoped threads express those directly.
|
//! 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
|
//! `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.
|
//! result escapes the scope still being written.
|
||||||
//!
|
//!
|
||||||
//! The entry point is [`for_each_index`], which splits a range into one chunk
|
//! The entry point is [`for_each_index`], which splits a range into one chunk
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,17 @@ fn track(satellite: &Satellite, samples: usize) -> Vec<OrbitSample> {
|
||||||
(0..samples)
|
(0..samples)
|
||||||
.map(|index| {
|
.map(|index| {
|
||||||
let seconds = index as f64 * 60.0;
|
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)
|
.propagate_minutes(seconds / 60.0)
|
||||||
.expect("the track propagates");
|
.expect("the track propagates")
|
||||||
// A slow sweep in longitude with a constant latitude stands in
|
.position
|
||||||
// for the rotation into the Earth-fixed frame.
|
.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 angle = seconds / 4_000.0;
|
||||||
let radius = 6_900.0;
|
|
||||||
let position = Vec3::new(radius * angle.cos(), radius * angle.sin(), radius * 0.3);
|
let position = Vec3::new(radius * angle.cos(), radius * angle.sin(), radius * 0.3);
|
||||||
OrbitSample::new(seconds, position)
|
OrbitSample::new(seconds, position)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue