pylupnt.NBodyDynamics¶
- class pylupnt.NBodyDynamics¶
Numerical point-mass, gravity-field, SRP, drag, and relativity orbit dynamics.
- add_body(self: pylupnt._pylupnt.NBodyDynamics, body: lupnt::Body) None¶
Add a central or perturbing body to the force model.
- compute_accelerations(self: pylupnt._pylupnt.NBodyDynamics, t: SupportsFloat | SupportsIndex, x: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, 1]'], decompose_gravity: bool = False) dict¶
Return a dict mapping force-term name to its Vec3 acceleration contribution at state x and epoch t (configured frame/units). When decompose_gravity is True, gravity-field bodies are resolved into individual spherical-harmonic terms (e.g. ‘MOON_J2’, ‘MOON_C22’).
- compute_rates(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: SupportsFloat | SupportsIndex, arg1: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]']¶
Evaluate the state derivative dx/dt at epoch t [s] and state x.
- get_bodies(self: pylupnt._pylupnt.NBodyDynamics) list[lupnt::Body]¶
Return the bodies included in the force model.
- get_drag_coeff(self: pylupnt._pylupnt.NBodyDynamics) float¶
Return the drag ballistic coefficient [m^2/kg].
- get_srp_coeff(self: pylupnt._pylupnt.NBodyDynamics) float¶
Return the SRP ballistic coefficient [m^2/kg].
- get_time_step(self: pylupnt._pylupnt.NumericalOrbitDynamics) float¶
Return the integration time step [s].
- get_units(self: pylupnt._pylupnt.NBodyDynamics) pylupnt._pylupnt.UnitSystem¶
Return the active distance/time/mass unit system.
- get_use_relativity(self: pylupnt._pylupnt.NBodyDynamics) bool¶
Return whether post-Newtonian relativistic corrections are enabled.
- propagate(*args, **kwargs)¶
Overloaded function.
propagate(self: pylupnt._pylupnt.Dynamics, x0: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”], t0: Real, tf: Real, u: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”] = None) -> typing.Annotated[numpy.typing.NDArray[Real], “[m, 1]”]
Propagate state x0 from epoch t0 to tf [s]; u is an optional control input.
propagate(self: pylupnt._pylupnt.Dynamics, x0: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”], t0: Real, tf: Real, u: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”], stm: bool) -> object
Propagate x0 from t0 to tf [s]; if stm=True, also return the state transition matrix.
propagate(self: pylupnt._pylupnt.Dynamics, x0: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”], tfs: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”]) -> typing.Annotated[numpy.typing.NDArray[Real], “[m, n]”]
Propagate x0 to each output epoch in tfs [s], returning states as rows.
- propagate_stm(self: pylupnt._pylupnt.Dynamics, x0: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, 1]'], t0: SupportsFloat | SupportsIndex, tf: SupportsFloat | SupportsIndex) tuple¶
Propagate a numpy state vector [r; v] from t0 to tf, returning (state_tf, STM) as numpy arrays – convenient for a filter’s predict step authored in Python.
- propagate_stm_with_info(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: Annotated[numpy.typing.ArrayLike, Real, '[m, 1]'], arg1: Real, arg2: Real) object¶
Propagate x0 from t0 to tf [s], returning (state_tf, STM, TerminationInfo).
- propagate_with_info(*args, **kwargs)¶
Overloaded function.
propagate_with_info(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”], arg1: Real, arg2: Real) -> object
Propagate x0 from t0 to tf [s], returning (state_tf, TerminationInfo).
propagate_with_info(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”], arg1: Real, arg2: typing.Annotated[numpy.typing.ArrayLike, Real, “[m, 1]”]) -> object
Propagate x0 from t0 to each epoch in tf [s], returning (states, TerminationInfo).
- set_autodiff(self: pylupnt._pylupnt.NBodyDynamics, arg0: bool) None¶
Enable or disable automatic-differentiation rates.
- set_drag_coeff(self: pylupnt._pylupnt.NBodyDynamics, bcoeff: Real) None¶
Set the drag ballistic coefficient directly [m^2/kg].
- set_frame(self: pylupnt._pylupnt.NBodyDynamics, frame: pylupnt._pylupnt.Frame) None¶
Set the frame used for numerical integration.
- set_integrator(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: pylupnt._pylupnt.IntegratorType) None¶
Select the integrator type (see IntegratorType).
- set_integrator_params(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: pylupnt._pylupnt.IntegratorParams) None¶
Set integrator tolerances, iteration limit, and termination predicate.
- set_ode_function(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: std::function<Eigen::Matrix<double, -1, 1, 0, -1, 1> (double, Eigen: :Matrix<double, -1, 1, 0, -1, 1> const&)>) None¶
Set the ODE right-hand side f(t, x) -> dx/dt.
- set_print_progress(self: pylupnt._pylupnt.Dynamics, arg0: bool) None¶
Enable or disable a progress bar during multi-step propagation.
- set_srp_coeff(self: pylupnt._pylupnt.NBodyDynamics, CR: Real, area: Real, mass: Real) None¶
Set the SRP coefficient from reflectivity CR [-], area [m^2], and mass [kg].
- set_time_step(self: pylupnt._pylupnt.NumericalOrbitDynamics, arg0: SupportsFloat | SupportsIndex) None¶
Set the integration time step [s].
- set_units(self: pylupnt._pylupnt.NBodyDynamics, units: pylupnt._pylupnt.UnitSystem) None¶
Set the active unit system for states, constants, and acceleration output.
- set_use_relativity(self: pylupnt._pylupnt.NBodyDynamics, use_relativity: bool) None¶
Enable or disable post-Newtonian relativistic corrections.