ssapy_orbit
- ssapy.simple.ssapy_orbit(orbit=None, a=None, e=0, i=0, pa=0, raan=0, ta=0, r=None, v=None, duration=(30, 'day'), freq=(1, 'hr'), t0=<Time object: scale='utc' format='iso' value=2025-01-01 00:00:00.000>, t=None, prop=RK78Propagator(<ssapy.accel.AccelSum object>, 60, (1e-06, 1e-06, 1e-06, 1e-09, 1e-09, 1e-09)))[source][source]
Compute the orbit of a spacecraft given either Keplerian elements or position and velocity vectors.
Parameters: - orbit (Orbit, optional): An Orbit object if you already have an orbit defined. - a (float, optional): Semi-major axis of the orbit in meters. - e (float, optional): Eccentricity of the orbit (default is 0, i.e., circular orbit). - i (float, optional): Inclination of the orbit in degrees. - pa (float, optional): Argument of perigee in degrees. - raan (float, optional): Right ascension of the ascending node in degrees. - ta (float, optional): True anomaly in degrees. - r (array-like, optional): Position vector in meters. - v (array-like, optional): Velocity vector in meters per second. - duration (tuple, optional): Duration of the simulation as a tuple (value, unit), where unit is ‘day’, ‘hour’, etc. Default is 30 days. - freq (tuple, optional): Frequency of the output as a tuple (value, unit), where unit is ‘day’, ‘hour’, etc. Default is 1 hour. - t0 (str, optional): Start date of the simulation in ‘YYYY-MM-DD’ format. Default is “2025-01-01”. - t (array-like, optional): Specific times at which to compute the orbit. If None, times will be generated based on duration and frequency. - prop (function, optional): A function to compute the perturbation effects. Default is ssapy_prop().
Returns: - r (array-like): Position vectors of the spacecraft at the specified times. - v (array-like): Velocity vectors of the spacecraft at the specified times. - t (array-like): Times at which the orbit was computed. Returned only if t was None.
Raises: - ValueError: If neither Keplerian elements nor position and velocity vectors are provided. - RuntimeError or ValueError: If an error occurs during computation.