4040 eccentric_anomaly_from_true_anomaly ,
4141 mean_anomaly_from_true_anomaly ,
4242 ConvergenceException ,
43+ PrecisionWarning ,
4344)
4445
4546# disable numba's jit
@@ -309,7 +310,8 @@ def test_cartesian_keplerian_zero():
309310 "true_anomaly_rad" : 1.126627 ,
310311 }
311312
312- keplerian_elements = cartesian_to_keplerian (pos , vel )
313+ with pytest .warns (PrecisionWarning ):
314+ keplerian_elements = cartesian_to_keplerian (pos , vel )
313315
314316 for key , true_val in truth .items ():
315317 measured_val = keplerian_elements [key ]
@@ -364,13 +366,16 @@ def test_ea_from_ma_divergence():
364366
365367
366368class TestKeplerianEdgeCases :
369+
370+ @pytest .mark .filterwarnings ("ignore:.*" )
367371 def test_zero_raan (self ):
368372 pos = np .array ([1 , 0 , 0 ])
369373 vel = np .array ([1 , 0 , 0 ])
370374 kep = cartesian_to_keplerian (pos , vel )
371375
372376 assert kep ["raan_rad" ] < 1e-6
373377
378+ @pytest .mark .filterwarnings ("ignore:.*" )
374379 def test_wrapped_raan (self ):
375380 pos = np .array ([0 , - 1 , 0 ])
376381 vel = np .array ([0 , 0 , 1 ])
@@ -379,6 +384,7 @@ def test_wrapped_raan(self):
379384 assert kep ["raan_rad" ] >= 0
380385 assert kep ["raan_rad" ] <= 2 * np .pi
381386
387+ @pytest .mark .filterwarnings ("ignore:.*" )
382388 def test_true_anom_sign (self ):
383389 pos = np .array ([1 , 0 , 0 ])
384390 vel = np .array ([- 1 , 0 , 0 ])
@@ -387,6 +393,7 @@ def test_true_anom_sign(self):
387393 assert kep ["true_anomaly_rad" ] >= 0
388394 assert kep ["true_anomaly_rad" ] <= 2 * np .pi
389395
396+ @pytest .mark .filterwarnings ("ignore:.*" )
390397 def test_dot_overcalc (self ):
391398 """Make sure everything works properly even if dot products
392399 overshoot calculations due to floating point issues."""
0 commit comments