apsis-rs: reuse the shared Earth radius in the network examples

Both network examples repeated the WGS 84 equatorial radius that
apsis-core already exports, so a change to the ellipsoid would not reach
them. Use the constant.
This commit is contained in:
ApsisRS contributors 2026-09-26 23:43:51 +08:00
parent 3f7d656e14
commit 71b006bcb3
2 changed files with 6 additions and 3 deletions

View File

@ -25,8 +25,9 @@ use core::f64::consts::PI;
/// The WGS 84 equatorial radius, in kilometers. /// The WGS 84 equatorial radius, in kilometers.
/// ///
/// The coverage geometry is spherical, so a single radius is used. The /// The coverage geometry is spherical, so a single radius is used. The
/// equatorial value is the one the orbit layer works in. /// value comes from the shared constants rather than being repeated, so a
const BODY_RADIUS_KM: f64 = 6_378.137; /// change to the ellipsoid reaches here.
const BODY_RADIUS_KM: f64 = apsis_core::constant::EARTH_EQUATORIAL_RADIUS;
/// One coverage case: an orbital radius and an elevation mask. /// One coverage case: an orbital radius and an elevation mask.
struct Case { struct Case {

View File

@ -41,7 +41,9 @@ use apsis_tle::TwoLineElement;
use apsis_topology::{Topology, TopologySample, TopologySeries}; use apsis_topology::{Topology, TopologySample, TopologySeries};
/// The Earth equatorial radius, in kilometers, used for the link geometry. /// The Earth equatorial radius, in kilometers, used for the link geometry.
const BODY_RADIUS_KM: f64 = 6_378.137; ///
/// The value comes from the shared constants rather than being repeated.
const BODY_RADIUS_KM: f64 = apsis_core::constant::EARTH_EQUATORIAL_RADIUS;
/// The element set of a satellite in a 550 km orbit, used as the source of /// The element set of a satellite in a 550 km orbit, used as the source of
/// the propagated track. /// the propagated track.