Module: simpleAntenna

Warning

[BETA] simpleAntenna is a beta module in an initial public release. This module might be subject to changes in future releases.

Executive Summary

This document describes how the simpleAntenna module operates within the Basilisk astrodynamics simulation framework. The purpose of this module is to provide a simplified representation of an antenna for spacecraft-to-spacecraft and spacecraft-to-ground communication. The module abstracts away complex antenna parameters, such as detailed radiation patterns, and replaces them with general assumptions that enable simulation of typical satellite communication systems. The simplified antenna model is based on a 2D Gaussian beam pattern (see Figure 1), sidelobes are neglected (see also Module Assumptions and Limitations).

This module enables users to simulate an antenna mounted on a spacecraft or placed in a ground environment (Earth) by configuring a set of key parameters (see Detailed Module Description). The module must be connected to either a spacecraft state message (for space-based antennas) or a ground state message (for ground-based antennas).

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages

Msg Variable Name

Msg Type

Description

Note

scInStateMsg

SCStatesMsgPayload

spacecraft state

Required for space based antennas

groundInStateMsg

GroundStateMsgPayload

ground state

Required for ground based antennas

antennaInStateMsg

AntennaStateMsgPayload

setting antenna to [off / Rx / Tx / RxTx]

optional, default is ‘Off’

sunInMsg

SpicePlanetStateMsgPayload

sun ephemeris data input message

optional, required for advanced sky noise temperature calculation (see Detailed Module Description)

planetInMsgs

SpicePlanetStateMsgPayload

vector of planet ephemeris data input messages

optional, required for advanced sky noise temperature calculation (see Detailed Module Description)

sunEclipseInMsg

EclipseMsgPayload

sun eclipse state input Message

optional, required for advanced sky noise temperature calculation (see Detailed Module Description)

antennaOutStateMsg

AntennaLogMsgPayload

output msg description

output message containing antenna state information

Detailed Module Description

The simpleAntenna module simulates a directional antenna for spacecraft communication systems. It provides a simplified representation of antenna behavior by abstracting away complex antenna properties, such as detailed radiation patterns and receiver noise modeling. Instead, the radiation pattern is approximated using a 2D Gaussian field response (see Figure 1 and MATLAB Gaussian Antenna Element).

The module computes key antenna performance metrics including the Equivalent Isotropically Radiated Power (EIRP), the Gain-To-Noise Temperature (G/T), and the Noise Power. These outputs can be used to evaluate link budgets for spacecraft communication systems.

The following parameters must be configured by the user:

Module Parameters

Parameter

Symbol

Unit

Description

Valid range

Antenna name

-

-

Name of the antenna

Max. 20 characters

Frequency

\(f\)

Hz

Operating frequency of the antenna

\(30\,\mathrm{MHz} < f < 60\,\mathrm{GHz}\)

Bandwidth

\(B\)

Hz

Bandwidth of the antenna

\(B > 0\;\mathrm{Hz}\)

Directivity

\(D_\mathrm{dB}\)

dB

Antenna directivity in \(\mathrm{dB}\)

\(D_\mathrm{dB} > 9\,\mathrm{dB}\)

Beam cross section shape

\(k\)

-

Ratio between HPBW in azimuth \(\phi\) and elevation \(\theta\) direction (for a rotation symmetrical beam, \(k=1\))

\(0.5 < k < 5\)

Transmission power

\(P_\mathrm{Tx}\)

W

Transmission power of the antenna (The power which is drawn from the spacecraft power system)

\(P_\mathrm{Tx} > 0\,\mathrm{W}\)

Reception power (optional)

\(P_\mathrm{Rx}\)

W

Reception power of the antenna (The power which is drawn from the spacecraft power system) (default: 0W)

\(P_\mathrm{Rx} \geq 0\,\mathrm{W}\)

Equivalent noise temperature

\(T_\mathrm{E}\)

K

Equivalent noise temperature of the receiver system

\(T_\mathrm{E} > 0\,\mathrm{K}\)

Antenna efficiency

\(\eta_\mathrm{r}\)

-

Antenna radiation efficiency

\(0 < \eta_\mathrm{r} \leq 1\)

Ambient temperature (optional)

