# 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 (conventional) 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 Conventional vs. Propagated 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)

A type of propagator, since the translational state can have different representations (listed in

`TranslationalPropagatorType`

).

Warning

The initial state must be provided in Cartesian elements, **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/Hidefrom tudatpy.kernel.numerical_simulation import propagation_setup from tudatpy.kernel.astro import element_conversion import numpy as np# Define central bodies central_bodies = ["Earth"] # Define bodies that are propagated bodies_to_propagate = ["Spacecraft"] # Define the acceleration models # Define acceleration settings acting on spacecraft accelerations_settings_spacecraft = dict( Sun=[propagation_setup.acceleration.point_mass_gravity()]) acceleration_settings = {"Spacecraft": accelerations_settings_spacecraft} # Create acceleration models. acceleration_models = propagation_setup.create_acceleration_models( bodies, acceleration_settings, bodies_to_propagate, central_bodies) ## BODIES MAYBE NEED TO BE ADDED? ## # Define initial conditions initial_state = [5.89960424e+06, 2.30545977e+06, 1.74910449e+06, -1.53482795e+03, -1.71707683e+03, 7.44010957e+03] # Start of simulation simulation_start_epoch = 9120 * constants.JULIAN_DAY # Define numerical integrator (RK4; step size 2 seconds) integrator_settings = propagation_setup.integrator.runge_kutta_4( 2.0 ) # Define termination settings simulation_end_epoch = 9140 * 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, print_interval=86400.0)// required include statements #include <tudat/simulation/simulation.h> // required using-declarations using tudat::simulation_setup; using tudat;