API Refactor: Maneuver objects - poliastro/poliastro GitHub Wiki

The Maneuver objects would represent a transition between two states via an intermediate set of instantaneous burns.

It's easy to simply store Δv and Δt: this way, the maneuver is always possible.

man = Maneuver([(dt_1, dv_1), (dt_2, dv_2)])

Notice I can have a nonzero dt_1 if I want to specify a Maneuver whose application is delayed in time from the initial state. Otherwise I can just set it to 0. Besides, as explained in API Refactor: Summary and recap there is no knowledge about propagation here - it belongs to Orbit objects, best showcased in API Refactor: Maneuver example.

There are several helper functions to compute the impulses from well known maneuvers:

from poliastro import *

Maneuver.inclination(state1, inc=state1.inc + 5 * u.deg)
Maneuver.hohmann(state1, a=9000 * u.km)
Maneuver.bielliptic(state1, a_i=20000 * u.km, a=9000 * u.km)
Maneuver.lambert(state1, state2)  # Two full timed states

Properties and methods

Some properties and methods:

  • .combine(): performs a vector sum of adjacent impulses to reduce total cost. Returns a new Maneuver.
  • .total_cost
  • .time_of_flight

Consider that a Maneuver can be represented too as a vector of times and a vector of Δv. This is interesting because imagine I have a dense vector of times and all Δv are zero: the use case for plotting an orbit! And I can extend this approach for the case when there are actual burs too and plot a complete mission. Think about it: this is a hint that a Maneuver can be a more general form of something (or a subclass or something).


Future: It's easy to extend this concept to continuous-thrust maneuvers. Possibility would be admitting (t, Δv, duration=0) or (t, Impulse) to generalize for non instantaneous burns.