Skip to content

Commit a45275b

Browse files
Fix API change (#1)
1 parent 6ccf12a commit a45275b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tletools/tle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
that are used in the TLE format, and there is the unitful version :class:`TLEu`,
77
whose attributes are quantities (:class:`astropy.units.Quantity`), a type able to represent
88
a value with an associated unit taken from :mod:`astropy.units`.
9-
109
Here is a short example of how you can use them:
1110
1211
>>> tle_string = """
@@ -30,7 +29,7 @@
3029
from astropy.time import Time
3130

3231
# Maybe remove them from here?
33-
from poliastro.core.angles import M_to_nu as _M_to_nu
32+
from poliastro.core.angles import E_to_nu as _E_to_nu, M_to_E as _M_to_E
3433
from poliastro.twobody import Orbit as _Orbit
3534
from poliastro.bodies import Earth as _Earth
3635

@@ -162,7 +161,8 @@ def a(self):
162161
def nu(self):
163162
"""True anomaly."""
164163
if self._nu is None:
165-
self._nu = _M_to_nu(self.M * DEG2RAD, self.ecc) * RAD2DEG
164+
M = self.M * DEG2RAD
165+
self._nu = _E_to_nu(_M_to_E(M, self.ecc), self.ecc) * RAD2DEG
166166
return self._nu
167167

168168
@classmethod

0 commit comments

Comments
 (0)