Editor: Custom Thermal Lookup
Custom Temperature
Using the current thermal system in Nominal Systems, any class that is of a sub-class of Physical Component
can have its temperature set from a lookup table. Typically, temperatures can be loaded into the lookup table which will map either the Simulation Time
or the True Anomaly
of the spacecraft to the temperature at some particular component. This process is explained in the Editor: Analysis of Thermal Profiles document. However, if the user would like to map some other value; say velocity to temperature, this tutorial will show how to do so.
Note
Spacecraft objects cannot have their temperature set. However, chassis and sub-components can have thermal properties. If the user wants to set the temperature of a spacecraft, set the temperature of the chassis using the Get Chassis (Component)
function.
Importing a CSV File
Take the following .csv file for example, which maps temperature to velocity.
For the CSV reader to find the correct file location, the file must be placed in an appropriate spot. A typical spot to place a file is in the /Content/Nominal/Data
folder. This folder has been mapped to the asset system so it allows for easy file locations.
Warning
The new asset directory system is able to find files relative to particular ‘mapped’ points. Provided that the data is found in one of those locations, the path to the file only needs to be relative to a mapped point and the file will be found. Otherwise, if the file is not in a mapped directory, the full file path needs to be noted. Some sample map points include:
Content/Nominal/Data
Plugins/NominalForUnreal/Assets
Configuring the Thermal Properties
For the temperature of the component to be updated manually, the thermal settings must be configured to be Custom Analysis
. The relative path to the thermal lookup file must also be configured. The Thermal Node Ref
refers to the index of the column where the data for the temperature is located. It is assumed that the independent value for the lookup is found on the first (0th) column. This function must be done on the Begin Play
event.
Updating the Temperature
During each Tick
or update call to the simulation, the thermal property for the component can be updated from the lookup table. The independent value (in this case the velocity) can be mapped to the temperature value, setting the temperature of the physical component used. This will linearly interpolate between the rows in the CSV table to find the correct temperature that matches the input. This is done using the Set Custom Lookup
function and passing in the value to lookup from the independent column.
Note
It is assumed that the Temperature
column in the CSV file is in units of Kelvin.