Skip to content

Commit

Permalink
fix: always use floats for numba
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgepiloto committed Sep 13, 2024
1 parent 42d4c91 commit 93eb71b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_all_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ def test_case_from_GMAT_hyperbolic_prograde(solver):
"""
# Initial conditions
mu_earth = 3.986004418e5 # [km ** 3 / s ** 2]
r1 = np.array([7100, 200, 1300]) # [km]
r1 = np.array([7100.0, 200.0, 1300.0]) # [km]
# This vector was obtained after propagating the initial one with original
# velocity a given amount of time.
r2 = np.array([-38113.5870, 67274.1946, 29309.5799]) # [km]
tof = 12000 # [s]
tof = 12000.0 # [s]

# Solving the problem
v1, v2 = solver(mu_earth, r1, r2, tof)

# Expected final results
expected_v1 = np.array([0, 10.35, 5.5]) # [km / s]
expected_v1 = np.array([0.0, 10.35, 5.5]) # [km / s]
expected_v2 = np.array([-3.6379, 4.4932, 1.7735]) # [km / s]

# Assert the results
Expand All @@ -122,17 +122,17 @@ def test_case_from_GMAT_hyperbolic_retrograde(solver):
"""
# Initial conditions
mu_earth = 3.986004418e5 # [km ** 3 / s ** 2]
r1 = np.array([7100, 200, 1300]) # [km]
r1 = np.array([7100.0, 200.0, 1300.0]) # [km]
# This vector was obtained after propagating the initial one with original
# velocity a given amount of time.
r2 = np.array([-47332.7499, -54840.2027, -37100.17067]) # [km]
tof = 12000 # [s]
tof = 12000.0 # [s]

# Solving the problem
v1, v2 = solver(mu_earth, r1, r2, tof, prograde=False)

# Expected final results
expected_v1 = np.array([0, -10.35, -5.5]) # [km / s]
expected_v1 = np.array([0.0, -10.35, -5.5]) # [km / s]
expected_v2 = np.array([-4.3016, -3.4314, -2.5467]) # [km / s]

# Assert the results
Expand Down

0 comments on commit 93eb71b

Please sign in to comment.