Skip to content

Commit

Permalink
Merge pull request #12 from esa/kepler_equation
Browse files Browse the repository at this point in the history
kepler equation
  • Loading branch information
Sceki authored Jul 9, 2024
2 parents 152df44 + 6944691 commit 000a418
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dsgp4/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '1.0.0'
__version__ = '1.0.1'

import torch
torch.set_default_dtype(torch.float64)
Expand Down
3 changes: 3 additions & 0 deletions dsgp4/sgp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def sgp4(satellite, tsince):
tem5 = (u - aynl * coseo1 + axnl * sineo1 - eo1) / tem5
tem5=torch.where(tem5>=0.95, 0.95, tem5)
tem5=torch.where(tem5<=-0.95, -0.95, tem5)
#we need to break if abs value of tem5 is less than 1e-12:
eo1 = eo1 + tem5
if torch.all(torch.abs(tem5) < 1e-12):
break

# short period preliminary quantities
ecose = axnl*coseo1 + aynl*sineo1
Expand Down
2 changes: 2 additions & 0 deletions dsgp4/sgp4_batched.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ def sgp4_batched(satellite_batch, tsince):
tem5=torch.where(tem5>=0.95, 0.95, tem5)
tem5=torch.where(tem5<=-0.95, -0.95, tem5)
eo1 = eo1 + tem5
if torch.all(torch.abs(tem5) < 1e-12):
break

# short period preliminary quantities
ecose = axnl*coseo1 + aynl*sineo1
Expand Down

0 comments on commit 000a418

Please sign in to comment.