From 2340df18f88132f2e8603ed2138e27429b7d2007 Mon Sep 17 00:00:00 2001 From: Davide Magrin Date: Fri, 5 Mar 2021 15:12:27 +0100 Subject: [PATCH] Fix aloha collision matrix --- model/lora-interference-helper.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/model/lora-interference-helper.cc b/model/lora-interference-helper.cc index e67485ae07..ce43e49262 100644 --- a/model/lora-interference-helper.cc +++ b/model/lora-interference-helper.cc @@ -115,15 +115,14 @@ operator<< (std::ostream &os, const LoraInterferenceHelper::Event &event) // This collision matrix can be used for comparisons with the performance of Aloha // systems, where collisions imply the loss of both packets. double inf = std::numeric_limits::max (); -double minf = std::numeric_limits::min (); - std::vector> LoraInterferenceHelper::collisionSnirAloha= { +std::vector> LoraInterferenceHelper::collisionSnirAloha= { // 7 8 9 10 11 12 - {inf, minf, minf, minf, minf, minf}, // SF7 - {minf, inf, minf, minf, minf, minf}, // SF8 - {minf, minf, inf, minf, minf, minf}, // SF9 - {minf, minf, minf, inf, minf, minf}, // SF10 - {minf, minf, minf, minf, inf, minf}, // SF11 - {minf, minf, minf, minf, minf, inf} // SF12 + {inf, -inf, -inf, -inf, -inf, -inf}, // SF7 + {-inf, inf, -inf, -inf, -inf, -inf}, // SF8 + {-inf, -inf, inf, -inf, -inf, -inf}, // SF9 + {-inf, -inf, -inf, inf, -inf, -inf}, // SF10 + {-inf, -inf, -inf, -inf, inf, -inf}, // SF11 + {-inf, -inf, -inf, -inf, -inf, inf} // SF12 }; // LoRa Collision Matrix (Goursaud)