From c1adf64c1aaecd5a2b9d532d707ef35971f1aa18 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Thu, 7 May 2026 08:50:05 -0400 Subject: begin work on body info window --- src/solar_system/orbit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/solar_system/orbit.rs') diff --git a/src/solar_system/orbit.rs b/src/solar_system/orbit.rs index 461de7b..1800127 100644 --- a/src/solar_system/orbit.rs +++ b/src/solar_system/orbit.rs @@ -65,7 +65,7 @@ impl StaticOrbit pub fn calculate_position_at( &self, - this_body: &OrbitalBody, + sgp: f64, time: Second) -> cgmath::Vector3 { @@ -75,7 +75,7 @@ impl StaticOrbit let arg_periaps = self.long_periapsis - long_asc_node; let sma_cubed = self.semi_major_axis.powf(3.0); - let mean_motion = (this_body.sgp() / sma_cubed).sqrt(); + let mean_motion = (sgp / sma_cubed).sqrt(); let mean_anomaly_epoch = self.mean_long - self.long_periapsis; let mean_anomaly = mean_anomaly_epoch + (mean_motion * time as f64); -- cgit v1.2.3