18 #ifndef PHASED_ARRAY_MODEL_H
19 #define PHASED_ARRAY_MODEL_H
24 #include <ns3/matrix-array.h>
25 #include <ns3/object.h>
68 for (
size_t i = 0; i < complexVector.
GetSize(); i++)
72 return std::sqrt(
norm);
99 uint8_t polIndex = 0)
const = 0;
198 uint16_t subElementIndex)
const = 0;
255 uint32_t
GetId()
const;
Class holding the azimuth and inclination angles of spherical coordinates.
MatrixArray class inherits ValArray class and provides additional interfaces to ValArray which enable...
A base class which provides memory management and object aggregation.
Class implementing the phased array model virtual base class.
const PhasedArrayModel::ComplexVector & GetBeamformingVectorRef() const
Returns the const reference of the beamforming vector that is currently being used.
static uint32_t m_idCounter
the ID counter that is used to determine the unique antenna array ID
virtual uint32_t GetNumRows() const =0
Get the number of rows.
ComplexVector GetSteeringVector(Angles a) const
Returns the steering vector that points toward the specified position.
virtual void SetNumRows(uint32_t nRows)=0
Set the number of rows.
virtual Vector GetElementLocation(uint64_t index) const =0
Returns the location of the antenna element with the specified index, normalized with respect to the ...
virtual uint16_t GetNumPorts() const =0
Get the number of ports.
uint32_t GetId() const
Returns the ID of this antenna array instance.
virtual uint16_t GetNumHorizontalPorts() const =0
Get the horizontal number of ports.
virtual uint16_t GetNumVerticalPorts() const =0
Get the vertical number of ports.
virtual uint32_t GetNumColumns() const =0
Get the number of columns.
PhasedArrayModel()
Constructor.
virtual size_t GetNumElemsPerPort() const =0
Get the number of elements per port.
Ptr< AntennaModel > m_antennaElement
the model of the antenna element in use
Ptr< const AntennaModel > GetAntennaElement() const
Returns a pointer to the AntennaModel instance used to model the elements of the array.
void SetAntennaElement(Ptr< AntennaModel > antennaElement)
Sets the antenna model to be used.
virtual uint8_t GetNumPols() const =0
Get the number of polarizations.
virtual size_t GetVElemsPerPort() const =0
Get the vertical number of antenna elements per port.
virtual uint8_t GetElemPol(size_t elementIndex) const =0
Returns the index of the polarization to which belongs that antenna element.
virtual void SetNumHorizontalPorts(uint16_t nPorts)=0
Set the horizontal number of ports.
virtual void SetNumColumns(uint32_t nColumns)=0
Set the number of columns.
ComplexVector GetBeamformingVector() const
Returns the beamforming vector that is currently being used.
bool m_isBfVectorValid
ensures the validity of the beamforming vector
double norm(const ComplexVector &complexVector) const
Computes the Frobenius norm of the complex vector.
virtual std::pair< double, double > GetElementFieldPattern(Angles a, uint8_t polIndex=0) const =0
Returns the horizontal and vertical components of the antenna element field pattern at the specified ...
virtual size_t GetHElemsPerPort() const =0
Get the horizontal number of antenna elements per port.
~PhasedArrayModel() override
Destructor.
virtual bool IsDualPol() const =0
Get the indication whether the antenna array is dual polarized.
virtual double GetPolSlant() const =0
Get the polarization slant angle.
uint32_t m_id
the ID of this antenna array instance
virtual uint16_t ArrayIndexFromPortIndex(uint16_t portIndex, uint16_t subElementIndex) const =0
Calculate the index in the antenna array from the port index and the element in the port.
void SetBeamformingVector(const ComplexVector &beamformingVector)
Sets the beamforming vector to be used.
ComplexVector m_beamformingVector
the beamforming vector in use
virtual size_t GetNumElems() const =0
Returns the number of antenna elements.
virtual void SetNumVerticalPorts(uint16_t nPorts)=0
Set the vertical number of ports.
static TypeId GetTypeId()
Get the type ID.
a unique identifier for an interface.
const double norm
Normalization to obtain randoms on [0,1).
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MatrixArray< std::complex< double > > ComplexMatrixArray
Create an alias for MatrixArray using complex type.