Skip to content

Commit

Permalink
small fix for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceki committed Mar 18, 2024
1 parent 8031f67 commit eebabd6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_batched_sgp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ def test_sgp4_batched(self):
try:
dsgp4.initialize_tle(tle,gravity_constant_name="wgs-72");
#we only check those that have not failed to initialize:
if tle._error==0:
tsinces=torch.rand(100)*10
tles_batch+=[tle]*len(tsinces)
tsinces_batch+=[tsinces]
out_non_batched+=[dsgp4.propagate(tle,tsinces)]
if tle._error==0:
#batch mode only supports isimp==0
if tle._isimp==0:
tsinces=torch.rand(100)*10
tles_batch+=[tle]*len(tsinces)
tsinces_batch+=[tsinces]
out_non_batched+=[dsgp4.propagate(tle,tsinces)]
except Exception as e:
self.assertTrue((str(e).split()==error_string.split()) or ((str(e).split()==error_string_isimp.split())))
tsinces_batch=torch.cat(tsinces_batch)
Expand Down

0 comments on commit eebabd6

Please sign in to comment.