Table of Contents

Class ElectromagneticSensor

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] Detects any electromagnetic signatures in the simulation and is able to report them to a message.


public class ElectromagneticSensor : Sensor
Inheritance
ElectromagneticSensor

Constructors

ElectromagneticSensor()

Default constructor

protected ElectromagneticSensor()

Fields

NearestPlanet

A reference to the nearest planet of the sensor for line of sight blocking calculation.

[ReadOnly]
[Metadata(IsAdvanced = true)]
public CelestialBody? NearestPlanet

Field Value

CelestialBody

Out_ElectromagneticDataMsg

The output electromagnetic sensor message, that is able to determine the amount of sensors within range.

public ElectromagneticDataMessage? Out_ElectromagneticDataMsg

Field Value

ElectromagneticDataMessage

Properties

ActiveCount

Total number of EM components that have been detected.

[Unit(UnitType.NONE)]
[ReadOnly]
[Metadata(ContainedIn = "Out_ElectromagneticDataMsg")]
public int ActiveCount { get; }

Property Value

int

Gain

The total gain sensed by the sensor.

[Unit(UnitType.DECIBEL)]
[ReadOnly]
[Metadata(ContainedIn = "Out_ElectromagneticDataMsg")]
public double Gain { get; }

Property Value

double

Methods

CalculateAngle(PhysicalObject, PhysicalObject)

Calculates the angle between the up vectors of the target and the sensor

protected double CalculateAngle(PhysicalObject main, PhysicalObject target)

Parameters

main PhysicalObject

The main component

target PhysicalObject

The targeted component

Returns

double

[deg] The angle in degrees

CalculateGain(ElectromagneticModel, double)

Calculates the gain of the component based on the look up table

protected double CalculateGain(ElectromagneticModel model, double angle)

Parameters

model ElectromagneticModel

The electromagnetic model

angle double

angle between the two pointing vectors

Returns

double

[dB] The total antenna gain

CalculateSpaceLoss(PhysicalObject, PhysicalObject, ElectromagneticModel)

Calculates the space loss for the transmission with respect to the signal transmission distance

protected double CalculateSpaceLoss(PhysicalObject main, PhysicalObject target, ElectromagneticModel model)

Parameters

main PhysicalObject
target PhysicalObject
model ElectromagneticModel

Returns

double

[db] The total loss due to space

CanAccess(Vector3)

Calculates the optical access of the component in question with respect to earth

protected virtual bool CanAccess(Vector3 p2)

Parameters

p2 Vector3

position vector of the object in question

Returns

bool

Whether access exists between the objects

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

OnCreate()

Called when the 'Component' is created from the controller.

protected override void OnCreate()

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