FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
antenna::Gaussian Class Referencefinal

Represents a Gaussian-shaped antenna gain pattern. More...

#include "antenna_factory.h"

+ Inheritance diagram for antenna::Gaussian:
+ Collaboration diagram for antenna::Gaussian:

Public Member Functions

 Gaussian (const std::string_view name, const RealType azscale, const RealType elscale, const SimId id=0)
 Constructs a Gaussian antenna with the given parameters.
 
 ~Gaussian () override=default
 
 Gaussian (const Gaussian &)=delete
 
Gaussianoperator= (const Gaussian &)=delete
 
 Gaussian (Gaussian &&)=delete
 
Gaussianoperator= (Gaussian &&)=delete
 
RealType getGain (const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const noexcept override
 Computes the gain of the Gaussian antenna.
 
RealType getAzimuthScale () const noexcept
 Gets the azimuth scale factor.
 
RealType getElevationScale () const noexcept
 Gets the elevation scale factor.
 
void setAzimuthScale (RealType azscale) noexcept
 Sets the azimuth scale factor of the Gaussian function.
 
void setElevationScale (RealType elscale) noexcept
 Sets the elevation scale factor of the Gaussian 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 Gaussian-shaped antenna gain pattern.

This antenna has a gain pattern that follows a Gaussian distribution.

Definition at line 260 of file antenna_factory.h.

Constructor & Destructor Documentation

◆ Gaussian() [1/3]

antenna::Gaussian::Gaussian ( const std::string_view  name,
const RealType  azscale,
const RealType  elscale,
const SimId  id = 0 
)

Constructs a Gaussian antenna with the given parameters.

Parameters
nameThe name of the antenna.
azscaleThe azimuth scale factor.
elscaleThe elevation scale factor.

Definition at line 270 of file antenna_factory.h.

270 :
271 Antenna(name.data(), id), _azscale(azscale), _elscale(elscale)
272 {
273 }
Antenna(std::string name, const SimId id=0) noexcept
Constructs an Antenna object with the given name.
math::Vec3 max

◆ ~Gaussian()

antenna::Gaussian::~Gaussian ( )
overridedefault

◆ Gaussian() [2/3]

antenna::Gaussian::Gaussian ( const Gaussian )
delete

◆ Gaussian() [3/3]

antenna::Gaussian::Gaussian ( Gaussian &&  )
delete

Member Function Documentation

◆ 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 356 of file antenna_factory.cpp.

357 {
359 normangle.length = 1;
360 return std::acos(dotProduct(Vec3(normangle), Vec3(refangle)));
361 }
A class representing a vector in spherical coordinates.
A class representing a vector in rectangular coordinates.
RealType length() const noexcept
Calculates the length (magnitude) of the vector.
RealType dotProduct(const Vec3 &a, const Vec3 &b) noexcept
Computes the dot product of two Vec3 vectors.

References math::SVec3::length.

◆ getAzimuthScale()

RealType antenna::Gaussian::getAzimuthScale ( ) const
noexcept

Gets the azimuth scale factor.

Definition at line 297 of file antenna_factory.h.

297{ return _azscale; }

◆ getEfficiencyFactor()

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

Retrieves the efficiency factor of the antenna.

Returns
The efficiency factor of the antenna.

Definition at line 80 of file antenna_factory.h.

80{ return _loss_factor; }

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

+ Here is the caller graph for this function:

◆ getElevationScale()

RealType antenna::Gaussian::getElevationScale ( ) const
noexcept

Gets the elevation scale factor.

Definition at line 300 of file antenna_factory.h.

300{ return _elscale; }

◆ getGain()

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

Computes the gain of the Gaussian antenna.

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 363 of file antenna_factory.cpp.

364 {
365 const SVec3 a = angle - refangle;
366 return std::exp(-a.azimuth * a.azimuth * _azscale) * std::exp(-a.elevation * a.elevation * _elscale);
367 }
RealType a

References a.

◆ getId()

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

Retrieves the unique ID of the antenna.

Returns
The antenna SimId.

Definition at line 94 of file antenna_factory.h.

94{ return _id; }

Referenced by 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 87 of file antenna_factory.h.

87{ return _name; }

◆ 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 103 of file antenna_factory.h.

103{ return 0; }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setAzimuthScale()

void antenna::Gaussian::setAzimuthScale ( RealType  azscale)
noexcept

Sets the azimuth scale factor of the Gaussian function.

Parameters
azscaleThe new azimuth scale factor.

Definition at line 307 of file antenna_factory.h.

307{ _azscale = azscale; }

◆ setEfficiencyFactor()

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

Sets the efficiency factor of the antenna.

Parameters
lossThe new efficiency factor.

Definition at line 347 of file antenna_factory.cpp.

348 {
349 if (loss > 1)
350 {
351 LOG(Level::INFO, "Using greater than unity antenna efficiency.");
352 }
353 _loss_factor = loss;
354 }
#define LOG(level,...)
Definition logging.h:19

References LOG.

◆ setElevationScale()

void antenna::Gaussian::setElevationScale ( RealType  elscale)
noexcept

Sets the elevation scale factor of the Gaussian function.

Parameters
elscaleThe new elevation scale factor.

Definition at line 314 of file antenna_factory.h.

314{ _elscale = elscale; }

◆ 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 117 of file antenna_factory.h.

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

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