\(T_\mathrm{Ambient}\)

K

Ambient temperature of the antenna. If not set by the user, this value is calculated

\(T_\mathrm{Ambient} > 0\,\mathrm{K}\)

Use Haslam Map (optional)

useHaslamMap

[bool]

Enable/Disable the use of the Haslam 408 MHz all-sky survey map for sky noise temperature calculation. If false a omnidirectional galactic noise temperature is used. (default: False)

True or False

Antenna position vector in body frame (optional)

\(\mathbf{r}_\mathrm{AB}^\mathrm{B}\)

m

Position vector of the antenna with respect to the spacecraft body frame

default: \(\mathbf{r}_\mathrm{AB}^\mathrm{B} = [0,0,0]^\mathrm{T}\) (see Figure 1: Illustration of the antenna coordinate frame {A})

MRP from body to antenna coordinate frame (optional)

\(\boldsymbol{\sigma}_\mathrm{AB}\)

-

MRP representing the rotation from the spacecraft body frame \(\mathrm{B}\) to the antenna coordinate frame \(\mathrm{A}\)

default: \(\boldsymbol{\sigma}_\mathrm{AB} = [0,0,0]^\mathrm{T}\) (see Figure 1: Illustration of the antenna coordinate frame {A})

Shematic antenna coordinate frame :math:`\mathrm{A}` definition

Figure 1: Illustration of the antenna coordinate frame \({A}\)

The simpleAntenna module allows users to place an antenna either on a spacecraft or in a ground environment. The environment is automatically determined by which state message is connected (spacecraft state or ground state); exactly one must be linked.

The module supports the following communication configurations:

  • Spacecraft <–> Spacecraft

  • Spacecraft <–> Ground (Earth)

Ground <–> Ground communication is not yet supported (see Module Assumptions and Limitations).

The antenna can be in either state:
  • Off : no transmission or reception

  • Tx : transmission only

  • Rx : reception only

  • RxTx : transmission and reception

These states can either be set via the antennaInStateMsg input message or by setting the state directly with the setter for this property.

Radiation Pattern Model

Shematic of SimpleAntenna beam pattern

Figure 1: Illustration of simpleAntenna 2D Gaussian beam pattern

The antenna radiation pattern is modeled as a 2D Gaussian beam pattern (see also Module Assumptions and Limitations).

The antenna radiation pattern is modeled as a 2D Gaussian beam. The radiation pattern is defined by the following equation (linear, voltage pattern):

\[ f(\theta,\phi) = f_{0} \cdot \exp\Bigg[ -2 \cdot \ln(2) \Bigg( \Big( \frac{\theta}{\theta_{\mathrm{HPBW}}} \Big)^2 + \Big( \frac{\phi}{\phi_{\mathrm{HPBW}}} \Big)^2 \Bigg) \Bigg]\]

The power gain as a function of off-boresight angles is:

\[G(\theta,\phi) = G_{0} \cdot \exp\Bigg[ -4 \cdot \ln(2) \Bigg( \Big( \frac{\theta}{\theta_{\mathrm{HPBW}}} \Big)^2 + \Big( \frac{\phi}{\phi_{\mathrm{HPBW}}} \Big)^2 \Bigg) \Bigg]\]

Where \(G_{0}\) is the boresight power gain (see Figure 1: Illustration of simpleAntenna 2D Gaussian beam pattern).

\[k\,\mathrm{[-]} = \frac{\phi_\mathrm{HPBW}}{\theta_\mathrm{HPBW}}\]

Setting of the radiation pattern parameters

To set the radiation-pattern specific parameters, the user can set the directivity \(D_\mathrm{dB}\) and the beam cross-section shape \(k\). From these two parameters, the Half-Power BeamWidths (HPBW) in elevation \(\theta_\mathrm{HPBW}\) and azimuth \(\phi_\mathrm{HPBW}\) are calculated:

The unit less directivity \(D\) and the boresight power gain \(G_{0}\) are calculated from \(D_\mathrm{dB}\) as follows:

\[ \begin{align}\begin{aligned}D\,\mathrm{[-]} = 10^{D_\mathrm{dB}/10}\\G_{0}\,\mathrm{[-]} = D \cdot \eta_\mathrm{r}\end{aligned}\end{align} \]

