From a0a3b3974cab754c10a1517d82762b99482970ce Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Tue, 12 May 2026 19:01:27 -0400 Subject: update packages to latest versions --- src/solar_system/orbit.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/solar_system/orbit.rs') diff --git a/src/solar_system/orbit.rs b/src/solar_system/orbit.rs index f5a564c..b29e2c2 100644 --- a/src/solar_system/orbit.rs +++ b/src/solar_system/orbit.rs @@ -1,9 +1,11 @@ -use crate::solar_system::{Angle, BodyId, Kilometers, OrbitalBody, Percentage}; +use crate::solar_system::{Angle, BodyId, Kilometers, OrbitalBody, Percentage, SystemId}; use crate::timeman::{Second}; pub struct StaticOrbit { parent: BodyId, + system: SystemId, + eccentricity: Percentage, inclination: Angle, long_asc_node: Angle, @@ -23,6 +25,7 @@ impl StaticOrbit { pub fn new( parent: BodyId, + system: SystemId, eccentricity: Percentage, inclination: Angle, long_asc_node: Angle, @@ -32,6 +35,7 @@ impl StaticOrbit -> Self { Self { parent, + system, eccentricity, inclination, long_asc_node, @@ -48,6 +52,7 @@ impl StaticOrbit { Self { parent: parent.id(), + system: parent.system(), eccentricity: 1e-6, inclination: 0.0, long_asc_node: 0.0, @@ -65,9 +70,8 @@ impl StaticOrbit ((self.semi_major_axis.powf(3.0) / this_body.sgp()).sqrt() * std::f64::consts::TAU) as Second } - pub fn parent(&self) -> BodyId { - self.parent - } + pub fn parent(&self) -> BodyId { self.parent } + pub fn system(&self) -> SystemId { self.system } pub fn sma(&self) -> Kilometers { self.semi_major_axis } -- cgit v1.2.3