Skip to content

Instantly share code, notes, and snippets.

@jorgepiloto
Last active July 10, 2019 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgepiloto/8fe297f8e10f5394c789ff2e9bbefcc6 to your computer and use it in GitHub Desktop.
Save jorgepiloto/8fe297f8e10f5394c789ff2e9bbefcc6 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
from astropy import units as u
from astropy.time import Time
from poliastro.bodies import Earth
from poliastro.frames import GeocentricSolarEcliptic
from poliastro.plotting.static import StaticOrbitPlotter
from poliastro.twobody import Orbit
EPOCH = Time("2018-02-19")
ss_2018cb = Orbit.from_sbdb("2018cb").propagate(EPOCH)
ss_earth = Orbit.from_body_ephem(Earth, epoch=EPOCH)
plotter = StaticOrbitPlotter()
plotter.set_frame(GeocentricSolarEcliptic(obstime=EPOCH))
plotter.plot(ss_2018cb, label="2018cb", color="green")
plotter.plot(ss_earth, label="Earth", color="navy")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment