28 std::vector<std::vector<RealType>>
readPattern(
const std::string& name,
const std::string& datasetName);
45 explicit Antenna(std::string name) noexcept : _loss_factor(1), _name(std::move(name)) {}
80 [[nodiscard]] std::string
getName() const noexcept {
return _name; }
171 Antenna(name.data()), _alpha(alpha), _beta(beta), _gamma(gamma)
203 RealType wavelength)
const noexcept override;
228 Antenna(name.data()), _azscale(azscale), _elscale(elscale)
251 RealType wavelength)
const noexcept override;
302 RealType wavelength)
const noexcept override;
347 RealType wavelength)
const noexcept override;
373 XmlAntenna(
const std::string_view name,
const std::string_view filename) :
374 Antenna(name.data()), _azi_samples(std::make_unique<
interp::InterpSet>()),
375 _elev_samples(std::make_unique<
interp::InterpSet>())
377 loadAntennaDescription(filename);
400 RealType wavelength)
const override;
403 [[nodiscard]]
const std::string&
getFilename() const noexcept {
return _filename; }
421 void loadAntennaDescription(std::string_view filename);
423 std::string _filename;
425 std::unique_ptr<interp::InterpSet> _azi_samples;
426 std::unique_ptr<interp::InterpSet> _elev_samples;
445 H5Antenna(
const std::string_view name,
const std::string& filename) :
446 Antenna(name.data()), _pattern(
serial::readPattern(filename,
"antenna")), _filename(filename)
471 [[nodiscard]]
const std::string&
getFilename() const noexcept {
return _filename; }
474 [[nodiscard]]
const std::vector<std::vector<RealType>>&
getPattern() const noexcept {
return _pattern; }
477 std::vector<std::vector<RealType>> _pattern;
478 std::string _filename;
Abstract base class representing an antenna.
Antenna(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.
Antenna(std::string name) noexcept
Constructs an Antenna object with the given name.
static RealType getAngle(const math::SVec3 &angle, const math::SVec3 &refangle) noexcept
Computes the angle between the input and reference angles.
Antenna & operator=(Antenna &&)=default
Antenna & operator=(const Antenna &)=delete
void setEfficiencyFactor(RealType loss) noexcept
Sets the efficiency factor of the antenna.
virtual ~Antenna()=default
RealType getEfficiencyFactor() const noexcept
Retrieves the efficiency factor of the antenna.
Antenna(const Antenna &)=delete
std::string getName() const noexcept
Retrieves the name of the antenna.
virtual RealType getNoiseTemperature(const math::SVec3 &) const noexcept
Computes the noise temperature of the antenna based on the angle.
Represents a Gaussian-shaped antenna gain pattern.
Gaussian & operator=(Gaussian &&)=delete
Gaussian(const Gaussian &)=delete
Gaussian & operator=(const Gaussian &)=delete
RealType getGain(const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const noexcept override
Computes the gain of the Gaussian antenna.
Gaussian(Gaussian &&)=delete
RealType getAzimuthScale() const noexcept
Gets the azimuth scale factor.
RealType getElevationScale() const noexcept
Gets the elevation scale factor.
Gaussian(const std::string_view name, const RealType azscale, const RealType elscale)
Constructs a Gaussian antenna with the given parameters.
~Gaussian() override=default
Represents an antenna whose gain pattern is loaded from a HDF5 file.
H5Antenna(const std::string_view name, const std::string &filename)
Constructs a H5Antenna with the specified name and gain pattern file.
H5Antenna & operator=(const H5Antenna &)=delete
H5Antenna & operator=(H5Antenna &&)=delete
~H5Antenna() override=default
const std::string & getFilename() const noexcept
Gets the filename of the antenna description.
H5Antenna(H5Antenna &&)=delete
H5Antenna(const H5Antenna &)=delete
RealType getGain(const math::SVec3 &angle, const math::SVec3 &refangle, RealType) const override
Computes the gain of the antenna based on the input angle and reference angle.
const std::vector< std::vector< RealType > > & getPattern() const noexcept
Gets the gain pattern object.
Represents an isotropic antenna with uniform gain in all directions.
Isotropic(const std::string_view name)
Constructs an Isotropic antenna with the given name.
Isotropic & operator=(Isotropic &&)=delete
~Isotropic() override=default
Isotropic & operator=(const Isotropic &)=delete
RealType getGain(const math::SVec3 &, const math::SVec3 &, RealType) const override
Computes the gain of the isotropic antenna.
Isotropic(Isotropic &&)=delete
Isotropic(const Isotropic &)=delete
Represents a parabolic reflector antenna.
Parabolic(const Parabolic &)=delete
~Parabolic() override=default
Parabolic & operator=(const Parabolic &)=delete
Parabolic(const std::string_view name, const RealType diameter)
Constructs a Parabolic antenna with the given diameter.
RealType getDiameter() const noexcept
Gets the diameter of the parabolic reflector.
Parabolic & operator=(Parabolic &&)=delete
Parabolic(Parabolic &&)=delete
RealType getGain(const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const noexcept override
Computes the gain of the parabolic antenna.
Represents a sinc function-based antenna gain pattern.
RealType getAlpha() const noexcept
Gets the alpha 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.
Sinc & operator=(Sinc &&)=delete
Sinc & operator=(const Sinc &)=delete
RealType getGamma() const noexcept
Gets the gamma parameter of the sinc function.
Sinc(const Sinc &)=delete
RealType getBeta() const noexcept
Gets the beta parameter of the sinc function.
Sinc(const std::string_view name, const RealType alpha, const RealType beta, const RealType gamma)
Constructs a Sinc antenna with the given parameters.
Represents a square horn antenna.
SquareHorn & operator=(SquareHorn &&)=delete
RealType getGain(const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const noexcept override
Computes the gain of the square horn antenna.
RealType getDimension() const noexcept
Gets the dimension of the square horn.
SquareHorn(SquareHorn &&)=delete
SquareHorn & operator=(const SquareHorn &)=delete
SquareHorn(const std::string_view name, const RealType dimension)
Constructs a SquareHorn antenna with the given dimension.
~SquareHorn() override=default
SquareHorn(const SquareHorn &)=delete
Represents an antenna whose gain pattern is defined by an XML file.
XmlAntenna(const std::string_view name, const std::string_view filename)
Constructs an XmlAntenna with the specified name and XML configuration file.
XmlAntenna & operator=(const XmlAntenna &)=delete
RealType getMaxGain() const noexcept
Gets the maximum gain of the antenna.
XmlAntenna(XmlAntenna &&)=delete
XmlAntenna & operator=(XmlAntenna &&)=delete
RealType getGain(const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const override
Computes the gain of the antenna based on the input angle and reference angle.
~XmlAntenna() override=default
const interp::InterpSet * getAzimuthSamples() const noexcept
Gets the interpolation set for azimuth gain samples.
const interp::InterpSet * getElevationSamples() const noexcept
Gets the interpolation set for elevation gain samples.
const std::string & getFilename() const noexcept
Gets the filename of the antenna description.
XmlAntenna(const XmlAntenna &)=delete
Wrapper class for managing interpolation sets using smart pointers.
A class representing a vector in spherical coordinates.
Global configuration file for the project.
double RealType
Type for real numbers.
Classes and operations for 3D geometry.
Header file for the interpolation of sets of data.
Header file for the logging system.
std::vector< std::vector< RealType > > readPattern(const std::string &name, const std::string &datasetName)
Reads a 2D pattern dataset from an HDF5 file.