rigid_body¶
This module contains a set of factory functions for setting up the models for so-called ‘rigid body properties’ in Tudat. Specifically, rigid body properties define the mass, center of mass and inertia tensor of a body.
The main interfaces with Tudat is the rigid_body_settings
attribute (of type RigidBodyPropertiesSettings) of the body settings, which defines settings for the rigid-body properties of a body.
The functions in this submodule are used to create these settings objects. When creating a body (typically using the
create_system_of_bodies() function), an object of type
RigidBodyProperties (or a derived class) is created
and added to the associated Body object based on the settings object, which can
be retrieved using the rigid_body_properties attribute.
The models defined here do not define a gravity field of a body. However, when a body is endowed with a
gravity field (see gravity_field), compatible rigid body settings are automatically created, mapping the gravitational
parameter of the gravity field to a mass here. For a spherical_harmonic()
gravity field, the degree-one coefficients are used to set the body center of mass.
In addition, when creating a spherical harmonic gravity field, and specifying a scaled_mean_moment_of_inertia, an inertia tensor is created and defined in the rigid-body settings.
Functions¶
|
Function for creating constant rigid body properties. |
Function for creating custom (time-dependent) rigid body properties. |
|
Function for creating custom (time-dependent) rigid body properties. |
- constant_rigid_body_properties(mass: float | SupportsIndex, center_of_mass: numpy.ndarray[numpy.float64[3, 1]] = array([nan, nan, nan]), inertia_tensor: numpy.ndarray[numpy.float64[3, 3]] = array([[nan, nan, nan], [nan, nan, nan], [nan, nan, nan]])) tudatpy.kernel.dynamics.environment_setup.rigid_body.RigidBodyPropertiesSettings¶
Function for creating constant rigid body properties.
Function for creating constant rigid body properties (mass, center of mass, inertia tensor). The center of mass and/or inertia tensor can be left empty by setting them to NaN (default), in which case no center of mass or inertia tensor are defined
- Parameters:
mass (float) – Constant mass of the body
center_of_mass (np.array, default = np.full([3, 1], np.nan)) – Constant center of mass of the body (in a body-fixed frame)
inertia_tensor (np.array, default = np.full([3, 3], np.nan)) – Constant inertia tensor of the body (in a body-fixed frame)
- Returns:
Instance of the
RigidBodyPropertiesSettingsobject with the given settings- Return type:
- custom_time_dependent_rigid_body_properties(mass_function: Callable[[float | SupportsIndex], float], center_of_mass_function: Callable[[float | SupportsIndex], numpy.ndarray[numpy.float64[3, 1]]] = None, inertia_tensor_function: Callable[[float | SupportsIndex], numpy.ndarray[numpy.float64[3, 3]]] = None) tudatpy.kernel.dynamics.environment_setup.rigid_body.RigidBodyPropertiesSettings¶
Function for creating custom (time-dependent) rigid body properties.
Function for creating custom rigid body properties, where the mass, center of mass and inertia tensor are defined by user-defined functions (as a function of time). The center of mass and/or inertia tensor functions can be left empty by setting them to None (default), in which case no center of mass or inertia tensor are defined
- Parameters:
mass_function (callable[[
Time], float]) – Function returning the mass as a function of time (Time object representing seconds since J2000 TDB) to ne used during the propagationcenter_of_mass_function (callable[[
Time], numpy.ndarray[numpy.float64[3, 1]]] = None) – Function returning the center of mass as a function of time (Time object representing seconds since J2000 TDB) to be used during the propagationinertia_tensor_function (callable[[
Time], numpy.ndarray[numpy.float64[3, 3]]] = None) – Function returning the inertia tensor as a function of time (Time object representing seconds since J2000 TDB) to be used during the propagation
- Returns:
Instance of the
RigidBodyPropertiesSettingsobject with the given settings- Return type:
- custom_mass_dependent_rigid_body_properties(mass: float | SupportsIndex, center_of_mass_function: Callable[[float | SupportsIndex], numpy.ndarray[numpy.float64[3, 1]]] = None, inertia_tensor_function: Callable[[float | SupportsIndex], numpy.ndarray[numpy.float64[3, 3]]] = None) tudatpy.kernel.dynamics.environment_setup.rigid_body.RigidBodyPropertiesSettings¶
Function for creating custom (time-dependent) rigid body properties.
Function for creating custom rigid body properties, center of mass and inertia tensor are defined by user-defined functions as a function of mass. This functionality is typically used for a body under thrust, where the center of mass and inertia tensor are defined as a function of expended mass.
- Parameters:
mass (callable[[float], float]) – Mass of the body (to be overridden during propagation if mass is propagated)
center_of_mass_function (callable[[float], numpy.ndarray[numpy.float64[3, 1]]] = None) – Function returning the center of mass as a function of mass (to be used during the propagation)
inertia_tensor_function (callable[[float], numpy.ndarray[numpy.float64[3, 3]]] = None) – Function returning the inertia tensor as a function of mass (to be used during the propagation)
- Returns:
Instance of the
RigidBodyPropertiesSettingsobject with the given settings- Return type:
Classes¶
Base class for providing settings for rigid body model creation. |
- class RigidBodyPropertiesSettings¶
Bases:
pybind11_objectBase class for providing settings for rigid body model creation.
This class is a functional base class for settings of gravity field models that require no information in addition to their type. Gravity field model classes requiring additional information must be created using an object derived from this class.
- property body_mass_property_type¶
read-only
Type of rigid body model that is to be created.
- Type:
RigidBodyPropertiesType