Class SpacecraftOperationComputer
- Namespace
- NominalSystems.Classes
- Assembly
- NominalSystems.Classes.dll
[Nominal] The operation computer is a high level computer that can communicate with all systems onboard a spacecraft. It is able to interface with the EPS, telemetry and Attitude systems and produce commands that the Guidance Computer can use. Commands must be transmitted with a key of 'commands' for the computer to read and execute the command.
public class SpacecraftOperationComputer : GuidanceComputer
- Inheritance
-
SpacecraftOperationComputer
Constructors
SpacecraftOperationComputer()
Default constructor
protected SpacecraftOperationComputer()
Fields
BatteryRechargedFraction
When the battery has been depleted below the minimum battery fraction, the guidance can be resumed only when the battery reaches this point.
[Unit(UnitType.NONE)]
[Range(0, 1)]
public double BatteryRechargedFraction
Field Value
DesiredPointingMode
The desired pointing mode if the battery is within the desired range of capacity.
[Metadata(IsAdvanced = true)]
public GuidancePointingType DesiredPointingMode
Field Value
MinimumBatteryFraction
When the battery goes below this fraction, the guidance message will go to sun pointing mode.
[Unit(UnitType.NONE)]
[Range(0, 1)]
public double MinimumBatteryFraction
Field Value
Properties
PointingMode
Returns the current pointing mode that is being used by the guidance computer.
[Metadata(ContainedIn = "Out_GuidanceChainMsg")]
public override GuidancePointingType PointingMode { get; set; }
Property Value
Methods
AddCommand(JToken?, double)
Adds a new command to the list of loaded commands that will be executed.
public void AddCommand(JToken? cmd, double time)
Parameters
cmd
JTokenThe command to add to the buffer
time
double[s] The simulation time to execute the command
Initialise()
Initialises the computer and attempts to connect up all the parameters and components together that are required for the computer to function. This is a spacecraft computer specific initialisation.
public bool Initialise()
Returns
- bool
A successful initialisation
OnBegin(double)
Called when the object is beginning ticking for the first time. This is when the simulation calls the very first tick and will run before the update call.
protected override void OnBegin(double time)
Parameters
time
double[s] Current time of the simulation before the tick
OnLoad(double)
Called after all of the data has been loaded from a save state on this object. This enables any post-load operations to be performed and extra data to be loaded from the metadata.
protected override void OnLoad(double time)
Parameters
time
double[s] The current clock time of the simulation
OnSave()
Called before the object is saved into the save state. This ensures that any additional metadata can be saved on the object before it is automatically serialized.
protected override void OnSave()
OnUpdate(double, double)
Called when the object should update from the simulation tick. This will take in a time and a step, where the time is the time of the clock before updating the object.
protected override void OnUpdate(double time, double step)
Parameters
time
double[s] Current time of the simulation before the update
step
double[s] The time-step to update during this tick
SafeMode()
Set the computer into a safe mode - ensuring that only the most important systems are running and the rest are in safety.
public override void SafeMode()
Shutdown()
Shut the computer down safely. Disable all software and set the status to SHUTDOWN.
public override void Shutdown()
Startup()
Start the computer safely. Enable all software and set the status to RUNNING.
public override void Startup()