Module: antennaPower

Executive Summary

This module evaluates the power draw of an antenna device. It reads the antennaSetStateInMsg containing the current antenna state and calculates the power draw accordingly.

This module is a sub-class of Module: powerNodeBase. As such it:

  1. Writes out a PowerNodeUsageMsgPayload describing its power consumption at each sim update

  2. Can be switched on or off using an optional message of type DeviceStatusMsgPayload

Message Connection Descriptions

../../../../_images/PowerAnt.svg

Figure 1: antennaPower() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

antennaSetStateInMsg

AntennaLogMsgPayload

Antenna state input message providing current antenna state and power values.

Detailed Module Description

The antenna power consumption depends on its operational state:

  • ANTENNA_OFF: Only base power is consumed (default 0.0 W)

  • ANTENNA_RX: Base power and receive power P_Rx are consumed

  • ANTENNA_TX: Base power and transmit power P_Tx are consumed

  • ANTENNA_RXTX: Base power and both P_Rx and P_Tx power are consumed

The net power output is:

\[p_{\text{out}} = -(p_{\text{base}} + p_{\text{mode}})\]

where \(p_{\text{mode}}\) is zero, P_Rx, P_Tx, or P_Rx + P_Tx depending on the antenna state.

User Guide

This module must be connected to an antenna module that outputs the AntennaLogMsgPayload message.

Minimum Module Setup

antPower = antennaPower.AntennaPower()
antPower.ModelTag = "antennaPower"
antPower.basePowerNeed = 5.0  # [W] baseline power draw (optional, default = 0.0 W)
antPower.antennaSetStateInMsg.subscribeTo(antenna.antennaLogOutMsg)
unitTestSim.AddModelToTask(unitTaskName, antPower)

The basePowerNeed parameter specifies the base power consumption in Watts when the antenna is powered on (should be non-negative).


class AntennaPower : public PowerNodeBase
#include <antennaPower.h>

Antenna power class.

Public Functions

AntennaPower()

Constructor

~AntennaPower()
void customReset(uint64_t CurrentSimNanos)

Custom reset method.

This method is used to reset the module. Here variables are checked for correct values.

bool customReadMessages()

Custom read method, similar to customSelfInit; returns `true’ by default.

This method is used to read incoming antenna state message.

Public Members

ReadFunctor<AntennaLogMsgPayload> antennaSetStateInMsg

Antenna state input message.

double basePowerNeed

[W] base electrical power required to operate an antenna (positive value)

BSKLogger bskLogger

&#8212; BSK Logging

Private Functions

void evaluatePowerModel(PowerNodeUsageMsgPayload *powerUsageMsg)

Computes the antenna power load. Determines the netPower attribute in powerUsageSimMessage.

Private Members

AntennaLogMsgPayload antennaStatusMsgBuffer = {}

copy of the antenna status message