\(\theta_\mathrm{HPBW}\) and \(\phi_\mathrm{HPBW}\) are then calculated as follows:

\[ \begin{align}\begin{aligned}\theta_\mathrm{HPBW}\,\mathrm{[rad]} = \sqrt{\frac{\ln(2) \cdot 16}{D \cdot k}}\\\phi_\mathrm{HPBW}\,\mathrm{[rad]} = \theta_\mathrm{HPBW} \cdot k\end{aligned}\end{align} \]

Calculation of the Equivalent Isotropically Radiated Power (EIRP) / \(P_\mathrm{EIRP}\)

The antenna metric for transmitting antennas, \(P_\mathrm{EIRP}\) is calculated as shown below:

\[P_\mathrm{EIRP}\,\mathrm{[dB]} = 10 \cdot \log_{10}(P_\mathrm{Tx}) + D_\mathrm{dB} + 10 \cdot \log_{10}(\eta_\mathrm{r})\]
  • where \(P_\mathrm{Tx}\) is the transmission power in [W], \(D_\mathrm{dB}\) is the antenna directivity in [dB], and \(\eta_\mathrm{r}\) is the antenna efficiency [-].

Calculation of \(\frac{G}{T_\mathrm{S}}\)

\(\frac{G}{T_\mathrm{S}}\) is a key performance metric for a receiving antenna, it is calculated as shown below:

\[\frac{G}{T_\mathrm{S}}[dB/K] = D_\mathrm{dB} + 10 \cdot \log_{10}(\eta_\mathrm{r}) - 10 \cdot \log_{10}(T_\mathrm{S})\]
  • where \(D_\mathrm{dB}\) is the antenna directivity in [dB], \(\eta_\mathrm{r}\) is the antenna efficiency [-], and \(T_\mathrm{S}\) is the system noise temperature (antenna + receiver) in [K] (see also: Calculation of the noise-power at the antenna).

Calculation of the noise-power at the antenna

The noise power is the power generated by the noise sources at the antenna and receiver. This property is important for the calculation of the Signal-To-Noise ratio (SNR) at the receiver.

The noise power \(P_\mathrm{N}\) at the antenna is calculated as:

\[P_\mathrm{N}\,\mathrm{[W]} = k_\mathrm{B} \cdot T_\mathrm{S} \cdot B\]
  • where \(k_\mathrm{B}\) is the Boltzmann constant, \(T_\mathrm{S}\) is the system noise temperature (antenna + receiver), and \(B\) is the antenna bandwidth

Calculation of noise temperatures

  • The system noise temperature \(T_\mathrm{S}\) is computed as the sum of the Antenna Noise Temperature \(T_\mathrm{Ant}\) and the Equivalent Noise Temperature of the receiver \(T_\mathrm{E}\)

\[T_\mathrm{S} = T_\mathrm{Ant} + T_\mathrm{E}\]

The Equivalent Noise Temperature \(T_\mathrm{E}\) is a user defined parameter representing the noise contribution of the receiver system.

The Antenna Noise Temperature \(T_\mathrm{Ant}\) depends on the sky noise temperature \(T_\mathrm{Sky}\) and the Environment Temperature \(T_\mathrm{Ambient}\).

\[T_\mathrm{Ant} = (1 - \eta_\mathrm{r}) \cdot T_\mathrm{Ambient} + \eta_\mathrm{r} \cdot T_\mathrm{Sky}\]

For space-based antennas:

\(T_\mathrm{Sky}\) depends on the antenna pointing direction and is computed as a weighted sum of the Galactic Noise Temperature \(T_\mathrm{Galaxy}\) and the Noise Temperature of the celestial bodies within the antenna beam coverage, \(T_\mathrm{Planet}\). The weights are given by the antenna beam coverage fractions \(C_\mathrm{Galaxy}\) and \(C_\mathrm{Planet}\) (see also Overlap Area Computation). The antenna gain \(G(\theta, \phi)\) is not considered at this stage (see also Module Assumptions and Limitations).

  • For space-based antennas, \(T_\mathrm{Ambient}\) can be set by the user (optional) if it is not set, a default value of \(T_\mathrm{Ambient} = 150.0K\) is used.

  • The caculation of \(T_\mathrm{Sky}\) is described in Calculation of T_sky.

For ground-based antennas:

  • Based on the International Standard Atmosphere (ISA) model, \(T_\mathrm{Ambient}\) for ground-based antennas is calculated as a function of altitude \(h\) (in [m]):

\[T_\mathrm{Ambient}[K] = T_\mathrm{0} - \frac{dT}{dh} \cdot h\]
  • where \(T_\mathrm{0} = 288.15 [K]\) is the sea-level standard temperature according to ISA, and \(\frac{dT}{dh} = 0.0065 [K/m]\) is the temperature lapse rate for an ISA atmosphere (Earth).

Calculation of \(T_\mathrm{sky}\)

For space-based antennas

The sky noise temperature for a spacecraft-mounted antenna is calculated based on the antenna position and orientation with respect to the Earth, Sun and Moon (other celestial bodies are at the moment not incuded). If the setting useHaslamMap=True is enabled, the galactic noise temperature is calculated using the Haslam 408 MHz all-sky survey map. if useHaslamMap=False, a simple model with a frequency dependent, omnidirectional galactic noise temperature is used.

\[T_\mathrm{Sky} = T_\mathrm{Sun} \cdot C_\mathrm{Sun} + T_\mathrm{Earth} \cdot C_\mathrm{Earth} + T_\mathrm{Moon} \cdot C_\mathrm{Moon} + T_\mathrm{Galaxy} \cdot C_\mathrm{Galaxy}\]

where:

  • \(T_\mathrm{Sun}\), \(T_\mathrm{Earth}\), \(T_\mathrm{Moon}\) are the brightness temperatures of the Sun, Earth, and Moon, respectively, obtained from lookup tables as a function of frequency.

  • \(T_\mathrm{Galaxy}\) is the galactic background noise temperature (see below).

  • \(C_\mathrm{Sun}\), \(C_\mathrm{Earth}\), \(C_\mathrm{Moon}\), \(C_\mathrm{Galaxy}\) are the beam coverage fractions for each source (see Overlap Area Computation).

The galactic coverage fraction is computed as:

\[C_\mathrm{Galaxy} = 1 - C_\mathrm{Sun} - C_\mathrm{Earth} - C_\mathrm{Moon}\]

Galactic noise temperature calculation:

The galactic noise temperature \(T_\mathrm{Galaxy}\) depends on the useHaslamMap setting:

  • If useHaslamMap=True: The galactic noise temperature is calculated using the Haslam 408 MHz all-sky survey map. The brightness temperature at 408 MHz is obtained based on the antenna boresight direction and beam size, then scaled to the operating frequency using a spectral index of \(\beta = -2.7\):

    \[T_\mathrm{Galaxy} = T_\mathrm{408MHz} \cdot \left( \frac{f}{408\,\mathrm{MHz}} \right)^{\beta} + T_\mathrm{CMB}\]
  • If useHaslamMap=False: A simplified omnidirectional galactic noise model is used, where the brightness temperature is obtained from a lookup table as a function of frequency:

    \[T_\mathrm{Galaxy} = T_\mathrm{Galaxy,table}(f) + T_\mathrm{CMB}\]

where \(T_\mathrm{CMB} = 2.725\,\mathrm{K}\) is the Cosmic Microwave Background temperature.

Eclipse handling:

If the sunEclipseInMsg is connected and the spacecraft is in full eclipse (shadow factor = 0), the sun coverage is set to zero:

\[C_\mathrm{Sun} = 0 \quad \text{(during eclipse)}\]

For ground-based antennas

  • For ground based antennas, \(T_\mathrm{sky}\) is always assumed to be \(T_\mathrm{sky} = 200K\).

Overlap Area Computation

In normalized beam space, the antenna beam is represented as a unit circle with radius

\[R = 1\]

and the apparent planet disk is represented as a circle of radius \(r\) whose center lies at distance \(d\) from the beam center.

Depending on the relative values of \(d\), \(R\), and \(r\), three cases are distinguished.

No Overlap

If the two circles do not intersect,

\[d \ge R + r\]

