Skip to content

Commit

Permalink
uan: (fixes #1115) Fixed PER calculation of M-QAM (fix reported by do…
Browse files Browse the repository at this point in the history
…nghuiyong)
  • Loading branch information
MetalKnight authored and tomhenderson committed Sep 26, 2024
1 parent b5d00ca commit 67f958d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uan/model/uan-phy-gen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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))));
Expand Down

0 comments on commit 67f958d

Please sign in to comment.