ManeuversΒΆ

from scipy.constants import kilo

from orbital import earth, KeplerianElements, Maneuver, plot

Here, we define an orbit and then plot it with several different maneuvers applied.

Note: Plotting an orbit with a maneuver doesn’t apply the maneuver to the original orbit.

orbit1 = KeplerianElements.with_altitude(1000 * kilo, body=earth)
man1 = Maneuver.set_apocenter_altitude_to(10000 * kilo)
plot(orbit1, title='Maneuver 1', maneuver=man1)
../../../_images/output_5_01.png
man2 = Maneuver.set_apocenter_radius_to(22000 * kilo)
plot(orbit1, title='Maneuver 2', maneuver=man2)
../../../_images/output_6_01.png
man3 = Maneuver.set_pericenter_radius_to(6800 * kilo)
plot(orbit1, title='Maneuver 3', maneuver=man3)
../../../_images/output_7_01.png
man4 = Maneuver.set_pericenter_altitude_to(500 * kilo)
plot(orbit1, title='Maneuver 4', maneuver=man4)
../../../_images/output_8_01.png
man5 = Maneuver.change_apocenter_by(1000 * kilo)
plot(orbit1, title='Maneuver 5', maneuver=man5)
../../../_images/output_9_0.png
man6 = Maneuver.change_pericenter_by(-500 * kilo)
plot(orbit1, title='Maneuver 6', maneuver=man6)
../../../_images/output_10_0.png
man7 = Maneuver.hohmann_transfer_to_altitude(10000 * kilo)
plot(orbit1, title='Maneuver 7', maneuver=man7)
../../../_images/output_11_0.png

To apply a maneuver, simply use the following method:

orbit1.apply_maneuver(man7)

Now orbit can be plotted to show its new state:

plot(orbit1, title='Applied Maneuver')
../../../_images/output_15_0.png