Configuring Solar Panels
A Solar Panel has several properties that can be configured within a simulation. The properties that can be adjusted include the area, voltage, efficiency and the raycasting toggle. Ray-casting is a graphical algorithm that can determine the distance to objects along a fixed path in a defined space. The Unreal Engine makes use of ray-casting for its graphics systems but it can be utilized for more precise calculations. On the solar panels, a feature has been implemented that, when enabled, allows for more accurate shadow values to be calculated. By default, the solar panel is only affected by shadows from celestial objects when in eclipse from the sun. If a complex shape is formed where an object on the spacecraft itself is blocking a portion of the sunlight, by default it will not change the power produced by the solar panel. A solution is to enable raytracing by selecting the Enable Self Shadowing
toggle on the two solar panels on the spacecraft.
Turning on the Debug
flag under the Zendir/Physical Object
category will display the raycasts on the screen and show how the raycasts are created on the solar panel. For the actual simulation, this debug option will be turned off.
Configuring the Battery
The Battery node provides the storage of power that can be dispersed into the rest of the system. A battery can gain and lose power through the power system by connecting power nodes to it via the power bus, which will be covered in the next document. Several values can be tweaked on the battery:
- Capacity: The total capacity in amp-hours of the battery.
- Charge Fraction: The current fraction (between 0 and 1) of power that is in the battery right now.
- Zendir Voltage: The standard voltage produced by the battery when in a nominal state.
NOTE
The battery model is a simple battery and the voltage produced by the battery does not change with the current charge state of the battery. The voltage will change to 0 when the charge fraction of the battery reaches 0.
- Max Charge Rate: The maximum rate the battery can be charged (if non-zero) in the units of amps.
- Max Discharge Rate: The maximum rate the battery can discharge power (if non-zero) in the units of amps.
For this tutorial, the following values will be used for the battery component that is added.
Finding the Battery
On the Configure Power Components
function that can be created on the blueprint demo, the power components can be configured. First, the battery object reference should be fetched from the spacecraft. This can be done using the Get Child
function on the battery.
Adding a Power Sink
The power node that must be added is a Power Sink component. This will be a component that will be drawing power as the camera takes images. A power sink is a generic component that can have its power usage changed over time from user events, such as taking a photo from a camera. Set the power to initially be 0.0
watts of ideal power.
WARNING
Remember to always add the spacecraft to the
Owner
field when adding components to a spacecraft. This is required otherwise the component will exist in the simulation without a parent.