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

(-)a/src/wifi/model/dsss-error-rate-model.cc (-4 / +5 lines)
 Lines 26-32    Link Here 
26
26
27
NS_LOG_COMPONENT_DEFINE ("DsssErrorRateModel");
27
NS_LOG_COMPONENT_DEFINE ("DsssErrorRateModel");
28
28
29
#ifndef ENABLE_GSL
29
#ifndef HAVE_GSL
30
const double DsssErrorRateModel::WLAN_SIR_PERFECT = 10.0;
30
const double DsssErrorRateModel::WLAN_SIR_PERFECT = 10.0;
31
const double DsssErrorRateModel::WLAN_SIR_IMPOSSIBLE = 0.1;
31
const double DsssErrorRateModel::WLAN_SIR_IMPOSSIBLE = 0.1;
32
#endif
32
#endif
 Lines 61-67    Link Here 
61
DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr, uint32_t nbits)
61
DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr, uint32_t nbits)
62
{
62
{
63
  NS_LOG_FUNCTION_NOARGS ();
63
  NS_LOG_FUNCTION_NOARGS ();
64
#ifdef ENABLE_GSL
64
#ifdef HAVE_GSL
65
  //symbol error probability
65
  //symbol error probability
66
  double EbN0 = sinr * 22000000.0 / 1375000.0 / 4.0;
66
  double EbN0 = sinr * 22000000.0 / 1375000.0 / 4.0;
67
  double sep = SymbolErrorProb16Cck (4.0 * EbN0 / 2.0);
67
  double sep = SymbolErrorProb16Cck (4.0 * EbN0 / 2.0);
 Lines 95-101    Link Here 
95
DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (double sinr, uint32_t nbits)
95
DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (double sinr, uint32_t nbits)
96
{
96
{
97
  NS_LOG_FUNCTION_NOARGS ();
97
  NS_LOG_FUNCTION_NOARGS ();
98
#ifdef ENABLE_GSL
98
#ifdef HAVE_GSL
99
  NS_LOG_DEBUG ("GSL enabled ");
99
  //symbol error probability
100
  //symbol error probability
100
  double EbN0 = sinr * 22000000.0 / 1375000.0 / 8.0;
101
  double EbN0 = sinr * 22000000.0 / 1375000.0 / 8.0;
101
  double sep = SymbolErrorProb256Cck (8.0 * EbN0 / 2.0);
102
  double sep = SymbolErrorProb256Cck (8.0 * EbN0 / 2.0);
 Lines 127-133    Link Here 
127
#endif
128
#endif
128
}
129
}
129
130
130
#ifdef ENABLE_GSL
131
#ifdef HAVE_GSL
131
double
132
double
132
IntegralFunction (double x, void *params)
133
IntegralFunction (double x, void *params)
133
{
134
{
(-)a/src/wifi/model/dsss-error-rate-model.h (-3 / +3 lines)
 Lines 22-28    Link Here 
22
#define DSS_ERROR_RATE_MODEL_H
22
#define DSS_ERROR_RATE_MODEL_H
23
23
24
#include <stdint.h>
24
#include <stdint.h>
25
#ifdef ENABLE_GSL
25
#ifdef HAVE_GSL
26
#include <gsl/gsl_math.h>
26
#include <gsl/gsl_math.h>
27
#include <gsl/gsl_integration.h>
27
#include <gsl/gsl_integration.h>
28
#include <gsl/gsl_cdf.h>
28
#include <gsl/gsl_cdf.h>
 Lines 31-37    Link Here 
31
31
32
namespace ns3 {
32
namespace ns3 {
33
33
34
#ifdef ENABLE_GSL
34
#ifdef HAVE_GSL
35
typedef struct FunctionParameterType
35
typedef struct FunctionParameterType
36
{
36
{
37
  double beta;
37
  double beta;
 Lines 113-119    Link Here 
113
   * \return the chunk success rate of the differential encoded QPSK for
113
   * \return the chunk success rate of the differential encoded QPSK for
114
   */
114
   */
115
  static double GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits);
115
  static double GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits);
116
#ifdef ENABLE_GSL
116
#ifdef HAVE_GSL
117
  static double SymbolErrorProb16Cck (double e2); /// equation (18) in Pursley's paper
117
  static double SymbolErrorProb16Cck (double e2); /// equation (18) in Pursley's paper
118
  static double SymbolErrorProb256Cck (double e1); /// equation (17) in Pursley's paper
118
  static double SymbolErrorProb256Cck (double e1); /// equation (17) in Pursley's paper
119
#else
119
#else

Return to bug 2259