Skip to content

Commit

Permalink
Start cleanup of dpper() expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-rhodes committed Oct 27, 2014
1 parent 024d023 commit a3c8da1
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions sgp4/propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ def _dpper(satrec, inclo, init, ep, inclp, nodep, argpp, mp, opsmode):

if inclp >= 0.2:

ph = ph / sinip;
pgh = pgh - cosip * ph;
argpp = argpp + pgh;
nodep = nodep + ph;
mp = mp + pl;
ph /= sinip
pgh -= cosip * ph
argpp += pgh
nodep += ph
mp += pl

else:

Expand All @@ -271,9 +271,7 @@ def _dpper(satrec, inclo, init, ep, inclp, nodep, argpp, mp, opsmode):
# nodep used without a trigonometric function ahead
if nodep < 0.0 and opsmode == 'a':
nodep = nodep + twopi;
xls = mp + argpp + cosip * nodep;
dls = pl + pgh - pinc * nodep * sinip;
xls = xls + dls;
xls = mp + argpp + pl + pgh + (cosip - pinc * sinip) * nodep
xnoh = nodep;
nodep = atan2(alfdp, betdp);
# sgp4fix for afspc written intrinsic functions
Expand All @@ -285,7 +283,7 @@ def _dpper(satrec, inclo, init, ep, inclp, nodep, argpp, mp, opsmode):
nodep = nodep + twopi;
else:
nodep = nodep - twopi;
mp = mp + pl;
mp += pl
argpp = xls - mp - cosip * nodep;

return ep, inclp, nodep, argpp, mp
Expand Down

0 comments on commit a3c8da1

Please sign in to comment.