Class Antenna¶
Defined in File antenna.h
Class Documentation¶
-
class Antenna¶
Public Functions
-
Antenna() = default¶
-
inline Antenna(const std::string &name)¶
-
void LoadAntennaPattern()¶
Load the antenna gain pattern from the named pattern file (e.g. “Block-IIR_ACE”) into
gain_/phi_/theta_, reformatting the raw 1D/2D table into LuPNT’s [-180,180] (phi) x [0,360] (theta) convention.Called from the
Antenna(name)constructor so thatGnssConstellation/GNSSMeasurements(e.g. GNSSMeasurements::SetReceiverAntenna, GnssConstellation::GetTransmitterAntenna) get a ready-to-query gain pattern for CN0/link-budget calculations. Ifname_is empty, the antenna is treated as omni-directional (ComputeGain returns 0).
-
Real ComputeGain(Real theta, Real phi) const¶
Look up the antenna gain at a given boresight-relative elevation/azimuth pair from the loaded pattern.
Used by GNSSMeasurements::ComputeCN0 to evaluate the transmitter and receiver antenna gains (
G_tx,G_rx) that feed the link-budget / CN0 estimate for a GNSS channel.- Parameters:
theta – Azimuth angle around boresight [rad], wrapped to [0, 2*pi)
phi – Elevation/off-boresight angle [rad], wrapped to [-pi, pi]
- Returns:
Antenna gain at (
theta,phi) [dB]; 0 for an omni-directional antenna, NaN ifphiexceeds the pattern’s coverage
- inline VEC_DEF_REAL_REAL (ComputeGain) std
Name of the loaded antenna pattern (e.g. “Block-IIR_ACE”); empty for omni-directional.
-
Real ComputeGain(const Vec3 &direction) const¶
Look up the antenna gain in the direction of a given unit vector, expressed in the antenna’s own boresight-aligned frame.
Convenience overload of ComputeGain(theta, phi) that derives the elevation/azimuth pair from a 3D
directionvector (Z = boresight) before delegating to the 2-angle form.- Parameters:
direction – Direction to evaluate the gain in, in the antenna boresight frame (need not be normalized)
- Returns:
Antenna gain in that direction [dB]
-
Antenna() = default¶