uan: (fixes #1115) Fixed PER calculation of M-QAM (fix reported by donghuiyong)

This commit is contained in:
Federico Guerra
2024-09-12 18:41:20 +02:00
committed by Tom Henderson
parent b5d00ca5bc
commit 67f958d52f

View File

@@ -334,7 +334,7 @@ UanPhyPerCommonModes::CalcPer(Ptr<Packet> pkt, double sinrDb, UanTxMode mode)
// Eq (74)
for (int j = 0; j < sum_items; ++j)
{
PbK += ::std::pow(-1.0, (double)j * pow2k / sqrtM) *
PbK += ::std::pow(-1.0, ::std::floor((double)j * pow2k / sqrtM)) *
(pow2k - ::std::floor((double)(j * pow2k / sqrtM) + 0.5)) *
erfc((2.0 * (double)j + 1.0) *
::std::sqrt(3.0 * (log2M * EbNo) / (2.0 * (M - 1.0))));