. _environment_setup:
Environment Setup
General information
In TudatPy, the physical environment is defined by a set of bodies, each encapsulated in a
Body
object. Each body contains a list of properties
(gravity field, ephemeris, etc.), which may be interdependent. See Available Model Types for a comprehensive list, and Points of attention for a number of overall considerations on specific types of environment models. The overall architecture of the environment in Tudat is described in more detail on a dedicated page on Environment - Overall Architecture.
Note
The Body
object may represent a celestial body or a
manmade vehicle. Tudat makes no a priori distinction between the two: the distinction is made by the user when
creating the bodies.
The combination of all Body objects is stored in a
SystemOfBodies
object (typically named
simple bodies
in the code). During the propagation, all the required properties of bodies are extracted and combined
to evaluated accelerations/torques/guidance/… and compute the state derivative of the system (see Propagation Setup for setting up a numerical propagation).
Even though the primary role of the environment is in numerical state propagation, it is also used to define properties of celestial bodies in, for instance, (semi-)analytical trajectory design (see Multiple Gravity Assists Transfer).
Body Creation - Procedure
The typical procedure to create the environment is represented in the figure and explained below.
Create body settings: create settings for bodies which have default settings (see Default environment models), customize these settings as desired, and/or manually add settings for bodies without defaults (see Creation of celestial body settings).
Create system of bodies: use the settings above to create a set of
Body
objects stored in aSystemOfBodies
object, automatically resolving any interdependencies (see Creating and modifying the bodies). If desired, add additional models and bodies afer thisBody
/SystemOfBodies
creation, with limitations on interdepenencies with existing bodies (see Adding bodies to an existing SystemOfBodies).

Body Utilization
In some cases, in particular when setting up a custom model, a user may need to interact with the simulation environment during the propagation. You can find details on how to extract information (states, orientations, altitude, etc.) from the simulation during the propagation in Interacting with the environment during propagation.