FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
antenna::Antenna Class Referenceabstract

Abstract base class representing an antenna. More...

#include "antenna_factory.h"

+ Inheritance diagram for antenna::Antenna:

Public Member Functions

 Antenna (std::string name, const SimId id=0) noexcept
 Constructs an Antenna object with the given name.
 
virtual ~Antenna ()=default
 
 Antenna (const Antenna &)=delete
 
Antennaoperator= (const Antenna &)=delete
 
 Antenna (Antenna &&)=default
 
Antennaoperator= (Antenna &&)=default
 
virtual RealType getGain (const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const =0
 Computes the gain of the antenna based on the input angle and reference angle.
 
RealType getEfficiencyFactor () const noexcept
 Retrieves the efficiency factor of the antenna.
 
std::string getName () const noexcept
 Retrieves the name of the antenna.
 
SimId getId () const noexcept
 Retrieves the unique ID of the antenna.
 
virtual RealType getNoiseTemperature (const math::SVec3 &) const noexcept
 Computes the noise temperature of the antenna based on the angle.
 
void setEfficiencyFactor (RealType loss) noexcept
 Sets the efficiency factor of the antenna.
 
void setName (std::string name) noexcept
 Sets the name of the antenna.
 

Static Protected Member Functions

static RealType getAngle (const math::SVec3 &angle, const math::SVec3 &refangle) noexcept
 Computes the angle between the input and reference angles.
 

Detailed Description

Abstract base class representing an antenna.

Definition at line 39 of file antenna_factory.h.

Constructor & Destructor Documentation

◆ Antenna() [1/3]

antenna::Antenna::Antenna ( std::string  name,
const SimId  id = 0 
)
explicitnoexcept

Constructs an Antenna object with the given name.

Parameters
nameThe name of the antenna.

Definition at line 47 of file antenna_factory.h.

47 :
48 _loss_factor(1), _id(id == 0 ? SimIdGenerator::instance().generateId(ObjectType::Antenna) : id),
49 _name(std::move(name))
50 {
51 }
static SimIdGenerator & instance()
Get the singleton instance of SimIdGenerator.
Definition sim_id.h:48

◆ ~Antenna()

virtual antenna::Antenna::~Antenna ( )
virtualdefault

◆ Antenna() [2/3]

antenna::Antenna::Antenna ( const Antenna )
delete

◆ Antenna() [3/3]

antenna::Antenna::Antenna ( Antenna &&  )
default

Member Function Documentation

◆ getAngle()

RealType antenna::Antenna::getAngle ( const math::SVec3 angle,
const math::SVec3 refangle 
)
staticprotectednoexcept

Computes the angle between the input and reference angles.

Parameters
angleThe input angle.
refangleThe reference angle.
Returns
The computed angle.

Definition at line 325 of file antenna_factory.cpp.

326 {
327 SVec3 normangle(angle);
328 normangle.length = 1;
329 return std::acos(dotProduct(Vec3(normangle), Vec3(refangle)));
330 }
A class representing a vector in spherical coordinates.
A class representing a vector in rectangular coordinates.
RealType dotProduct(const Vec3 &a, const Vec3 &b) noexcept
Computes the dot product of two Vec3 vectors.

References math::SVec3::length.

◆ getEfficiencyFactor()

RealType antenna::Antenna::getEfficiencyFactor ( ) const
noexcept

Retrieves the efficiency factor of the antenna.

Returns
The efficiency factor of the antenna.

Definition at line 79 of file antenna_factory.h.

79{ return _loss_factor; }

Referenced by antenna::Isotropic::getGain(), antenna::XmlAntenna::getGain(), antenna::H5Antenna::getGain(), and antenna::to_json().

+ Here is the caller graph for this function:

◆ getGain()

virtual RealType antenna::Antenna::getGain ( const math::SVec3 angle,
const math::SVec3 refangle,
RealType  wavelength 
) const
pure virtual

Computes the gain of the antenna based on the input angle and reference angle.

Parameters
angleThe angle at which the gain is to be computed.
refangleThe reference angle.
wavelengthThe wavelength of the signal.
Returns
The gain of the antenna at the specified angle and wavelength.

Implemented in antenna::Isotropic, antenna::Sinc, antenna::Gaussian, antenna::SquareHorn, antenna::Parabolic, antenna::XmlAntenna, and antenna::H5Antenna.

Referenced by fers_get_antenna_pattern(), and radar::Radar::getGain().

+ Here is the caller graph for this function:

◆ getId()

SimId antenna::Antenna::getId ( ) const
noexcept

Retrieves the unique ID of the antenna.

Returns
The antenna SimId.

Definition at line 93 of file antenna_factory.h.

93{ return _id; }

Referenced by antenna::to_json(), radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getName()

std::string antenna::Antenna::getName ( ) const
noexcept

Retrieves the name of the antenna.

Returns
The name of the antenna.

Definition at line 86 of file antenna_factory.h.

86{ return _name; }

Referenced by serial::kml_generator_utils::findGaussian3DbDropAngle(), serial::kml_generator_utils::findParabolic3DbDropAngle(), serial::kml_generator_utils::findSquareHorn3DbDropAngle(), serial::kml_generator_utils::generateAntennaKml(), serial::xml_serializer_utils::serializeMonostatic(), serial::xml_serializer_utils::serializeReceiver(), serial::xml_serializer_utils::serializeTransmitter(), and antenna::to_json().

+ Here is the caller graph for this function:

◆ getNoiseTemperature()

virtual RealType antenna::Antenna::getNoiseTemperature ( const math::SVec3 ) const
virtualnoexcept

Computes the noise temperature of the antenna based on the angle.

Parameters
angleThe angle at which the noise temperature is to be computed.
Returns
The noise temperature of the antenna.

Definition at line 102 of file antenna_factory.h.

102{ return 0; }

◆ operator=() [1/2]

Antenna & antenna::Antenna::operator= ( Antenna &&  )
default

◆ operator=() [2/2]

Antenna & antenna::Antenna::operator= ( const Antenna )
delete

◆ setEfficiencyFactor()

void antenna::Antenna::setEfficiencyFactor ( RealType  loss)
noexcept

Sets the efficiency factor of the antenna.

Parameters
lossThe new efficiency factor.

Definition at line 316 of file antenna_factory.cpp.

317 {
318 if (loss > 1)
319 {
320 LOG(Level::INFO, "Using greater than unity antenna efficiency.");
321 }
322 _loss_factor = loss;
323 }
#define LOG(level,...)
Definition logging.h:19

References LOG.

Referenced by serial::update_antenna_from_json().

+ Here is the caller graph for this function:

◆ setName()

void antenna::Antenna::setName ( std::string  name)
noexcept

Sets the name of the antenna.

Parameters
nameThe new name of the antenna.

Definition at line 116 of file antenna_factory.h.

116{ _name = std::move(name); }

Referenced by serial::update_antenna_from_json().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: