# dependent_variable#

This module provides the functionality for creating dependent variable settings. Note that all output is in SI units (meters, radians, seconds). All epochs are provided in seconds since J2000.

## Functions#

 mach_number(body, central_body) Function to add the Mach number to the dependent variables to save. altitude(body, central_body) Function to add the altitude to the dependent variables to save. airspeed(body, body_with_atmosphere) Function to add the airspeed to the dependent variables to save. body_fixed_airspeed_velocity(body, central_body) Function to add the airspeed velocity vector to the dependent variables to save. body_fixed_groundspeed_velocity(body, ...) Function to add the groundspeed velocity vector to the dependent variables to save. density(body, body_with_atmosphere) Function to add the local freestream density to the dependent variables to save. temperature(body) Function to add the local freestream temperature to the dependent variables to save. Function to add the local freestream dynamic pressure to the dependent variables to save. Function to add the total aerodynamic G-load to the dependent variables to save. relative_position(body, relative_body) Function to add the relative position vector to the dependent variables to save. relative_distance(body, relative_body) Function to add the relative distance to the dependent variables to save. relative_velocity(body, relative_body) Function to add the relative velocity vector to the dependent variables to save. relative_speed(body, relative_body) Function to add the relative speed to the dependent variables to save. keplerian_state(body, central_body) Function to add the Keplerian state to the dependent variables to save. modified_equinoctial_state(body, central_body) Function to add the modified equinoctial state to the dependent variables to save. single_acceleration(acceleration_type, ...) Function to add a single acceleration to the dependent variables to save. single_acceleration_norm(acceleration_type, ...) Function to add a single scalar acceleration to the dependent variables to save. Function to add the total scalar acceleration (norm of the vector) acting on a body to the dependent variables to save. Function to add the total acceleration vector acting on a body to the dependent variables to save. single_torque_norm(torque_type, ...) Function to add a single torque (norm of the torque vector) to the dependent variables to save. single_torque(torque_type, ...) Function to add a single torque vector to the dependent variables to save. Function to add the total torque (norm of the torque vector) to the dependent variables to save. total_torque(body) Function to add the total torque vector to the dependent variables to save. Function to add single degree/order contributions of a spherical harmonic acceleration vector to the dependent variables to save. Function to add a single term of the spherical harmonic acceleration (norm of the vector) to the dependent variables to save. aerodynamic_force_coefficients(body[, ...]) Function to add the aerodynamic force coefficients to the dependent variables to save. aerodynamic_moment_coefficients(body[, ...]) Function to add the aerodynamic moment coefficients to the dependent variables to save. latitude(body, central_body) Function to add the latitude to the dependent variables to save. geodetic_latitude(body, central_body) Function to add the geodetic latitude to the dependent variables to save. longitude(body, central_body) Function to add the longitude to the dependent variables to save. heading_angle(body, central_body) Function to add the heading angle to the dependent variables to save. flight_path_angle(body, central_body) Function to add the flight path angle to the dependent variables to save. angle_of_attack(body, central_body) Function to add the angle of attack to the dependent variables to save. sideslip_angle(body, central_body) Function to add the sideslip angle to the dependent variables to save, as defined by Mooij, 1994 [1] . bank_angle(body, central_body) Function to add the bank angle to the dependent variables to save, as defined by Mooij, 1994 [1] . radiation_pressure(body, radiating_body) Function to add the radiation pressure to the dependent variables to save. Function to add the acceleration induced by the total time-variability of a gravity field to the dependent variables to save. Function to add the acceleration induced by a single time-variability of a gravity field to the dependent variables to save. Function to add the acceleration induced by a single time-variability of a gravity field, at a given list of degrees/orders, to the dependent variables to save. Function to add the rotation matrix from inertial to body-fixed frame to the dependent variables to save. tnw_to_inertial_rotation_matrix(body, ...) Function to add the rotation matrix from the TNW to the inertial frame to the dependent variables to save. rsw_to_inertial_rotation_matrix(body, ...) Function to add the rotation matrix from the RSW to the inertial frame to the dependent variables to save. Function to add the 3-1-3 Euler angles for the rotation from inertial to body-fixed frame to the dependent variables to save. Function to add the rotation matrix between any two reference frames used in aerodynamic calculations. periapsis_altitude(body, central_body) Function to add the altitude of periapsis to the dependent variables to save. apoapsis_altitude(body, central_body) Function to add the altitude of apoapsis to the dependent variables to save. Function to add the spherical, body-fixed position to the dependent variables to save. Function to add the relative Cartesian position, in the central body's fixed frame, to the dependent variables to save. body_mass(body) Function to add the current body mass to the dependent variables to save. radiation_pressure_coefficient(body, ...) Function to add the current radiation pressure coefficient to the dependent variables to save. Function to add the total mass rate to the dependent variables to save. Function to add the gravitational potential to the dependent variables to save. Function to add the laplacian of the gravitational potential to the dependent variables to save. minimum_body_distance(body_name, bodies_to_check) Function to compute the minimum distance between a given body, and a set of other bodies. Function to compute the minimum distance between a ground station, and a set of other bodies visible from that station. custom_dependent_variable(custom_function, ...) Function to compute a custom dependent variable.
mach_number(body: str, central_body: str) #

Function to add the Mach number to the dependent variables to save.

Function to add the Mach number to the dependent variables to save. The calculation of the altitude uses the atmosphere model of the central body and the current state of the body for which the Mach number is to be calculated.

Parameters:
• body (str) – Body whose Mach number is to be saved.

• central_body (str) – Body with atmosphere with respect to which the Mach number is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Examples

To create settings for saving of a Mach number of a body name ‘Spacecraft’ w.r.t. the atmosphere of body ‘Earth’, use:

# Define save settings for Mach number
propagation_setup.dependent_variable.mach_number( "Spacecraft", "Earth" )

altitude(body: str, central_body: str) #

Function to add the altitude to the dependent variables to save.

Function to add the altitude to the dependent variables to save. The calculation of the altitude uses the shape model of the central body and the current state of the body for which the altitude is to be calculated.

Parameters:
• body (str) – Body whose altitude is to be saved.

• central_body (str) – Body with respect to which the altitude is computed (requires this body to have a shape model defined).

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

airspeed(body: str, body_with_atmosphere: str) #

Function to add the airspeed to the dependent variables to save.

Function to add the airspeed to the dependent variables to save. The calculation of the airspeed uses the rotation and wind models of the central body (to determine the motion of the atmosphere in inertial space), and the current state of the body for which the airspeed is to be calculated.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with atmosphere with respect to which the airspeed is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

body_fixed_airspeed_velocity(body: str, central_body: str) #

Function to add the airspeed velocity vector to the dependent variables to save.

Function to add the airspeed velocity vector to the dependent variables to save. The airspeed velocity vector is not provided in an inertial frame, but instead a frame centered on, and fixed to, the central body. It defines the velocity vector of a body w.r.t. the relative atmosphere It requires the central body to have an atmosphere.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the airspeed is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

body_fixed_groundspeed_velocity(body: str, central_body: str) #

Function to add the groundspeed velocity vector to the dependent variables to save.

Function to add the groundspeed velocity vector to the dependent variables to save. The groundspeed velocity vector is not provided in an inertial frame, but instead a frame centered on, and fixed to, the central body. It defines the velocity vector of a body w.r.t. ‘the ground’ or (alternatively and identically) the relative atmosphere in the case the atmosphere would be perfectly co-rotating with the central body.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the groundspeed is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

density(body: str, body_with_atmosphere: str) #

Function to add the local freestream density to the dependent variables to save.

Function to add the freestream density (at a body’s position) to the dependent variables to save. The calculation of the density uses the atmosphere model of the central body, and the current state of the body for which the density is to be calculated.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• body_with_atmosphere (str) – Body with atmosphere with respect to which the density is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

temperature(body: str) #

Function to add the local freestream temperature to the dependent variables to save.

Function to add the freestream temperature (at a body’s position) to the dependent variables to save. The calculation of the temperature uses the atmosphere model of the central body, and the current state of the body for which the temperature is to be calculated.

Parameters:

body (str) – Body whose dependent variable should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

dynamic_pressure(body: str) #

Function to add the local freestream dynamic pressure to the dependent variables to save.

Function to add the freestream dynamic pressure (at a body’s position) to the dependent variables to save. The calculation of the temperature uses the atmosphere model of the central body, and the current state of the body for which the temperature is to be calculated.

Parameters:

body (str) – Body whose dependent variable should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Function to add the total aerodynamic G-load to the dependent variables to save.

Function to add the total aerodynamic G-load of a body to the dependent variables to save. The calculation uses the atmosphere model of the central body, and the current state of the body for which the temperature is to be calculated.

Parameters:

body (str) – Body whose dependent variable should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

relative_position(body: str, relative_body: str) #

Function to add the relative position vector to the dependent variables to save.

Function to add a body’s relative position vector with respect to a second body to the dependent variables to save. The relative position is computed between the bodies’ centers of mass.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• relative_body (str) – Body with respect to which the relative position is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

relative_distance(body: str, relative_body: str) #

Function to add the relative distance to the dependent variables to save.

Function to add a body’s relative distance (norm of the position vector) with respect to a second body to the dependent variables to save. The relative distance is computed between the bodies’ centers of mass.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• relative_body (str) – Body with respect to which the relative distance is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

relative_velocity(body: str, relative_body: str) #

Function to add the relative velocity vector to the dependent variables to save.

Function to add a body’s relative velocity vector with respect to a second body to the dependent variables to save. The relative velocity is computed between the bodies’ centers of mass.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• relative_body (str) – Body with respect to which the relative velocity is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

relative_speed(body: str, relative_body: str) #

Function to add the relative speed to the dependent variables to save.

Function to add a body’s relative speed (norm of the relative velocity vector) with respect to a second body to the dependent variables to save. The relative speed is computed between the bodies’ centers of mass.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• relative_body (str) – Body with respect to which the relative speed is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

keplerian_state(body: str, central_body: str) #

Function to add the Keplerian state to the dependent variables to save.

Function to add the Keplerian state to the dependent variables to save. The Keplerian state is returned in this order: 1: Semi-major Axis. 2: Eccentricity. 3: Inclination. 4: Argument of Periapsis. 5. Right Ascension of the Ascending Node. 6: True Anomaly.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the Keplerian state is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

modified_equinoctial_state(body: str, central_body: str) #

Function to add the modified equinoctial state to the dependent variables to save.

Function to add the modified equinoctial state to the dependent variables to save. The value of the parameter I is automatically chosen as +1 or -1, depending on whether the inclination is smaller or larger than 90 degrees. The elements are returned in the order $$p$$, $$f$$, $$g$$, $$h$$, $$k$$, $$L$$

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the modified equinoctial state is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

single_acceleration(acceleration_type: tudatpy.kernel.numerical_simulation.propagation_setup.acceleration.AvailableAcceleration, body_undergoing_acceleration: str, body_exerting_acceleration: str) #

Function to add a single acceleration to the dependent variables to save.

Function to add a single acceleration vector to the dependent variables to save. The requested acceleration is defined by its type, and the bodies undergoing and exerting the acceleration. This acceleration vector represents the acceleration in 3D in the inertial reference frame. NOTE: When requesting a third-body perturbation be saved, you may use either the direct acceleration type, or the third body type. For instance, for saving a point-mass third-body perturbation, you may specify either point_mass_gravity_type or third_body_point_mass_gravity_type as acceleration type.

Parameters:
• acceleration_type (AvailableAcceleration) – Acceleration type to be saved.

• body_undergoing_acceleration (str) – Body undergoing acceleration.

• body_exerting_acceleration (str) – Body exerting acceleration.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Examples

To create settings for saving a point mass acceleration acting on body called ‘Spacecraft’, exerted by a body named ‘Earth’, use:

# Define save settings for point-mass acceleration on Spacecraft by Earth
propagation_setup.dependent_variable.single_acceleration(
propagation_setup.acceleration.point_mass_gravity_type, 'Spacecraft', 'Earth' )

single_acceleration_norm(acceleration_type: tudatpy.kernel.numerical_simulation.propagation_setup.acceleration.AvailableAcceleration, body_undergoing_acceleration: str, body_exerting_acceleration: str) #

Function to add a single scalar acceleration to the dependent variables to save.

Function to add a single scalar acceleration (norm of the acceleration vector) to the dependent variables to save. The requested acceleration is defined by its type, and the bodies undergoing and exerting the acceleration. NOTE: When requesting a third-body perturbation be saved, you may use either the direct acceleration type, or the third body type. For instance, for saving a point-mass third-body perturbation, you may specify either point_mass_gravity_type or third_body_point_mass_gravity_type as acceleration type.

Parameters:
• acceleration_type (AvailableAcceleration) – Acceleration type to be saved

• body_undergoing_acceleration (str) – Body undergoing acceleration.

• body_exerting_acceleration (str) – Body exerting acceleration.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Examples

To create settings for saving norm of a point mass acceleration acting on body called ‘Spacecraft’, exerted by a body named ‘Earth’, use:

# Define save settings for point-mass acceleration on Spacecraft by Earth
propagation_setup.dependent_variable.single_acceleration_norm(
propagation_setup.acceleration.point_mass_gravity_type, 'Spacecraft', 'Earth' )

total_acceleration_norm(body: str) #

Function to add the total scalar acceleration (norm of the vector) acting on a body to the dependent variables to save.

Parameters:

body (str) – Body undergoing acceleration.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

total_acceleration(body: str) #

Function to add the total acceleration vector acting on a body to the dependent variables to save.

Parameters:

body (str) – Body undergoing acceleration.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

single_torque_norm(torque_type: tudatpy.kernel.numerical_simulation.propagation_setup.torque.AvailableTorque, body_undergoing_torque: str, body_exerting_torque: str) #

Function to add a single torque (norm of the torque vector) to the dependent variables to save.

Parameters:
• torque_type (AvailableTorque) – Torque type to be saved.

• body_undergoing_torque (str) – Body undergoing torque.

• body_exerting_torque (str) – Body exerting torque.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

single_torque(torque_type: tudatpy.kernel.numerical_simulation.propagation_setup.torque.AvailableTorque, body_undergoing_torque: str, body_exerting_torque: str) #

Function to add a single torque vector to the dependent variables to save.

Parameters:
• torque_type (AvailableTorque) – Torque type to be saved.

• body_undergoing_torque (str) – Body undergoing torque.

• body_exerting_torque (str) – Body exerting torque.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

total_torque_norm(body: str) #

Function to add the total torque (norm of the torque vector) to the dependent variables to save.

Parameters:

body (str) – Body whose dependent variable should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

total_torque(body: str) #

Function to add the total torque vector to the dependent variables to save.

Parameters:

body (str) – Body whose dependent variable should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

spherical_harmonic_terms_acceleration(body_undergoing_acceleration: str, body_exerting_acceleration: str, component_indices: List[Tuple[int, int]]) #

Function to add single degree/order contributions of a spherical harmonic acceleration vector to the dependent variables to save.

Function to add single degree/order contributions of a spherical harmonic acceleration vector to the dependent variables to save. The spherical harmonic acceleration consists of a (truncated) summation of contributions at degree $$l$$ and order $$m$$. Using this function, you can save the contributions of separate $$l,m$$ entries to the total acceleration. For instance, when requesting dependent variables for $$l,m=2,2$$, the contribution due to the combined influence of $$ar{C}_{22}$$ and ar{S}_{22} are provided

Parameters:
• body_undergoing_acceleration (str) – Body undergoing acceleration.

• body_exerting_acceleration (str) – Body exerting acceleration.

• component_indices (list[tuple]) – Tuples of (degree, order) indicating the terms to save.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Examples

To create settings for saving spherical harmonic acceleration contributions of degree/order 2/0, 2/1 and 2/2, acting on a body names ‘Spacecraft’, exerted by a body named ‘Earth’, use the following for the acceleration. The resulting dependent variable will contain nine entries (three acceleration components for 2/0, 2/1 and 2/2, respectively).

# Define degree/order combinations for which to save acceleration contributions
spherical_harmonic_terms = [ (2,0), (2,1), (2,2) ]

# Define save settings for separate spherical harmonic contributions
propagation_setup.dependent_variable.spherical_harmonic_terms_acceleration( "Spacecraft", "Earth", spherical_harmonic_terms )

spherical_harmonic_terms_acceleration_norm(body_undergoing_acceleration: str, body_exerting_acceleration: str, component_indices: List[Tuple[int, int]]) #

Function to add a single term of the spherical harmonic acceleration (norm of the vector) to the dependent variables to save.

Function to add single term of the spherical harmonic acceleration (norm of the vector) to the dependent variables to save.

Parameters:
• body_undergoing_acceleration (str) – Body undergoing acceleration.

• body_exerting_acceleration (str) – Body exerting acceleration.

• component_indices (list[tuple]) – Tuples of (degree, order) indicating the terms to save.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Examples

To create settings for saving spherical harmonic acceleration contributions of degree/order 2/0, 2/1 and 2/2, acting on a body names ‘Spacecraft’, exerted by a body named ‘Earth’, use the following for the acceleration. The resulting dependent variable will contain three entries (one acceleration norm for 2/0, 2/1 and 2/2, respectively).

# Define degree/order combinations for which to save acceleration contributions
spherical_harmonic_terms = [ (2,0), (2,1), (2,2) ]

# Define save settings for separate spherical harmonic contributions
propagation_setup.dependent_variable.spherical_harmonic_terms_acceleration_norm( "Spacecraft", "Earth", spherical_harmonic_terms )

aerodynamic_force_coefficients(body: str, central_body: str = '') #

Function to add the aerodynamic force coefficients to the dependent variables to save.

Function to add the aerodynamic force coefficients to the dependent variables to save. It requires an aerodynamic coefficient interface to be defined for the vehicle. The coefficients are returned in the following order: C_D, C_S, C_l (if coefficient interface defined in aerodynamic frame), or C_X, C_Y, C_Z (if coefficient interface defined in body frame).

Parameters:
• body (str) – Body undergoing acceleration.

• central_body (str) – Body exerting acceleration (e.g. body with atmosphere).

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

aerodynamic_moment_coefficients(body: str, central_body: str = '') #

Function to add the aerodynamic moment coefficients to the dependent variables to save.

Function to add the aerodynamic force coefficients to the dependent variables to save. It requires an aerodynamic coefficient interface to be defined for the vehicle. The coefficients are returned in the following order: C_l, C_m, C_n , respectively about the X, Y, Z axes of the body-fixed frame, see (see Mooij, 1994 [1])

Parameters:
• body (str) – Body undergoing acceleration.

• central_body (str) – Body exerting acceleration (e.g. body with atmosphere).

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

latitude(body: str, central_body: str) #

Function to add the latitude to the dependent variables to save.

Function to add the latitude of a body, in the body-fixed frame of a central body, to the dependent variables to save.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the latitude is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

geodetic_latitude(body: str, central_body: str) #

Function to add the geodetic latitude to the dependent variables to save.

Function to add the geodetic latitude, in the body-fixed frame of a central body, to the dependent variables to save. If the central body has a spherical shape model, this value is identical to the latitude. If the central body has an oblate spheroid shape model, the calculation of the geodetic latitude uses the flattening of the this shape model to determine the geodetic latitude

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the geodetic latitude is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

longitude(body: str, central_body: str) #

Function to add the longitude to the dependent variables to save.

Function to add the longitude of a body, in the body-fixed frame of a central body, to the dependent variables to save.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the longitude is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Function to add the heading angle to the dependent variables to save.

Function to add the heading angle to the dependent variables to save, as defined by Mooij, 1994 [1] .

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the heading angle is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

flight_path_angle(body: str, central_body: str) #

Function to add the flight path angle to the dependent variables to save.

Function to add the flight path angle to the dependent variables to save, as defined by Mooij, 1994 [1] .

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the flight path angle is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

angle_of_attack(body: str, central_body: str) #

Function to add the angle of attack to the dependent variables to save.

Function to add the angle of attack angle to the dependent variables to save, as defined by Mooij, 1994 [1] .

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the angle of attack is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

sideslip_angle(body: str, central_body: str) #

Function to add the sideslip angle to the dependent variables to save, as defined by Mooij, 1994 [1] .

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the sideslip angle is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

bank_angle(body: str, central_body: str) #

Function to add the bank angle to the dependent variables to save, as defined by Mooij, 1994 [1] .

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the bank angle is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Function to add the radiation pressure to the dependent variables to save.

Function to add the local radiation pressure, in N/m^2, to the dependent variables to save. It requires a ‘source power’ to be defined for the radiating body.

Parameters:
• body (str) – Body whose dependent variable should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

total_gravity_field_variation_acceleration(body_undergoing_acceleration: str, body_exerting_acceleration: str) #

Function to add the acceleration induced by the total time-variability of a gravity field to the dependent variables to save.

Function to add the acceleration induced by the total time-variability of a gravity field to the dependent variables to save. This function does not distinguish between different sources of variations of the gravity field, and takes the full time-variation when computing the contribution to the acceleration. To select only one contribution, use the single_gravity_field_variation_acceleration() function.

Parameters:
• body_undergoing_acceleration (str) – Body whose dependent variable should be saved.

• body_exerting_acceleration (str) – Body exerting the acceleration.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

single_gravity_field_variation_acceleration(body_undergoing_acceleration: str, body_exerting_acceleration: str, deformation_type: tudatpy.kernel.numerical_simulation.environment_setup.gravity_field_variation.BodyDeformationTypes, identifier: str = '') #

Function to add the acceleration induced by a single time-variability of a gravity field to the dependent variables to save.

Function to add the acceleration induced by a single time-variability of a gravity field to the dependent variables to save. The user specifies the type of variability for which the induced acceleration is to be saved.

Parameters:
• body_undergoing_acceleration (str) – Body whose dependent variable should be saved.

• body_exerting_acceleration (str) – Body exerting the acceleration.

• deformation_type (BodyDeformationTypes) – Type of gravity field variation for which the acceleration contribution is to be saved

• identifier (str, default="") – Identifier for the deformation type. To be used in case multiple realizations of a single variation type are present in the given body. Otherwise, this entry can be left empty

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

single_per_term_gravity_field_variation_acceleration(body_undergoing_acceleration: str, body_exerting_acceleration: str, component_indices: List[Tuple[int, int]], deformation_type: tudatpy.kernel.numerical_simulation.environment_setup.gravity_field_variation.BodyDeformationTypes, identifier: str = '') #

Function to add the acceleration induced by a single time-variability of a gravity field, at a given list of degrees/orders, to the dependent variables to save. This combines the functionality of the single_gravity_field_variation_acceleration() and spherical_harmonic_terms_acceleration() variables

Parameters:
• body_undergoing_acceleration (str) – Body whose dependent variable should be saved.

• body_exerting_acceleration (str) – Body exerting the acceleration.

• component_indices (list[tuple]) – Tuples of (degree, order) indicating the terms to save.

• deformation_type (BodyDeformationTypes) – Type of gravity field variation for which the acceleration contribution is to be saved

• identifier (str, default="") – Identifier for the deformation type. To be used in case multiple realizations of a single variation type are present in the given body. Otherwise, this entry can be left empty

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

inertial_to_body_fixed_rotation_frame(body: str) #

Function to add the rotation matrix from inertial to body-fixed frame to the dependent variables to save.

Function to add the rotation matrix from inertial to body-fixed frame to the dependent variables to save. This requires the rotation of the body to be defined (either in the environment or the state vector). NOTE: a rotation matrix is returned as a nine-entry vector in the dependent variable output, where entry $$(i,j)$$ of the matrix is stored in entry $$(3i+j)$$ of the vector (with $$i,j=0,1,2$$),

Parameters:

body (str) – Body for which the rotation matrix is to be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

tnw_to_inertial_rotation_matrix(body: str, central_body: str) #

Function to add the rotation matrix from the TNW to the inertial frame to the dependent variables to save.

Function to add the rotation matrix from the TNW to the inertial frame to the dependent variables to save. It has the x-axis pointing along the velocity vector, the z-axis along the orbital angular momentum vector, and the y-axis completing the right-handed system. NOTE: a rotation matrix is returned as a nine-entry vector in the dependent variable output, where entry $$(i,j)$$ of the matrix is stored in entry $$(3i+j)$$ of the vector (with $$i,j=0,1,2$$),

Parameters:
• body (str) – Body for which the rotation matrix is to be saved.

• central_body (str) – Body with respect to which the TNW frame is determined.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

rsw_to_inertial_rotation_matrix(body: str, central_body: str) #

Function to add the rotation matrix from the RSW to the inertial frame to the dependent variables to save.

Function to add the rotation matrix from the RSW to the inertial frame to the dependent variables to save. It has the x-axis pointing along the position vector (away from the central body), the z-axis along the orbital angular momentum vector, and the y-axis completing the right-handed system. NOTE: a rotation matrix is returned as a nine-entry vector in the dependent variable output, where entry $$(i,j)$$ of the matrix is stored in entry $$(3i+j)$$ of the vector (with $$i,j=0,1,2$$),

Parameters:
• body (str) – Body for which the rotation matrix is to be saved.

• central_body (str) – Body with respect to which the TNW frame is determined.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

inertial_to_body_fixed_313_euler_angles(body: str) #

Function to add the 3-1-3 Euler angles for the rotation from inertial to body-fixed frame to the dependent variables to save.

Function to add the 3-1-3 Euler angles for the rotation from inertial to body-fixed frame to the dependent variables to save. This requires the rotation of the body to be defined (either in the environment or the state vector).

Parameters:

body (str) – Body for which the rotation angles are to be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

intermediate_aerodynamic_rotation_matrix_variable(body: str, base_frame: tudatpy.kernel.numerical_simulation.environment.AerodynamicsReferenceFrames, target_frame: tudatpy.kernel.numerical_simulation.environment.AerodynamicsReferenceFrames, central_body: str = '') #

Function to add the rotation matrix between any two reference frames used in aerodynamic calculations.

Function to add the rotation matrix between any two reference frames used in aerodynamic calculations. The list of available frames is defined by the AerodynamicsReferenceFrames enum. NOTE: a rotation matrix is returned as a nine-entry vector in the dependent variable output, where entry $$(i,j)$$ of the matrix is stored in entry $$(3i+j)$$ of the vector (with $$i,j=0,1,2$$),

Parameters:
• body (str) – Body whose dependent variable should be saved.

• base_frame (AerodynamicsReferenceFrames) – Base reference frame for the rotation.

• target_frame (AerodynamicsReferenceFrames) – Target reference frame for the rotation.

• central_body (str) – Central body w.r.t. which the state of the body is considered.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

periapsis_altitude(body: str, central_body: str) #

Function to add the altitude of periapsis to the dependent variables to save.

Function to add the periapsis altitude of the current osculating orbit to the dependent variables to save. The altitude depends on the shape of the central body. This function takes the current (osculating) orbit of the body w.r.t. the central body, and uses this Kepler orbit to extract the position/altitude of periapsis.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the altitude of periapsis is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

apoapsis_altitude(body: str, central_body: str) #

Function to add the altitude of apoapsis to the dependent variables to save.

Function to add the apoapsis altitude of the current osculating orbit to the dependent variables to save. The altitude depends on the shape of the central body. This function takes the current (osculating) orbit of the body w.r.t. the central body, and uses this Kepler orbit to extract the position/altitude of apoapsis.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• central_body (str) – Body with respect to which the altitude of apoapsis is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

central_body_fixed_spherical_position(body: str, central_body: str) #

Function to add the spherical, body-fixed position to the dependent variables to save.

Function to add the spherical position to the dependent variables to save. The spherical position is return as the radius, latitude, longitude, defined in the body-fixed frame of the central body

Parameters:
• body (str) – Body whose spherical position is to be saved.

• central_body (str) – Body with respect to which the spherical, body-fixed is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

central_body_fixed_cartesian_position(body: str, central_body: str) #

Function to add the relative Cartesian position, in the central body’s fixed frame, to the dependent variables to save.

Parameters:
• body (str) – Body whose relative cartesian position is to be saved.

• central_body (str) – Body with respect to which the cartesian, body-fixed is computed.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

body_mass(body: str) #

Function to add the current body mass to the dependent variables to save.

Parameters:

body (str) – Body whose mass should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

Function to add the current radiation pressure coefficient to the dependent variables to save.

Parameters:
• body (str) – Body whose dependent variable should be saved.

• emitting_body (str) – Emitting body.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

total_mass_rate(body: str) #

Function to add the total mass rate to the dependent variables to save.

Function to add the total mass rate to the dependent variables to save. It requires the body mass to be numerically propagated.

Parameters:

body (str) – Body whose mass rate should be saved.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

gravity_field_potential(body_undergoing_acceleration: str, body_exerting_acceleration: str) #

Function to add the gravitational potential to the dependent variables to save.

Function to add the gravitational potential to the dependent variables to save. The gravitational potential is defined by the bodies undergoing and exerting the acceleration.

Parameters:
• body_undergoing_acceleration (str) – Body whose dependent variable should be saved.

• body_exerting_acceleration (str) – Body exerting acceleration.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

gravity_field_laplacian_of_potential(body_undergoing_acceleration: str, body_exerting_acceleration: str) #

Function to add the laplacian of the gravitational potential to the dependent variables to save.

Function to add the laplacian of the gravitational potential to the dependent variables to save. The laplacian is defined by the bodies undergoing and exerting the acceleration.

Parameters:
• body_undergoing_acceleration (str) – Body whose dependent variable should be saved.

• body_exerting_acceleration (str) – Body exerting acceleration.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

minimum_body_distance(body_name: str, bodies_to_check: List[str]) #

Function to compute the minimum distance between a given body, and a set of other bodies.

Function to compute the minimum distance between a given body, and a set of other bodies. This function takes the instantaneous position of body body_name, and each body in the list bodies_to_check, and computes the body from this list closest to body_name. In this calculation, the positions of the bodies are evaluated at the current propagation time, and therefore light time is ignored. In addition, this functions does not consider visbility requirements (e.g. is a planet between two bodies). The dependent variable is of size 2, and consists of: (0) The distance between the body, and the closest other body; (1) The index from bodies_to_check for which the distance (given by the first index) is closest to body Typically, this function is used to compute the closest body in a constellation of satellites.

Parameters:
• body_name (str) – Body for which the distance to other bodies is to be computed.

• bodies_to_check (list[ str ]) – List of bodies for which it is to be checked which of these bodies is closest to body_name.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

minimum_visible_station_body_distances(body_name: str, station_name: str, bodies_to_check: List[str], minimum_elevation_angle: float) #

Function to compute the minimum distance between a ground station, and a set of other bodies visible from that station.

Function to compute the minimum distance between a ground station, and a set of other bodies visible from that station This function takes the instantaneous position of the ground station station_name on body_name, and each body in the list bodies_to_check, and computes the body from this list closest to this ground station, only taking into account those bodies from this list which are visible from teh ground station. For this function, visibility is defined by a single elevation angle cutoff (at the ground station) below which a body is deemed to not be visible. In this calculation, the positions of the bodies are evaluated at the current propagation time, and therefore light time is ignored. The dependent variable is of size 3, and consists of: (0) The distance between the ground station, and the closest visible body; (1) The index from bodies_to_check for which the distance (given by the first index) is closest to thee ground station, and the body is visible. (2) Elevation angle for closest body. In case, no body is visible from the station, this function returns [NaN, -1, NaN]. Typically, this function is used to compute the closest body between a ground staion and a constellation of satellites.

Parameters:
• body_name (str) – Body on which ground station is located, for which the distance to other bodies is to be computed.

• station_name (str) – Name of ground station, for which the distance to other bodies is to be computed.

• bodies_to_check (list[ str ]) – List of bodies for which it is to be checked which of these bodies is closest to station_name on body_name.

• minimum_elevation_angle (float) – Minimum elevation angle (at ground station) below which the distance to the bodies_to_check is not considered.

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

custom_dependent_variable(custom_function: Callable[[], numpy.ndarray[numpy.float64[m, 1]]], variable_size: int) #

Function to compute a custom dependent variable.

Function to compute a custom dependent variable, which can be implemented by the user as a Python function. The custom dependent variable is typically dependent on the current properties of the environment (e.g. bodies in the environment) or a user-defined guidance class (or similar)

Parameters:
• custom_function (Callable[[], numpy.ndarray].) – Function taking no input, and returning the custom dependent variable (as a numpy Nx1 array).

• variable_size (int) – Size N of the array returned by the custom_function

Returns:

Dependent variable settings object.

Return type:

SingleDependentVariableSaveSettings

## Enumerations#

 PropagationDependentVariables Enumeration of available propagation dependent variables.
class PropagationDependentVariables#

Enumeration of available propagation dependent variables.

Enumeration of propagation dependent variables supported by tudat.

Members:

mach_number_type :

altitude_type :

airspeed_type :

local_density_type :

relative_speed_type :

relative_position_type :

relative_distance_type :

relative_velocity_type :

total_acceleration_norm_type :

single_acceleration_norm_type :

total_acceleration_type :

single_acceleration_type :

aerodynamic_force_coefficients_type :

aerodynamic_moment_coefficients_type :

rotation_matrix_to_body_fixed_frame_type :

intermediate_aerodynamic_rotation_matrix_type :

relative_body_aerodynamic_orientation_angle_type :

body_fixed_airspeed_based_velocity_type :

stagnation_point_heat_flux_type : No documentation found.

local_temperature_type :

geodetic_latitude_type :

control_surface_deflection_type :

total_mass_rate_type :

tnw_to_inertial_frame_rotation_type :

rsw_to_inertial_frame_rotation_type :

periapsis_altitude_type :

apoapsis_altitude_type :

total_torque_norm_type :

single_torque_norm_type :

total_torque_type :

single_torque_type :

body_fixed_groundspeed_based_velocity_type :

keplerian_state_type :

modified_equinoctial_state_type :

spherical_harmonic_acceleration_terms_type :

spherical_harmonic_acceleration_norm_terms_type :

body_fixed_relative_cartesian_position_type :

body_fixed_relative_spherical_position_type :

total_gravity_field_variation_acceleration_type :

single_gravity_field_variation_acceleration_type :

single_gravity_field_variation_acceleration_terms_type :

acceleration_partial_wrt_body_translational_state_type :

local_dynamic_pressure_type :

euler_angles_to_body_fixed_type :

current_body_mass_type :

custom_type : No documentation found.

gravity_field_potential_type :

gravity_field_laplacian_of_potential_type :

property name#

## Classes#

 VariableSettings Functional base class to define settings for variables. SingleDependentVariableSaveSettings VariableSettings-derived class to define settings for dependent variables that are to be saved during propagation. SingleAccelerationDependentVariableSaveSettings SingleDependentVariableSaveSettings-derived class to save a single acceleration (norm or vector) during propagation.
class VariableSettings#

Functional base class to define settings for variables.

This class is a functional base class for defining settings for variables. Any variable that requires additional information in addition to what can be provided here, should be defined by a dedicated derived class.

class SingleDependentVariableSaveSettings#

VariableSettings-derived class to define settings for dependent variables that are to be saved during propagation.

Functional base class for defining settings for dependent variables that are to be computed and saved during propagation. Any dependent variable that requires additional information in addition to what can be provided here, should be defined by a dedicated derived class.

class SingleAccelerationDependentVariableSaveSettings#

SingleDependentVariableSaveSettings-derived class to save a single acceleration (norm or vector) during propagation.

Class to define settings for saving a single acceleration (norm or vector) during propagation. Note: this acceleration is returned in the inertial frame!