Spacecraft macromodels#

The macromodel of a spacecraft is simplified by a series of panels, which can be defined independently depending on their type (frame-fixed, time-variable, body-tracking) using the functions of the module vehicle_systems.

Manually defining each spacecraft panel takes time. To make things easier, the functions below let you define several panels at once.

Box-wing model#

This is the simplest macromodel available and consists of 8 panels, 6 for the bus and 2 for the solar arrays. The bus is fixed to the rotation frame defined for the spacecraft, while the solar arrays are set to track the Sun.

The dimensions of the spacecraft must be defined as inputs to the function box_wing_panelled_body_settings(), which creates a FullPanelledBodySettings object.

Full macromodel#

For more complex geometries it might become necessary to define a larger number of panels. Usually macromodels are distributed or can be modelled as CAD files. These files can be imported into Blender (a middle step to make the files compatible with Tudat, more information in How to create and load a full macromodel) and later exported as .dae file format.

The function body_panel_settings_list_from_dae() allows to load the macromodel from a DAE file and creates a list of BodyPanelSettings.

How to create and load a full macromodel#

A complete a macromodel is a powerful tool that requires multiple steps to set up. This tutorial will cover all the steps from the creation of the macromodel in a CAD software to the loading in Tudat. The spacecraft used in this example is NASA Mars Reconnaissance Orbiter (MRO).

Creating the CAD model#

Precise spacecraft models are usually available but the surface is discretised in a large number of panels which would significantly increase the computational load. For this reason, the user should aim to reduce the number of panels in the 100s. On top of that, spacecraft models are usually static and do not have built-in joints for the moving parts (if present).

../../../../_images/MRO_NASA_model.png

MRO spacecraft model (around 15000 panels) from NASA website.#

Therefore, the first step requires to create the CAD model by simplifying the structure and modelling each part as a standalone CAD model. It’s paramount to remain consistent with the rotational frames these parts are attached to, especially their origin (which is usually the rotation gimball) and the axis orientation. For most scientific missions, the frame origin and axis orientation are defined in SPICE Frame Kernels (FK).

../../../../_images/MRO_FK.png

Example of MRO spacecraft Bus Frame from NASA NAIF website.#

After having retrieved all the dimensions and frame informations, with some creativity and patience, all parts should be created in CAD accordingly.

Warning

The user should make sure to model each part as a standalone file if planning to use moving parts. The parts must not intersect when assembled together! Due to meshing constraints, the user must not use non-planar geometries like spheres, paraboloids, or similar shapes.

Post-processing the CAD model in Blender#

After all the parts have been modelled in any CAD software of choice, they must be exported in .stl format, making sure the export units match the units set while modelling. The part can then be loaded in Blender using File -> Import -> STL. In the pop-up menu on the left under General -> Scale, the scale can be adjusted from the unit used during modelling to meters (dafault unit in Blender), this option is also available in Tudat when loading the model.

Note

Consistency between units is fundamental to the correct implementation of the model. It is possible to check the size of the panels in Edit Mode by toggling on the options Edge Length and Face Aerea (as in the image below). After exporting the model in .dae format (which is unitless), it is possible to double-check manually the units once more.

../../../../_images/blender_check_units.png

By default, Blender will mesh the part automatically but not always in the most efficient way possible. To force a smaller number of panels go to Object Mode, then Modifiers -> Add modifier -> Generate -> Decimate, toggle on Triangulate and reduce the ratio until right before the object starts deforming. In the left corner of the tab it is possible to see the Face count (see the figure below). Once done, click on the drop down menu in the same tab and hit Apply, then inspect the new mesh in Edit Mode.

../../../../_images/blender_decimate.png

After the meshing, it important to define group of panels with the same material properties. Note that at this point no properties can be defined (this will be dealt at the Tudat level), only the grouping of the panels. To do so, in Edit Mode in the Materials tab add as many materials as needed (see the figure below). Only the name matters, as it will be the one used in Tudat. The color is only used to distinguish the panels visually.

../../../../_images/blender_materials.png

The post-processing is now completed, the file can be exported using File -> Export -> Collada (.dae). Make sure to inspect the file manually to double-check the units.

../../../../_images/MRO_macromodel.png

Example of MRO spacecraft macromodel assembled in Blender with panels grouped by material, 112 panels.#

Loading the macromodel#

To load one part in Tudat, the function body_panel_settings_list_from_dae() is used. The code snippet below summarises the loading process and the definition of rotation settings for the High Gain Antenna (HGA) part. On top of the path to the files, the function requires a dictionary of MaterialProperties (where the keys are the name of the materials set in Blender), a dictionary of reradiation settings (same keys), and the frame origin in Cartesian coordinates in the body-fixed frame (in this case, the HGA gimball position), the units used, and lastly the frame ID.

Required
# required import statements
from tudatpy import environment_setup

# prerequisite api steps
# 1.1 create bodies
# Define material properties
hga_material_properties = {
    'HGA_front': environment_setup.vehicle_systems.material_properties(...),
    'HGA_back': environment_setup.vehicle_systems.material_properties(...)
    }

# Define re-radiation settings
hga_reradiation_settings = {
    'HGA_front': True,
    'HGA_back': True
    }

# Define frame origin
hga_frame_origin = np.array([
    0.0, -3.15, -1.52
    ])

# Load .dae part
hga_panels = environment_setup.vehicle_systems.body_panel_settings_list_from_dae(
    "path/to/hga.dae",
    hga_frame_origin,
    hga_material_properties,
    hga_reradiation_settings,
    "mm",                        # units of .dae part
    "MRO_HGA_OUTER_GIMBAL"      # omit this if it coincides to the body-fixed frame
    )  

# Add rotation settings for moving parts
hga_rotation_settings = environment_setup.rotation_model.spice(
 'MRO_SPACECRAFT','MRO_HGA_OUTER_GIMBAL', ""
 )

The following code snippet assumes all the other parts have been loaded too and proceeds to merge the list of panels and rotation settings to then create a FullPanelledBodySettings object using full_panelled_body_settings().

Required
# required import statements
from tudatpy import environment_setup

# prerequisite api steps
# 1.1 create bodies
# Merge panels lists
list_panel_body_settings = [
    bus_panels, hga_panels, sapx_panels, samx_panels
    ]

# Merge rotation settings (BUS by default coincides with body-fixed frame)
dict_rotation_settings = {
    "MRO_HGA_OUTER_GIMBAL": hga_rotation_settings,
    "MRO_SAPX": sapx_rotation_settings,
    "MRO_SAMX": samx_rotation_settings
    }

# Create FullPanelledBodySettings
full_panelled_body = environment_setup.vehicle_systems.full_panelled_body_settings(
    list_panel_body_settings,
    dict_rotation_settings
    )

# Assign FullPanelledBodySettings to the vehicle (here MRO)
body_settings.get('MRO').vehicle_shape_settings = full_panelled_body

The macromodel is now fully loaded and can be used to compute panelled radiation pressure and aerodynamic coefficients with and without self-shadowing.