Plotting


In [1]:
%matplotlib inline

In [2]:
from numpy import radians
from scipy.constants import kilo

from orbital import earth, KeplerianElements, Maneuver, plot, plot3d

In [3]:
# Create molniya orbit from period and eccentricity
from orbital import earth_sidereal_day
molniya = KeplerianElements.with_period(
    earth_sidereal_day / 2, e=0.741, i=radians(63.4), arg_pe=radians(270),
    body=earth)

# Simple circular orbit
orbit = KeplerianElements.with_altitude(1000 * kilo, body=earth)

Simple plots


In [4]:
plot(molniya)



In [5]:
plot3d(molniya)


Animation


In [6]:
plot(molniya, title='Molniya 1', animate=True);



In [7]:
plot3d(molniya, title='Molniya 2', animate=True);


Maneuvers


In [8]:
man = Maneuver.hohmann_transfer_to_altitude(10000 * kilo)

In [9]:
plot(orbit, title='Maneuver 1', maneuver=man)



In [10]:
plot3d(orbit, title='Maneuver 2', maneuver=man)