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:
Writes out a PowerNodeUsageMsgPayload describing its power consumption at each sim update
Can be switched on or off using an optional message of type DeviceStatusMsgPayload
Message Connection Descriptions
Figure 1: antennaPower() Module I/O Illustration
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
antennaSetStateInMsg |
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_Rxare consumedANTENNA_TX: Base power and transmit power
P_Txare consumedANTENNA_RXTX: Base power and both
P_RxandP_Txpower are consumed
The net power output is:
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
— 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
-
AntennaPower()