FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
antenna::Sinc Class Referencefinal

Represents a sinc function-based antenna gain pattern. More...

#include "antenna_factory.h"

+ Inheritance diagram for antenna::Sinc:
+ Collaboration diagram for antenna::Sinc:

Public Member Functions

 Sinc (const std::string_view name, const RealType alpha, const RealType beta, const RealType gamma, const SimId id=0)
 Constructs a Sinc antenna with the given parameters.
 
 ~Sinc () override=default
 
 Sinc (const Sinc &)=delete
 
Sincoperator= (const Sinc &)=delete
 
 Sinc (Sinc &&)=delete
 
Sincoperator= (Sinc &&)=delete
 
RealType getAlpha () const noexcept
 Gets the alpha parameter of the sinc function.
 
RealType getBeta () const noexcept
 Gets the beta parameter of the sinc function.
 
RealType getGamma () const noexcept
 Gets the gamma parameter of the sinc function.
 
RealType getGain (const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const noexcept override
 Computes the gain of the sinc antenna based on the input parameters.
 
void setAlpha (RealType alpha) noexcept
 Sets the alpha parameter of the sinc function.
 
void setBeta (RealType beta) noexcept
 Sets the beta parameter of the sinc function.
 
void setGamma (RealType gamma) noexcept
 Sets the gamma parameter of the sinc function.
 
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

Represents a sinc function-based antenna gain pattern.

This antenna has a gain pattern defined by a sinc function, with customizable parameters.

Definition at line 180 of file antenna_factory.h.

Constructor & Destructor Documentation

◆ Sinc() [1/3]

antenna::Sinc::Sinc ( const std::string_view  name,
const RealType  alpha,
const RealType  beta,
const RealType  gamma,
const SimId  id = 0 
)

Constructs a Sinc antenna with the given parameters.

Parameters
nameThe name of the antenna.
alphaThe alpha parameter.
betaThe beta parameter.
gammaThe gamma parameter.

Definition at line 191 of file antenna_factory.h.

192 : Antenna(name.data(), id), _alpha(alpha), _beta(beta), _gamma(gamma)
193 {
194 }
Antenna(std::string name, const SimId id=0) noexcept
Constructs an Antenna object with the given name.

◆ ~Sinc()

antenna::Sinc::~Sinc ( )
overridedefault

◆ Sinc() [2/3]

antenna::Sinc::Sinc ( const Sinc )
delete

◆ Sinc() [3/3]

antenna::Sinc::Sinc ( Sinc &&  )
delete

Member Function Documentation

◆ getAlpha()

RealType antenna::Sinc::getAlpha ( ) const
noexcept

Gets the alpha parameter of the sinc function.

Definition at line 207 of file antenna_factory.h.

207{ return _alpha; }

◆ getAngle()

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

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.

◆ getBeta()

RealType antenna::Sinc::getBeta ( ) const
noexcept

Gets the beta parameter of the sinc function.

Definition at line 210 of file antenna_factory.h.

210{ return _beta; }

◆ getEfficiencyFactor()

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

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()

RealType antenna::Sinc::getGain ( const math::SVec3 angle,
const math::SVec3 refangle,
RealType  wavelength 
) const
overridevirtualnoexcept

Computes the gain of the sinc antenna based on the input parameters.

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

Implements antenna::Antenna.

Definition at line 338 of file antenna_factory.cpp.

339 {
340 const RealType theta = getAngle(angle, refangle);
341 const RealType sinc_val = sinc(_beta * theta);
342 const RealType gain_pattern = std::pow(std::abs(sinc_val), _gamma);
343 return _alpha * gain_pattern * getEfficiencyFactor();
344 }
static RealType getAngle(const math::SVec3 &angle, const math::SVec3 &refangle) noexcept
Computes the angle between the input and reference angles.
RealType getEfficiencyFactor() const noexcept
Retrieves the efficiency factor of the antenna.
double RealType
Type for real numbers.
Definition config.h:27

◆ getGamma()

RealType antenna::Sinc::getGamma ( ) const
noexcept

Gets the gamma parameter of the sinc function.

Definition at line 213 of file antenna_factory.h.

213{ return _gamma; }

◆ getId()

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

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
noexceptinherited

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
virtualnoexceptinherited

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]

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

◆ operator=() [2/2]

Sinc & antenna::Sinc::operator= ( Sinc &&  )
delete

◆ setAlpha()

void antenna::Sinc::setAlpha ( RealType  alpha)
noexcept

Sets the alpha parameter of the sinc function.

Parameters
alphaThe new alpha parameter.

Definition at line 231 of file antenna_factory.h.

231{ _alpha = alpha; }

◆ setBeta()

void antenna::Sinc::setBeta ( RealType  beta)
noexcept

Sets the beta parameter of the sinc function.

Parameters
betaThe new beta parameter.

Definition at line 238 of file antenna_factory.h.

238{ _beta = beta; }

◆ setEfficiencyFactor()

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

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:

◆ setGamma()

void antenna::Sinc::setGamma ( RealType  gamma)
noexcept

Sets the gamma parameter of the sinc function.

Parameters
gammaThe new gamma parameter.

Definition at line 245 of file antenna_factory.h.

245{ _gamma = gamma; }

◆ setName()

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

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: