Created
August 8, 2019 10:14
-
-
Save jorgepiloto/6383a5b67811befdc64da06aa1b5068d to your computer and use it in GitHub Desktop.
poliastro issue #751
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astropy import units as u | |
from poliastro.twobody.angles import nu_to_M | |
from poliastro.core.angles import nu_to_M as nu_to_M_core | |
nu = 150 * u.deg | |
ecc = 0.08 * u.one | |
# If making use of radians in high-level function | |
M = nu_to_M(nu.to(u.rad), ecc) | |
print("\nHigh level function radian input results") | |
print("M:", M.to(u.deg)) | |
print("M:", M.to(u.rad)) | |
# If making use of radians in high-level function | |
M = nu_to_M(nu.to(u.deg), ecc) | |
print("\nHigh level function degrees input results") | |
print("M:", M.to(u.deg)) | |
print("M:", M.to(u.rad)) | |
# If making use of radians in low-level function | |
M = nu_to_M_core(nu.to(u.rad), ecc) | |
print("\nLow level function radians input results") | |
print("M:", M) | |
# If making use of radians in low-level function | |
M = nu_to_M_core(nu.to(u.deg), ecc) | |
print("\nLow level function degrees input results") | |
print("M:", M) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment