pyRTX.classes.Spacecraft

Classes

Spacecraft([name, base_frame, ...])

This is the main class for defining spacecraft objects.

class pyRTX.classes.Spacecraft.Spacecraft(name=None, base_frame=None, spacecraft_model=None, units='m', mass=0.0)[source]

This is the main class for defining spacecraft objects.

__init__(name=None, base_frame=None, spacecraft_model=None, units='m', mass=0.0)[source]
Parameters:
  • name (str) – Spacecraft name

  • base_frame (str) – Spacecraft body (base) frame

  • spacecraft_model (dict) – dict of {file:str, frame_type:str, frame_name:str, center:list, specular:float, diffuse:float, UD_rotation:trimesh.rotation}

  • of (a dictionary with keys the name) –

    file: str

    the obj file for the part

    frame_type: str

    ’Spice’ or ‘UD’ to choose wether to define a reference to a spice frame or UserDefined one in the case of ‘UD’ a rotation matrix must be specified in the UD_rotation (optional) key

    frame_name: str

    The name of the Spice (or UD) frame

    center: list

    position of the origin of the object (in km) with respect to the base frame

    specular: float

    specular coefficient

    diffuse: float

    diffuse coefficient

    UD_rotation: trimesh.rotation

    optional specify a user defined rotations matrix

  • units (str) – units for transformations

  • mass (float or nc file) – Spacecraft mass. Can be a float value or an xarray with times and mass values

Returns:

bla

Return type:

pyRTX.classes.Spacecraft

add_parts(spacecraft_model=None)[source]

Add parts to the model instance :param spacecraft_model: See the main constructor documentation :type spacecraft_model: dict

subset(elem_names)[source]

Return an instance of Spacecraft with only the elements contained in the list elem_names. Suppose the Spacecraft (self) is composed of elements A,B,C Spacecraft.subset([‘A’,’B’]) would return a new instance of Spacecraft with only the elements A and B

remove_part(name)[source]
pxform_convert(pxform)[source]
apply_transforms(epoch)[source]

Method to rotate and translate the components.

Parameters: - epoch: epoch of the transformation

materials()[source]
dump(epoch=None, split=False)[source]
dump_materials()[source]
info()[source]