18#ifndef PHASED_ARRAY_MODEL_H
19#define PHASED_ARRAY_MODEL_H
21#include <ns3/angles.h>
22#include <ns3/antenna-model.h>
23#include <ns3/matrix-array.h>
24#include <ns3/object.h>
67 for (
size_t i = 0; i < complexVector.
GetSize(); i++)
69 norm += std::norm(complexVector[i]);
71 return std::sqrt(
norm);
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.
static uint32_t m_idCounter
the ID counter that is used to determine the unique antenna array ID
ComplexVector GetSteeringVector(Angles a) const
Returns the steering vector that points toward the specified position.
virtual Vector GetElementLocation(uint64_t index) const =0
Returns the location of the antenna element with the specified index, normalized with respect to the ...
uint32_t GetId() const
Returns the ID of this antenna array instance.
PhasedArrayModel()
Constructor.
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.
ComplexMatrixArray ComplexVector
the underlying Valarray
ComplexVector GetBeamformingVector() const
Returns the beamforming vector that is currently being used.
virtual std::pair< double, double > GetElementFieldPattern(Angles a) const =0
Returns the horizontal and vertical components of the antenna element field pattern at the specified ...
bool m_isBfVectorValid
ensures the validity of the beamforming vector
double norm(const ComplexVector &complexVector) const
Computes the Frobenius norm of the complex vector.
~PhasedArrayModel() override
Destructor.
uint32_t m_id
the ID of this antenna array instance
virtual size_t GetNumberOfElements() const =0
Returns the number of antenna elements.
void SetBeamformingVector(const ComplexVector &beamformingVector)
Sets the beamforming vector to be used.
ComplexVector m_beamformingVector
the beamforming vector in use
static TypeId GetTypeId()
Get the type ID.
Smart pointer class similar to boost::intrusive_ptr.
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.
std::ostream & operator<<(std::ostream &os, const Angles &a)
MatrixArray< std::complex< double > > ComplexMatrixArray
Create an alias for MatrixArray using complex type.