diff options
Diffstat (limited to 'src/solar_system/orbit.rs')
| -rw-r--r-- | src/solar_system/orbit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<f64> { @@ -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); |
