Table of Contents

Spacecraft: Configuring Components

Adding Components

There are two main ways to add components to spacecraft in Nominal Editor. Each has its pros and cons but both will correctly add them to the simulation backend and correctly simulate them.

  • Blueprint Editor: The first is to add it to the spacecraft object and position the objects using the visualization tool. This is useful for visualizing component layouts, but cannot be swapped out easily and components are more hard-coded into place.
  • Level Blueprint: The second is to spawn the components individually on the level blueprint attach the objects manually to the spacecraft and adjust the transform. This makes it trickier to set the correct position and orientation but allows for easier swapping of components setting default parameters.

This tutorial will cover the second method and will show how to configure and spawn components attached to the spacecraft in the level blueprint. Although all components are different, there is a standard across all components spawned.

  1. When attaching a component to the spacecraft, the spacecraft must be the owner of the component (unless attaching to a sub-component).
  2. The transform of the component is the relative position and orientation relative to the spacecraft (or owner). These are also in Unreal coordinates.
  3. The Physical Component class is the standard base class for all components and includes a mesh, mass and position that can be configured.

To ensure that the component is added to the spacecraft, the drop-down arrow at the bottom of the spawn actor node will expose the Owner field. The component will break if the owner is not set correctly. The Spawn Transform field can be split within the node (or created as a separate node) and specify the relative transform from the spacecraft’s origin.

Warning

When using the spawn component method, the transform is in Unreal coordinates and not Simulation coordinates. The differences here are that the X and Y axes are flipped (to ensure the right-hand rule is conformed to) and the units in Unreal’s system are cm and not m. As an example, \(5, 0, 0\) in Unreal coordinates corresponds to \(0, 0.05, 0\) in simulation units.

Untitled


Adding a Solar Panel

Solar panels are components that can convert solar energy into battery power. A simple solar panel can be attached to the spacecraft using the BP_NS_SolarPanel_3U_XY object. This is a 3U side-solar panel that can be added to a spacecraft. This object can be added to the spacecraft and by modifying the transform, the correct orientation can be used.

Note

When spawning components, the downside is the transforms can require a lot of guesswork to determine the correct location. A standard process would be to use the blueprint editor to create spacecraft once the model has been designed. Typically, a user would play with the transform and run the level to check what needs to be changed.

In this example, as the solar panel starts facing up, a 90-degree rotation can be made.

Untitled

The variables exposed are some default parameters. For solar panels, they are:

  • Area: The total area of the solar panel in \(\mathrm{m^2}\). This has been configured correctly for a 3U side panel.
  • Efficiency: The fraction of sunlight converted to instantaneous power (between 0 and 1).
  • Self Shadowing: A flag that specifies whether the solar panel will use Unreal’s ray-casting system to determine an accurate shadow factor from other objects on the spacecraft.
  • Is Active: A flag that enables or disables the solar panel from producing power. By default, this should remain on to be able to get the power from the panel.
  • Nominal Voltage: The voltage produced by the solar panel when receiving power. This is used for EPS simulation design and can be left as the default.

A solar panel will produce a power output regardless if there is an EPS node attached to it. For this tutorial, this will be the only EPS node in the spacecraft system. It is good practice to store each component as a variable so it can be accessed later.


Adding Reaction Wheels

Reaction wheels are complex physics devices that can adjust the mass properties of the spacecraft such that torques on the wheels can adjust the orientation of the spacecraft in space. A typical reaction wheel stack may contain three or four reaction wheels, all oriented in different axes. By spinning the wheels at specific speeds, the reaction wheels can allow a spacecraft to orient itself in a particular direction over time. A sample configured reaction wheel stack is the BP_NS_ReactionWheel_Quad component, which creates three reaction wheels.

Untitled

Reaction wheels are complex components. The exact configurations of the wheels are not discussed in this tutorial. The default values present on the reaction wheel stack define the friction and initial speeds of each of the wheels on the stack.


Adding a Guidance Computer

The final component to add to this spacecraft is a guidance computer. This component will create a series of software chains that will allow the spacecraft to orient itself in space. The guidance computer requires a reaction wheel stack to exist on the spacecraft to function correctly. Guidance computers allow for the spacecraft to change pointing modes during a simulation stack and handle the software connections internally. They are typically used for testing functionality and custom software will replace the chains for complex simulations. The standard is the BP_NS_GuidanceComputer component.

Untitled

Four key software chain parameters can be adjusted here. The values should be changed to the above to achieve the defaults:

  • Navigation: This defines how the state of the spacecraft is estimated. The Simple navigation mode uses the actual state and adds a small number of errors to the state.
  • Pointing: This defines which pointing mode should be executed and what the guidance should be. The Sun pointing mode will attempt to point the solar panel’s up-vector towards the sun.
  • Controller: This defines the type of control feedback that the control loop will be executing. The MRP controller uses a standard PID control loop for passing feedback data back to the software.
  • Mapping: This defines the type of actuator mapping that the software should be applying to the calculated torques. The Reaction Wheel mapping controller will result in the reaction wheels applying the correct torques.

Visualizing the Components

Once all three components have been added and the function added to the end of the Begin Play event on the level blueprint, running the level will show the three components added to the spacecraft. Again, the components will not be doing anything yet.

Untitled

Note

To rotate around the level, right-click on the viewport and move the mouse around. Use the WASD keys to move around the spacecraft. Scrolling the mouse wheel will move closer and further away from the spacecraft. Pressing 1 will snap back at the spacecraft again if it is out of view.