Translational Dynamics
Settings to propagate the translational state of a body numerically can be created through the translational()
factory function, described in detail in the API documentation. In the current page, only the Tudat-specific aspects of the input will be briefly described.
The default (processed) representation for solving the translational equations of motion is by using the Cowell propagator (using Cartesian elements as the propagated states), but other formulations can be used (see below and Processed vs. Propagated State Elements).
Inputs
In addition to the settings described here, the definition of translational dynamics settings requires:
A set of acceleration models (see Acceleration Model Setup)
The initial conditions for the propagation (Cartesian state, and time)
The central bodies of the propagation
A type of propagator, since the translational state can have different representations (listed in
TranslationalPropagatorType
; default is Cowell).
Warning
The initial state must be provided in Cartesian elements w.r.t. the central body(/bodies), regardless of the propagator type
Example
In the example below, the body “Spacecraft” will be propagated w.r.t. body “Earth” (also termed the
‘propagation origin’), using given acceleration models, a given initial state which defines the
initial Cartesian state of the center of mass of “Spacecraft” w.r.t. the center of mass of “Earth”.
A Runge Kutta 4 integrator is defined with step-size of 2 seconds. The propagation will terminate
once the simulation_end_epoch
termination condition is reached. The state will be propagated
through the Encke formulation. Next to that, the propagator is asked to save the total acceleration.
The time and state will be printed on the terminal once every 24 hours.
Required Show/Hide
from tudatpy.kernel.numerical_simulation import propagation_setup from tudatpy.kernel.astro import element_conversion import numpy as np# Create physical environment bodies = environment_setup.create_system_of_bodies( ... ) # Define central bodies central_bodies = ["Earth"] # Define bodies that are propagated bodies_to_propagate = ["Spacecraft"] # Define acceleration settings acting on spacecraft acceleration_settings_spacecraft = dict( Sun=[propagation_setup.acceleration.point_mass_gravity()]) acceleration_settings = {"Spacecraft": acceleration_settings_spacecraft} # Create acceleration models. acceleration_models = propagation_setup.create_acceleration_models( bodies, acceleration_settings, bodies_to_propagate, central_bodies) # Define initial conditions as Cartesian elements w.r.t. central body (Earth) with axes along global orientation initial_state = [5.89960424e+06, 2.30545977e+06, 1.74910449e+06, -1.53482795e+03, -1.71707683e+03, 7.44010957e+03] # Define numerical integrator (RK4; step size 2 seconds) integrator_settings = propagation_setup.integrator.runge_kutta_4( 2.0 ) # Start of simulation simulation_start_epoch = 9120.0 * constants.JULIAN_DAY # Define termination settings simulation_end_epoch = 9140.0 * constants.JULIAN_DAY termination_settings = propagation_setup.propagator.time_termination( simulation_end_epoch ) # Define propagator type propagator_type = propagation_setup.propagator.encke # Define dependent variables dependent_variables_to_save = [propagation_setup.dependent_variable.total_acceleration( "Spacecraft" )] # Define translational propagator settings translational_propagator_settings = propagation_setup.propagator.translational( central_bodies, acceleration_models, bodies_to_propagate, initial_state, simulation_start_epoch, integrator_settings, termination_settings, propagator=propagator_type, output_variables= dependent_variables_to_save)// required include statements #include <tudat/simulation/simulation.h> // required using-declarations using tudat::simulation_setup; using tudat;