From db8722faf8f7c7b0de0f3bd8a02c19bf9592e429 Mon Sep 17 00:00:00 2001 From: Gregory Eslinger Date: Sun, 13 Oct 2024 23:01:13 -0400 Subject: [PATCH] Fixed sign error --- src/dynamics/sph_harmonics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dynamics/sph_harmonics.rs b/src/dynamics/sph_harmonics.rs index 073d47fe..f070902b 100644 --- a/src/dynamics/sph_harmonics.rs +++ b/src/dynamics/sph_harmonics.rs @@ -231,7 +231,7 @@ impl AccelModel for Harmonics { sum.x += (m as f64) * a_nm[(n, m)] * e_; sum.y += (m as f64) * a_nm[(n, m)] * f_; sum.z += self.vr01[(n, m)] * a_nm[(n, m + 1)] * d_; - sum.w += self.vr11[(n, m)] * a_nm[(n + 1, m + 1)] * d_; + sum.w -= self.vr11[(n, m)] * a_nm[(n + 1, m + 1)] * d_; } let rr = rho_np1 / eq_radius_km; accel4 += rr * sum;