Table of Contents

Class LinkBlock

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll
public class LinkBlock
Inheritance
LinkBlock
Derived

Constructors

LinkBlock(Transmitter)

Default constructor for the link block that passes in the transmitter.

public LinkBlock(Transmitter transmitter)

Parameters

transmitter Transmitter

The transmitter the link is connected to

Fields

Accessible

A flag that overrides whether the link is accessible

[EditableVariable("-", true, "")]
public bool Accessible

Field Value

bool

In_SpiceTimeMsg

The time message from SPICE that contains the full GPS time of the system.

public SpiceTimeMessage? In_SpiceTimeMsg

Field Value

SpiceTimeMessage

LinkSignaltoNoise

[dB] The signal to noise value on the link block

[EditableVariable("dB", true, "")]
public double LinkSignaltoNoise

Field Value

double

Out_DataLinkMsg

The message that stores the data about the current link and whether it is active or not.

public readonly DataLinkMessage Out_DataLinkMsg

Field Value

DataLinkMessage

Receiver

The receiver this link block is connected to

public Receiver? Receiver

Field Value

Receiver

Properties

Connected

[-] A flag for if the connection is valid

[EditableVariable("-", true, "")]
public bool Connected { get; }

Property Value

bool

ID

The ID of the link block

public int ID { get; }

Property Value

int

NumInMessages

Specifies the number of messages in the input queue

[EditableVariable("-", false, "")]
public int NumInMessages { get; }

Property Value

int

NumOutMessages

Specifies the number of messages in the output queue

[EditableVariable("-", false, "")]
public int NumOutMessages { get; }

Property Value

int

Transmitter

The transmitter this link block is connected to

public Transmitter Transmitter { get; protected set; }

Property Value

Transmitter

Methods

CalculateAngle(Antenna, Antenna)

Calculates the angle between this antenna and another antenna specified by the target.

protected double CalculateAngle(Antenna main, Antenna target)

Parameters

main Antenna

The main antenna

target Antenna

The targeted antenna

Returns

double

[deg] The pointing angle in degrees

CalculateBaudRate()

Calculates the baud rate of the signal for the transmitter

protected virtual double CalculateBaudRate()

Returns

double

[bytes ps] The transmitter baudrate

CanAccess(Vector3)

Returns whether the spacecraft is able to access another spacecraft. This will calcualte the line of sight value and determine if a line can intersect the other craft. This may be overriden by a base class with some values. http://paulbourke.net/geometry/circlesphere/index.html#linesphere

protected virtual bool CanAccess(Vector3 p2)

Parameters

p2 Vector3

Position of the link target

Returns

bool

A line of sight access to the other craft.

GetConnectionLength()

Gets the length of the connection between the transmitter and receiver

public double GetConnectionLength()

Returns

double

[m] The length of the connection

GetRecentMessage(bool)

Returns the current output message from the system. Once read, it will be removed from the link block.

public TelemetryPacket? GetRecentMessage(bool pop = true)

Parameters

pop bool

A flag whether to pop the message off the list

Returns

TelemetryPacket

The most recent message (if it exists)

GetTransmissionAccess()

Overriden function that returns whether a specific transmission type is able to access the connection between receiver and transmitter.

protected virtual bool GetTransmissionAccess()

Returns

bool

An access flag