then the planet does not contribute to the antenna beam coverage and

\[A_{\text{overlap}} = 0.\]

Planet Fully Inside the Beam

If the planet disk lies entirely inside the beam,

\[d \le |R - r|\]

then the overlap area is simply the area of the planet disk,

\[A_{\text{overlap}} = \pi r^2.\]

Partial Overlap

If the two circles partially overlap,

\[|R - r| < d < R + r,\]

the overlap area is computed using the standard closed-form circle–circle intersection formula (Weisstein, Eric W. “Circle-Circle Intersection.” From MathWorld–A Wolfram Resource.),

\[A_{\text{overlap}} = R^2 \cos^{-1}\!\left( \frac{d^2 + R^2 - r^2}{2 d R} \right) + r^2 \cos^{-1}\!\left( \frac{d^2 + r^2 - R^2}{2 d r} \right) - \frac{1}{2} \sqrt{ (-d + R + r) ( d + R - r) ( d - R + r) ( d + R + r) }.\]

Coverage Fraction

The antenna beam coverage fraction due to the planet is obtained by normalizing the overlap area by the beam area,

\[C_p = \frac{A_{\text{overlap}}}{\pi R^2}.\]

Since \(R = 1\) in normalized beam space, this reduces to

\[C_p = \frac{A_{\text{overlap}}}{\pi}.\]

The coverage fraction is clamped to the interval \([0, 1]\).

Module Assumptions and Limitations

The following assumptions and limitations apply to the simpleAntenna module:

  • The antennas radiation pattern is modelled as a simple 2D Gaussian beam pattern. This has the following implications: - Sidelobes are neglected, and thus any noise, interference or signal received through sidelobes is not considered. - The main-lobe is approximated as a Gaussian function in both elevation and azimuth direction \(\rightarrow\) The antenna gain is computed as a function of the angle off boresight in both elevation and azimuth direction.

  • For the calculation of \(T_\mathrm{Sky}\) the antenna gain is not used to weight the sky and planet noise temperatures, instead the beam coverage fractions are used (see also Overlap Area Computation). A uniform gain across the beam is assumed for this step.

  • The antenna can be placed either on a spacecraft or on Earth (ground). It is not (yet) possible to place the antenna on other celestial bodies.

  • For ground based antennas, the sky noise temperature is always assumed to be \(T_\mathrm{Sky} = 200K\). This is because the ground antenna does not have a pointing direction. It is assumed that the ground based antenna is always precisely pointed at the spacecraft antenna.

  • Doppler shift between two antennas is not (yet) considered.

  • Noise due to lightning and other static electrical discharges is neglected.

  • Man-made radio noise is neglected.

  • Solar activity variations are neglected.

User Guide

Setting the Antenna Environment

The antenna environment is determined by which state message is connected. The module must be connected to either a spacecraft state message or a ground state message, but not both.

For a space-based antenna, connect the spacecraft state message:

antenna.scStateInMsg.subscribeTo(scObject.scStateOutMsg)

The spacecraft state message is of type SCStatesMsgPayload.

For a ground-based antenna, connect the ground state message:

antenna.groundStateInMsg.subscribeTo(groundStation.currentGroundStateOutMsg)

The ground state message is of type GroundStateMsgPayload.

Setting Required Antenna Parameters

The following parameters must be set before the simulation is initialized: (here shown with example values for a typical S-band communication antenna)

antenna.setAntennaName("CommAntenna")                   # [-]  Antenna name
antenna.setAntennaFrequency(2.2e9)                      # [Hz] Operating frequency
antenna.setAntennaBandwidth(5e6)                        # [Hz] Bandwidth
antenna.setAntennaDirectivity_dB(20.0)                  # [dB] Directivity (must be > 9 dB)
antenna.setAntennaHpbwRatio(1.0)                        # [-]  Beam shape ratio k
antenna.setAntennaP_Tx(100.0)                           # [W]  Transmit power
antenna.setAntennaEquivalentNoiseTemp(50.0)             # [K]  Receiver noise temperature
antenna.setAntennaRadEfficiency(0.55)                   # [-]  Radiation efficiency

Setting Optional Antenna Parameters

The following parameters are optional:

antenna.setAntennaP_Rx(10.0)                            # [W]    Receive power (default: 0)
antenna.setAntennaEnvironmentTemperature(290.0)         # [K]    Ambient temperature (default: calculated based on ISA (ground) or 150K (space))
antenna.setUseHaslamMap(True)                           # [bool] Enable Haslam sky map (default: False)

Note

Calling antenna.setUseHaslamMap(True)` enables the use of the Haslam 408 MHz all-sky survey map for sky noise temperature calculation, and calles the function configureBrightnessFile(<filepath>) internally. If the user wants to use a custom brightness temperature map file, they must call antenna.configureBrightnessFile(<custom filePath>) after calling antenna.setUseHaslamMap(True).

Setting the Antenna Position and Orientation (Space-Based Only)

For space-based antennas, the antenna position and orientation relative to the spacecraft body frame can be set:

antenna.setAntennaPositionBodyFrame([0.5, 0.0, 0.0])    # [m]    Position offset (default: antenna is at B = [0,0,0])
antenna.setAntennaOrientationBodyFrame([0.0, 0.0, 0.0]) # [-]    MRP rotation (default: antenna is aligned with body frame)

Setting the Antenna State

The antenna state can be set via an input message or directly using a setter. To connect an antenna state input message:

antenna.antennaSetStateInMsg.subscribeTo(antennaController.antennaStateOutMsg)

The antenna state message is of type AntennaStateMsgPayload.

Alternatively, the state can be set directly using the setter method:

antenna.setAntennaState(simpleAntenna.AntennaTypes.ANTENNA_RXTX)

Valid states are ANTENNA_OFF (0), ANTENNA_RX (1), ANTENNA_TX (2), and ANTENNA_RXTX (3). The default state is ANTENNA_OFF.

Adding Celestial Bodies for Sky Noise Calculation (Optional)

For more accurate sky noise temperature calculations, celestial body positions can be provided. To add the sun:

antenna.sunInMsg.subscribeTo(gravFactory.spiceObject.planetStateOutMsgs[0])

To add planets (e.g., Earth, Moon) for beam coverage calculations, use the addPlanetToModel method:

antenna.addPlanetToModel(gravFactory.spiceObject.planetStateOutMsgs[1])  # Earth
antenna.addPlanetToModel(gravFactory.spiceObject.planetStateOutMsgs[2])  # Moon

The planet state messages are of type SpicePlanetStateMsgPayload.

To account for eclipse conditions affecting solar noise contribution:

antenna.sunEclipseInMsg.subscribeTo(eclipseObject.eclipseOutMsgs[0])

The eclipse message is of type EclipseMsgPayload.

Antenna Output Message

The simpleAntenna module outputs an antenna state message of type AntennaLogMsgPayload. To subscribe to this output:

antennaLog = antenna.antennaOutMsg.recorder()
scSim.AddModelToTask(simTaskName, antennaLog)

After running the simulation, the logged data can be accessed:

P_eirp = antennaLog.P_eirp_dB   # [dB]   EIRP
G_T = antennaLog.G_TN           # [dB/K] Figure of merit (G/T)
P_N = antennaLog.P_N            # [W]    Noise power
r_AN_N = antennaLog.r_AN_N      # [m]    Antenna position in inertial frame
sigma_AN = antennaLog.sigma_AN  # [-]    Antenna orientation (MRP)

class SimpleAntenna : public SysModel
#include <simpleAntenna.h>

This module describes how the simple antenna model operates within the simulation environment.The purpose of this module is to provide a basic representation of antenna behavior for spacecraft communication systems.The antenna is based on a simple model (2D Gaussian beam pattern). The user is able to set directivity, HPBW (elevation and azimuth), power demand for Tx and Rx, radiation efficiency, bandwidth and system noise temperature.

Public Functions

SimpleAntenna()

This is the constructor for the module class. It sets default variable values and initializes the various parts of the model

~SimpleAntenna() = default
void Reset(uint64_t CurrentSimNanos)

This method is used to reset the module and checks that required input messages are connected.

void UpdateState(uint64_t CurrentSimNanos)

This is the main method that gets called every time the module is updated. Provide an appropriate description.

void addPlanetToModel(Message<SpicePlanetStateMsgPayload> *tmpSpMsg)

This method adds planet state data message names to a vector.

Parameters:

tmpSpMsg – The planet name

void configureBrightnessFile(const std::string &file)

Configure the path to the Haslam 408 MHz all-sky brightness temperature FITS file. This must be called before setUseHaslamMap(true).

Parameters:

file – Full path to the Haslam FITS file

double calculateTsky()
inline std::string getAntennaName() const

Getters getter for antennaName

inline AntennaTypes::EnvironmentType getAntennaEnvironment() const

getter for environment property (space, ground, unknown)

inline AntennaTypes::AntennaStateEnum getAntennaState() const

getter for antennaState property (off, Rx, Tx, RxTx)

inline double getAntennaFrequency() const

getter for frequency property

inline double getAntennaBandwidth() const

getter for B property (bandwidth)

inline double getAntennaDdB() const

getter for DdB property

inline double getAntennaHpbwRatio() const

getter for HPBW ratio, k

inline std::vector<double> getAntennaHPBW() const

getter for HPBW property

inline double getAntennaP_Tx() const

getter for P_Tx property

inline double getAntennaP_Rx() const

getter for P_Rx property

inline double getT_E() const

getter for T_E property (equivalent noise temperature)

inline double getAntennaNoisePower() const

get antenna noise power P_N

inline double getAntennaRadEfficiency() const

getter for eta_rad property (radiation efficiency)

inline double getP_eirp_dB() const

getter for P_eirp_dB property (effective isotropic radiated power)

inline double getG_TN() const

getter for G_TN property (antenna gain over system noise temperature)

inline double getAntennaEnvTemperature() const

getter for T_Ambient property (ambient temperature)

inline Eigen::Vector3d getAntennaPositionInertialFrame() const

get antenna position in N frame

inline Eigen::MRPd getAntennaOrientationInertialFrame() const

get antenna orientation in N frame

inline Eigen::Vector3d getAntennaVelocityInertialFrame() const

get antenna velocity in N frame

inline Eigen::Vector3d getAntennaPositionBodyFrame() const

getter for r_AB_B property (antenna position to SC hub)

inline Eigen::MRPd getAntennaOrientationBodyFrame() const

getter for sigma_AB property (antenna orientation to SC hub)

inline Eigen::Vector3d getAntennaPositionCelestialBodyInertialFrame() const

get antenna position wrt to celestial body decomposed in {N}-frame

inline bool getUseHaslamMap() const

getter for useHaslamMap property

void setAntennaName(const std::string&)

setter for antennaName property

void setAntennaState(AntennaTypes::AntennaStateEnum)

setter for antennaState property

void setAntennaDirectivity_dB(double)

setter for DdB property

void setAntennaFrequency(double)

setter for frequency property

void setAntennaHpbwRatio(double)

setter for HPBW ratio “k” property

void setAntennaP_Tx(double)

setter for P_Tx property

void setAntennaP_Rx(double)

setter for P_Rx property

void setAntennaEquivalentNoiseTemp(double)

setter for T_E property

void setAntennaBandwidth(double)

setter for B property

void setAntennaRadEfficiency(double)

setter for eta_rad property

void setAntennaEnvironmentTemperature(double)

setter for T_Ambient property

void setAntennaPositionBodyFrame(Eigen::Vector3d)

setter for r_AB_B property (antenna position relative to body frame)

void setAntennaOrientationBodyFrame(Eigen::MRPd)

setter for sigma_AB property

void setUseHaslamMap(bool)

setter for useHaslamMap property

Public Members

ReadFunctor<SCStatesMsgPayload> scStateInMsg

[-] sc input state message

ReadFunctor<GroundStateMsgPayload> groundStateInMsg

ground state

ReadFunctor<AntennaStateMsgPayload> antennaSetStateInMsg

setting antenna to [off / Rx / Tx / RxTx]

ReadFunctor<SpicePlanetStateMsgPayload> sunInMsg

[-] sun data input message

std::vector<ReadFunctor<SpicePlanetStateMsgPayload>> planetInMsgs

A vector of planet incoming state message names ordered by the sequence in which planet are added to the module.

ReadFunctor<EclipseMsgPayload> sunEclipseInMsg

[-] Messun eclipse state input message

SCStatesMsgPayload scState

[-] Module variable where the input State Data message is stored

GroundStateMsgPayload groundState

ground state

AntennaStateMsgPayload antennaStateMsg

antenna output message

SpicePlanetStateMsgPayload spicePlanetStateMsg

[-] Module variable where the input Sun Data message is stored

Message<AntennaLogMsgPayload> antennaOutMsg

output msg description

AntennaLogMsgPayload antennaPhysicalStateMsgBuffer

output msg description

BSKLogger bskLogger

BSK Logging.

double rEqCustom

[m] Custom radius

Private Functions

void initializeAntenna()
void readInputMessages()
void writeOutputMessages(uint64_t CurrentSimNanos)
double calculatePlanetCoverage(double planetRadius, Eigen::Vector3d r_PN_N, double azimuth, double elevation)

Compute fraction of antenna beam covered by object.

Parameters:
  • planetRadius

  • r_PN_N

  • azimuth – Beam half-angle in azimuth [rad]

  • elevation – Beam half-angle in elevation [rad]

Returns:

coverage fraction [0..1]

double getPlanetEquatorialRadius(std::string planetSpiceName)

This method return planet radii.

Parameters:

planetSpiceName – The planet name according to the spice NAIF Integer ID codes.

Returns:

double The equatorial radius in metres associated with the given planet name.

double calculateTambient()
void populateOutputMsg(AntennaLogMsgPayload *msgBuffer)
void calculateAntennaPositionAndOrientation()
void calculateAntennaNoise()

Private Members

double minTreshold = 1e-6

[-] Minimum threshold for power and directivity values

std::string antennaName

[-] Antenna name

AntennaTypes::EnvironmentType environment

[-] Antenna environment of antenna 0: SPACE, 1: EARTH, -1: UNKNOWN

AntennaTypes::AntennaStateEnum antennaState

[-] Antenna state: 0: off, 1: Rx, 2: Tx, 3: RxTx, -1: UNKNOWN

std::vector<SpicePlanetStateMsgPayload> planetBuffer

[-] Buffer of the spacecraft state input messages

double frequency

[Hz] Antenna operating frequency (center frequency)

double B

[Hz] Antenna bandwidth

double DdB

[dB] Antenna gain (default 20 dBi –> gain of 100 in linear scale)

double k

[-] Elliptical Gaussian beamwidth ratio: k = HPBW_az / HPBW_el

double P_Tx

[W] Transmit power

double P_Rx

[W] Receive power

double T_E

[K] Equivalent noise temperature (default 50K) => Contribution of receiver and other components

double eta_r

[-] Antenna radiation efficiency (default 0.5)

std::vector<double> HPBW

[rad] Half-power beamwidth in azimuth and elevation

double P_N

[W] Antenna noise power

double P_eirp_dB

[dB] Equivalent isotropically radiated power

double G_TN

[dB/K] Antenna gain over system noise temperature

double T_Ambient

[K] Ambient temperature (default ISA)

double T_AmbientSet

[K] User defined Ambient temperature

Eigen::Vector3d r_AN_N

[m] Antenna position in N frame

Eigen::MRPd sigma_AN

[-] Antenna orientation in N frame

Eigen::Vector3d v_AN_N

[m/s] Antenna velocity in N frame (stub, future use)

Eigen::Vector3d r_AB_B

[m] Antenna position relative to body frame

Eigen::MRPd sigma_AB

[-] Antenna orientation relative to body frame

Eigen::Vector3d r_AP_N

[m] Position of the antenna wrt to the celestial body frame {P} (used for ground antennas only)

Eigen::Vector3d r_BN_N

[m] Position of the SC in the inertial frame {N} AND Spacecraft B position relative to sun S

Eigen::Vector3d nHat_A

[-] Antenna boresight vector in antenna frame

bool useHaslamMap

[bool] Flag to use Haslam sky map data structure (slower but more accurate)

SpicePlanetStateMsgPayload sunData

[-] Sun data structure

double illuminationFactor

[-] solar eclipse shadow factor from 0 (fully obscured) to 1 (fully visible)