Skip to content

Commit

Permalink
minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavransky committed Dec 19, 2022
1 parent a9db1e0 commit beaff1b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions keplertools/keplerSTM.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
x0 (ndarray):
6n vector of stacked positions and velocities for n planets
mu (ndarray):
n vector of standard gravitational parameters mu = G(m+m_s) where m is
the planet mass, m_s is the star mass and G is the gravitational
n vector of standard gravitational parameters mu = G(m+m_s) where m is
the planet mass, m_s is the star mass and G is the gravitational
constant
epsmult (float):
default multiplier on floating point precision, used as convergence
default multiplier on floating point precision, used as convergence
metric. Higher values mean faster convergence, but sacrifice precision.
prefVallado (bool):
If True, always try the Vallado algorithm first, otherwise try Shepherd first.
Expand All @@ -40,11 +40,11 @@
All units must be complementary (i.e., if position is AU and velocity
is AU/day, mu must be in AU^3/day^2.
Two algorithms are implemented, both using Batting/Goodyear universal variables.
Two algorithms are implemented, both using Batting/Goodyear universal variables.
The first is from Shepperd (1984), using continued fraction to solve the Kepler equation.
The second is from Vallado (2004), using Newton iteration to solve the time equation.
The second is from Vallado (2004), using Newton iteration to solve the time equation.
One algorithm is used preferentially, and the other is called only in the case of convergence
failure on the first. All convergence is calculated to machine precision of the data type and
failure on the first. All convergence is calculated to machine precision of the data type and
variable size, scaled by a user-selected multiple.
"""
Expand Down Expand Up @@ -232,7 +232,7 @@ def calcSTM_vallado(self, dt):

s = np.arctan2(1.0, (3.0 * np.sqrt(self.mu[porbs] / p ** 3.0) * dt)) / 2.0
w = np.arctan((np.tan(s)) ** (1.0 / 3.0))
xi[porbs] = sqrt(p) * 2.0 / tan(2 * w)
xi[porbs] = np.sqrt(p) * 2.0 / np.tan(2 * w)
self.alpha[porbs] = 0

if np.any(horbs):
Expand Down

0 comments on commit beaff1b

Please sign in to comment.