View | Details | Raw Unified | Return to bug 1758
Collapse All | Expand All

(-)./ns-allinone-3.18/ns-3.18/src/wifi/model/nist-error-rate-model.cc (-8 / +32 lines)
 Lines 15-21    Link Here 
15
 * along with this program; if not, write to the Free Software
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 *
17
 *
18
 * Author: Gary Pei <guangyu.pei@boeing.com>
18
 * Authors: Gary Pei <guangyu.pei@boeing.com>
19
 *          Sébastien Deronne <sebastien.deronne@umons.ac.be>
19
 */
20
 */
20
21
21
#include <cmath>
22
#include <cmath>
 Lines 154-159    Link Here 
154
          + 428005675.0 * std::pow (D, 14.0)
155
          + 428005675.0 * std::pow (D, 14.0)
155
        );
156
        );
156
    }
157
    }
158
  else if (bValue == 5)
159
    {
160
      //802.11n support by S. Deronne
161
      pe = 1.0 / (2.0 * bValue) *
162
        ( 92.0 * std::pow (D, 4.0)
163
          + 528.0 * std::pow (D, 5.0)
164
          + 8694.0 * std::pow (D, 6.0)
165
          + 79453.0 * std::pow (D, 7.0)
166
          + 792114.0 * std::pow (D, 8.0)
167
          + 7375573.0 * std::pow (D, 9.0)
168
          + 67884974.0 * std::pow (D, 10.0)
169
          + 610875423.0 * std::pow (D, 11.0)
170
          + 5427275376.0 * std::pow (D, 12.0)
171
          + 47664215639.0 * std::pow (D, 13.0)
172
        );
173
    }
157
  else
174
  else
158
    {
175
    {
159
      NS_ASSERT (false);
176
      NS_ASSERT (false);
 Lines 255-267    Link Here 
255
                                     2 // b value
272
                                     2 // b value
256
                                     );
273
                                     );
257
            }
274
            }
258
          else
275
          else if (mode.GetCodeRate () == WIFI_CODE_RATE_5_6) //802.11n support by S. Deronne
259
            {
276
                 {
260
              return GetFec64QamBer (snr,
277
                   return GetFec64QamBer (snr,
261
                                     nbits,
278
                                          nbits,
262
                                     3 // b value
279
                                          5 // b value
263
                                     );
280
                                          );
264
            }
281
                 }
282
               else
283
                 {
284
                   return GetFec64QamBer (snr,
285
                                          nbits,
286
                                          3 // b value
287
                                          );
288
                 }
265
        }
289
        }
266
    }
290
    }
267
  else if (mode.GetModulationClass () == WIFI_MOD_CLASS_DSSS)
291
  else if (mode.GetModulationClass () == WIFI_MOD_CLASS_DSSS)
(-)./ns-allinone-3.18/ns-3.18/src/wifi/model/yans-error-rate-model.cc (-2 / +16 lines)
 Lines 15-21    Link Here 
15
 * along with this program; if not, write to the Free Software
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 *
17
 *
18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
 *          Sébastien Deronne <sebastien.deronne@umons.ac.be>
19
 */
20
 */
20
21
21
#include <cmath>
22
#include <cmath>
 Lines 176-182    Link Here 
176
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const
177
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const
177
{
178
{
178
  if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM
179
  if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM
179
      || mode.GetModulationClass () == WIFI_MOD_CLASS_OFDM)
180
      || mode.GetModulationClass () == WIFI_MOD_CLASS_OFDM
181
      || mode.GetModulationClass () == WIFI_MOD_CLASS_HT) //802.11n support by S. Deronne
180
    {
182
    {
181
      if (mode.GetConstellationSize () == 2)
183
      if (mode.GetConstellationSize () == 2)
182
        {
184
        {
 Lines 269-274    Link Here 
269
                                   16  // adFreePlusOne
271
                                   16  // adFreePlusOne
270
                                   );
272
                                   );
271
            }
273
            }
274
          if (mode.GetCodeRate () == WIFI_CODE_RATE_5_6) //802.11n support by S. Deronne
275
            {
276
              return GetFecQamBer (snr,
277
                                   nbits,
278
                                   mode.GetBandwidth (), // signal spread
279
                                   mode.GetPhyRate (), // phy rate
280
                                   64, // m
281
                                   4,  // dFree
282
                                   14,  // adFree
283
                                   69  // adFreePlusOne
284
                                   );
285
            }
272
          else
286
          else
273
            {
287
            {
274
              return GetFecQamBer (snr,
288
              return GetFecQamBer (snr,

Return to bug 1758