antenna, spectrum: Enable superposed nodes in 3GPP assuming minimum separation

This commit is contained in:
Gabriel Ferreira
2024-05-08 15:33:22 +02:00
parent 132a6ced06
commit 10f882eeba
2 changed files with 3 additions and 6 deletions

View File

@@ -210,8 +210,9 @@ Angles::Angles(Vector v)
// azimuth and inclination angles for zero-length vectors are not defined
if (v.x == 0.0 && v.y == 0.0 && v.z == 0.0)
{
m_azimuth = NAN;
m_inclination = NAN;
// assume x and length equals to 1 mm to avoid nans
m_azimuth = std::atan2(v.y, 0.001);
m_inclination = std::acos(v.z / 0.001);
}
NormalizeAngles();

View File

@@ -511,10 +511,6 @@ ThreeGppSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity(
NS_LOG_FUNCTION(this << spectrumSignalParams << a << b << aPhasedArrayModel
<< bPhasedArrayModel);
if (a->GetPosition() == b->GetPosition())
{
return spectrumSignalParams->Copy();
}
uint32_t aId = a->GetObject<Node>()->GetId(); // id of the node a
uint32_t bId = b->GetObject<Node>()->GetId(); // id of the node b
NS_ASSERT_MSG(aPhasedArrayModel, "Antenna not found for node " << aId);