ssapy_toolkit.Orbital_Mechanics.transfer_shooter
- ssapy_toolkit.Orbital_Mechanics.transfer_shooter(*args, r1=None, v1=None, r2=None, v2=None, orbit1=None, orbit2=None, tol=1, max_iter=50, plot=False, status=False, accel=<ssapy.accel.AccelKepler object>)[source]
Finds an initial delta-v that will lead to a transfer orbit with an arrival position within tol (in meters) of the target position r2.
This function uses a finite-difference Newton shooting method. At each iteration, the error vector is defined as F(delta_v) = r_arrival(delta_v) - r2, where r_arrival is the position at the time of closest approach. The Jacobian dF/d(delta_v) is approximated via finite differences, and a Newton update is computed.
- Parameters:
*args (tuple) – Positional arguments: either (orbit1, orbit2) or (r1, v1, r2, v2).
r1 (array_like, optional) – Initial position and velocity vectors (m, m/s).
v1 (array_like, optional) – Initial position and velocity vectors (m, m/s).
r2 (array_like, optional) – Target position vector (m).
v2 (array_like, optional) – Target velocity vector (m/s). If not provided and r2 is given, assumes a circular orbit at r2.
orbit1 (ssapy.Orbit, optional) – Initial orbit object; if provided, r1 and v1 are extracted from it.
orbit2 (ssapy.Orbit, optional) – Target orbit object; if provided, r2 and v2 are extracted from it.
tol (float, optional) – Tolerance (in meters) for the arrival position error. Default is 1.
max_iter (int, optional) – Maximum number of iterations for the Newton method. Default is 50.
show (bool, optional) – If True, displays a plot of the transfer orbit. Default is False.
status (bool, optional) – If True, prints iteration details. Default is False.
- Returns:
Dictionary containing: - ‘initial’: Orbit object for the initial orbit - ‘final’: Orbit object for the target orbit - ‘transfer’: Orbit object for the transfer orbit - ‘|delta_v1|’: Magnitude of initial delta-V (m/s) - ‘|delta_v2|’: Magnitude of final delta-V (m/s) - ‘delta_v1’: Initial delta-V vector (m/s) - ‘delta_v2’: Final delta-V vector (m/s) - ‘r_transfer’: Position array of the transfer orbit up to closest approach (m) - ‘v_transfer’: Velocity array of the transfer orbit up to closest approach (m/s) - ‘tof’: Time of flight to closest approach (s) - ‘t_to_transfer’: Time to transfer start (s, always 0 here) - ‘error’: Final position error at closest approach (m) - ‘fig’: Matplotlib figure object (if show=True)
- Return type:
- Raises:
ValueError – If input arguments are invalid or insufficient.
Author –
------ –
Travis Yeager (yeager7@llnl.gov) –