Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

really wanna help from anyone

kerikeri Member Posts: 1
[color=Black]hye everyone..
i really2 need help...
i have a source code that my lecturer give..
but the prob is i dont what the source code and dont know hot to make it..

can anyone help me?plzzzz..


here,the source code..



can anyone solve for me?
how to build again this source code??
plzzz..

[/color]

















VISUAL C++ SOURCE CODES




CWCDMA Radio Link Budget .CPP File:
// RLBDlg.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "RLBDlg.h"
#include "CellRange.h"
#include "EBN0.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
CAboutDlg();

// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA

// ClassWizard generated virtual function overrides





//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Imp lementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRLBDlg dialog

CRLBDlg::CRLBDlg(CWnd* pParent /*=NULL*/)
: CDialog(CRLBDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CRLBDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CRLBDlg::DoDataExchange(CDataExchange* pDX)





{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRLBDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CRLBDlg, CDialog)
//{{AFX_MSG_MAP(CRLBDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_CELLRANGE, OnCellrange)
ON_BN_CLICKED(IDC_EBNO, OnEbno)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRLBDlg message handlers

BOOL CRLBDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Add "About..." menu item to system menu.

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF00 0);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX,
strAboutMenu);
}
}

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog



SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here

return TRUE; // return TRUE unless you set the focus to a control
}

void CRLBDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}

// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the documen t/view model,
// this is automatically done for you by the framework.

void CRLBDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else






{
CDialog::OnPaint();
}
}

// The system calls this to obtain the cursor to display while the user drag s
// the minimized window.
HCURSOR CRLBDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}

void CRLBDlg::OnCellrange()
{
// TODO: Add your control notification handler cod e here
CCellRange pCellRange;

pCellRange.DoModal();
}

void CRLBDlg::OnEbno()
{
// TODO: Add your control notification handler cod e here
CEBN0 pEBN0;

pEBN0.DoModal();
}




Calculation of Cell Range .CPP File:
// CellRange.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "CellRange.h"
#include "CVoice.h"
#include "CCS.h"
#include "CPS.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE





static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCellRange dialog


CCellRange::CCellRange(CWnd* pParent /* =NULL*/)
: CDialog(CCellRange::IDD, pParent)
{
//{{AFX_DATA_INIT(CCellRange)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}


void CCellRange::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCellRange)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCellRange, CDialog)
//{{AFX_MSG_MAP(CCellRange)
ON_BN_CLICKED(IDC_VOICE, OnCVoice)
ON_BN_CLICKED(IDC_CS, OnCCS)
ON_BN_CLICKED(IDC_PS, OnCPS)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCellRange message handlers

void CCellRange::OnCVoice()
{
// TODO: Add your control notification handler cod e here
CCVoice pCVoice;

pCVoice.DoModal();
}

void CCellRange::OnCCS()





{
// TODO: Add your control notification handler cod e here
CCCS pCCCS;

pCCCS.DoModal();
}

void CCellRange::OnCPS()
{
// TODO: Add your control notification handler cod e here
CCPS pCCPS;

pCCPS.DoModal();
}




Calculation of Eb/N0 .CPP File:
// EBN0 .cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "EBN0.h"
#include "EVOICE.h"
#include "ECS.h"
#include "EPS.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEBN0 dialog


CEBN0::CEBN0(CWnd* pParent /*=NULL*/)
: CDialog(CEBN0::IDD, pParent)
{
//{{AFX_DATA_INIT(CEBN0)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT






}
void CEBN0::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEBN0)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CEBN0, CDialog)
//{{AFX_MSG_MAP(CEBN0)
ON_BN_CLICKED(IDC_VOICE2, OnEVOICE)
ON_BN_CLICKED(IDC_CS2, OnECS)
ON_BN_CLICKED(IDC_PS2, OnEPS)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEBN0 message handlers

void CEBN0::OnEVOICE()
{
// TODO: Add your control notification handler cod e here
CEVOICE pEVOICE;

pEVOICE.DoModal();
}

void CEBN0::OnECS()
{
// TODO: Add your control notification handler cod e here
CECS pECS;

pECS.DoModal();
}

void CEBN0::OnEPS()
{
// TODO: Add your control notification handler cod e here
CEPS pEPS;

pEPS.DoModal();
}






Calculation of Cell Range for Voice Serv ice .CPP File:
// CVoice.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "CVoice.h"
#include "CRVOICE.h"
#include "math.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCVoice dialog


CCVoice::CCVoice(CWnd* pParent /*=NULL*/)
: CDialog(CCVoice::IDD, pParent)
{
//{{AFX_DATA_INIT(CCVoice)
m_AEBN01 = 5.0;
m_AGR1 = 18.0;
m_AGT1 = 0.0;
m_APT1 = 21.0;
//}}AFX_DATA_INIT
}


void CCVoice::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCVoice)
DDX_Text(pDX, IDC_AEBN01, m_AEBN01);
DDX_Text(pDX, IDC_AGR1, m_AGR1);
DDX_Text(pDX, IDC_AGT1, m_AGT1);
DDX_Text(pDX, IDC_APT1, m_APT1);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCVoice, CDialog)





//{{AFX_MSG_MAP(CCVoice)
ON_BN_CLICKED(IDOK, OnGOTOCRVOICE)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCVoice message handlers

void CCVoice::OnGOTOCRVOICE()
{
// TODO: Add your control notification handler cod e here

double c,d;
c=3 .0; //c:Body/orientation loss in dB
d=m_APT1+m_AGT1-c; //d:Equivalent isotropic radiated power in dBm

double e,f,g,h,i,j,k,l,m,n;


e=-174.0; //e:Thermal noise density in dBm/Hz
f=5.0; //f:Base station receiver noise figure in dB
g=e+f; //g:Receiver noise density in dBm/Hz
h=g+(10*log10(3840000)); //h:Receiver noise power in dBm
i=3.0; //i:Interference margin [50% loading] in dB
j=10*log10((pow(10,((h+i)/10)))-(pow(10,(h/10)))); //j:Receiver interference power in dBm
k=10*log10((pow(10,(h/10)))+(pow(10,(j/10)))); //k:Total effective noise and
interference in dBm
l=10*log10(3840/12.2); //l:Processing gain in dB
n=m_AEBN01-l+k; //n:Receiver sensitivity in dBm

double p,q,r;
p=2.0; //p:Base station cable/connection loss in dB
q=0.0; //q:Fast fading margin in dB
r=d-n+m_AGR1-p-q; //r:Maximum path loss in dB

double s,t,u,v;
s=10.5; //s:Log-normal fading margin in dB
t=3.0; //t:Soft handover gain in dB
u=10.0; //u:Penetration loss in car in dB
v=r-s+t-u; //v:Allowable path loss for cell range in dB

double w,x,y;
w=34.4; //w:Slope A
x=125.5; //x:Intercept B
y=pow(10,((v-x)/w)); //y:Cell range in km





CCRVOICE pCRVOICE;
pCRVOICE.m_CRVOICE=y;

pCRVOICE.DoModal();
}




Result of Cell Range for Vo ice Service .CPP File:
// CRVOICE.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "CRVOICE.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCRVOICE dialog


CCRVOICE::CCRVOICE(CWnd* pParent /*=NULL* /)
: CDialog(CCRVOICE::IDD, pParent)
{
//{{AFX_DATA_INIT(CCRVOICE)
m_CRVOICE = 0.0;
//}}AFX_DATA_INIT
}


void CCRVOICE::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCRVOICE)
DDX_Text(pDX, IDC_CRVOICE, m_CRVOICE);
//}}AFX_DATA_MAP
}






BEGIN_MESSAGE_MAP(CCRVOICE, CDialog)
//{{AFX_MSG_MAP(CCRVOICE)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCRVOICE message handlers




Calculation of Cell Range for Circuit-Switched Service .CPP File:
// CCS.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "CCS.h"
#include "CRCS.h"
#include "math.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCCS dialog


CCCS::CCCS(CWnd* pParent /*=NULL*/)
: CDialog(CCCS::IDD, pParent)
{
//{{AFX_DATA_INIT(CCCS)
m_AEBN02 = 1.5;
m_AGR2 = 18.0;
m_AGT2 = 2.0;
m_APT2 = 24.0;
//}}AFX_DATA_INIT
}


void CCCS::DoDataExch ange(CDataExchange* pDX)





{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCCS)
DDX_Text(pDX, IDC_AEBN02, m_AEBN02);
DDX_Text(pDX, IDC_AGR2, m_AGR2);
DDX_Text(pDX, IDC_AGT2, m_AGT2);
DDX_Text(pDX, IDC_APT2, m_APT2);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCCS, CDialog)
//{{AFX_MSG_MAP(CCCS)
ON_BN_CLICKED(IDOK, OnGOTOCRCS)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCCS message handlers

void CCCS::OnGOTOCRCS()
{
// TODO: Add your control notification handler cod e here

double c,d;
c=0 .0; //c:Body/orientation loss in dB
d=m_APT2+m_AGT2-c; //d:Equivalent isotropic radiated power in dBm

double e,f,g,h,i,j,k,l,n;


e=-174.0; //e:Thermal noise density in dBm/Hz
f=5.0; //f:Base station receiver noise figure in dB
g=e+f; //g:Receiver noise density in dBm/Hz
h=g+(10*log10(3840000)); //h:Receiver noise power in dBm
i=3.0; //i:Interference margin [50% loading] in dB
j=10*log10((pow(10,((h+i)/10)))-(pow(10,(h/10)))); //j:Receiver interference power in dBm
k=10*log10((pow(10,(h/10)))+(pow(10,(j/10)))); //k:Total effective noise and
interference in dBm
l=10*log10(3840/144); //l:Processing gain in dB
n=m_AEBN02-l+k; //n:Receiver sensitivity in dBm

double p,q,r;
p=2.0; //p:Base station cable/connection loss in dB
q=4.0; //q:Fast fading margin in dB





r=d-n+m_AGR2-p-q; //r:Maximum path loss in dB

double s,t,u,v;
s=10.5; //s:Log-normal fading margin in dB
t=2.0; //t:Soft handover gain in dB
u=16.0; //u:Penetration loss in car in dB
v=r-s+t-u; //v:Allowable path loss for cell range in dB

double w,x,y;
w=34.4; //w:Slope A
x=122.3; //x:Intercept B
y=pow(10,((v-x)/w)); //y:Cell range in km

CCRCS pCRCS;
pCRCS.m_CRCS=y;

pCRCS.DoModal();
}




Result of Cell Range for Circuit-Switched Service .CPP File:
// CRCS.cpp : implementatio n file
//

#include "stdafx.h"
#include "RLB.h"
#include "CRCS.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCRCS dialog


CCRCS::CCRCS(CWnd* pParent /*=NULL*/)
: CDialog(CCRCS::IDD, pParent)
{
//{{AFX_DATA_INIT(CCRCS)
m_CRCS = 0.0;





//}}AFX_DATA_INIT
}


void CCRCS::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCRCS)
DDX_Text(pDX, IDC_CRCS, m_CRCS);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCRCS, CDialog)
//{{AFX_MSG_MAP(CCRCS)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCRCS message handlers




Calculation of Cell Range for Packet-Switched Service .CPP File:
// CPS.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "CPS.h"
#include "CRPS.h"
#include "math.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCPS dialog






CCPS::CCPS(CWnd* pParent /*=NULL*/)
: CDialog(CCPS::IDD, pParent)
{
//{{AFX_DATA_INIT(CCPS)
m_AEBN03 = 1.0;
m_AGR3 = 18.0;
m_AGT3 = 2.0;
m_APT3 = 24.0;
//}}AFX_DATA_INIT
}


void CCPS::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCPS)
DDX_Text(pDX, IDC_AEBN03, m_AEBN03);
DDX_Text(pDX, IDC_AGR3, m_AGR3);
DDX_Text(pDX, IDC_AGT3, m_AGT3);
DDX_Text(pDX, IDC_APT3, m_APT3);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCPS, CDialog)
//{{AFX_MSG_MAP(CCPS)
ON_BN_CLICKED(IDOK, OnGOTOCRPS)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCPS message handlers

void CCPS::OnGOTOCRPS()
{
// TODO: Add your control notification handler cod e here

double c,d;
c=0 .0; //c:Body/orientation loss in dB
d=m_APT3+m_AGT3-c; //d:Equivalent isotropic radiated power in dBm

double e,f,g,h,i,j,k,l,n;
e=-174.0; //e:Thermal noise density in dBm/Hz
f=5.0; //f:Base station receiver noise figure in dB
g=e+f; //g:Receiver noise density in dBm/Hz




h=g+(10*log10(3840000)); //h:Receiver noise power in dBm
i=3.0; //i:Interference margin [50% loading] in dB
j=10*log10((pow(10,((h+i)/10)))-(pow(10,(h/10)))); //j:Receiver interference power in dBm
k=10*log10((pow(10,(h/10)))+(pow(10,(j/10)))); //k:Total effective noise and
interference in dBm
l=10*log10(3840/384); //l:Processing gain in dB
n=m_AEBN03-l+k; //n:Receiver sensitivity in dBm

double p,q,r;
p=2.0; //p:Base station cable/connection loss in dB
q=4.0; //q:Fast fading margin in dB
r=d-n+m_AGR3-p-q; //r:Maximum path loss in dB

double s,t,u,v;
s=10.5; //s:Log-normal fading margin in dB
t=0.0; //t:Soft handover gain in dB
u=0.0; //u:Penetration loss in car in dB
v=r-s+t-u; //v:Allowable path loss for cell range in dB

double w,x,y;
w=34.4; //w:Slope A
x=127.5; //x:Intercept B
y=pow(10,((v-x)/w)); //y:Cell range in km

CCRPS pCRPS;
pCRPS.m_CRPS=y;

pCRPS.DoModal();
}




Result of Cell Range for Packet-Switched Service .CPP File:
// CRPS.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "CRPS.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;





#endif

/////////////////////////////////////////////////////////////////////////////
// CCRPS dialog


CCRPS::CCRPS(CWnd* pParent /*=NULL*/)
: CDialog(CCRPS::IDD, pParent)
{
//{{AFX_DATA_INIT(CCRPS)
m_CRPS = 0.0;
//}}AFX_DATA_INIT
}


void CCRPS::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCRPS)
DDX_Text(pDX, IDC_CRPS, m_CRPS);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCRPS, CDialog)
//{{AFX_MSG_MAP(CCRPS)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCRPS message handlers




Calculation of Eb/N0 for Voice Service .CPP File:
// EVOICE.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "EVOICE.h"
#include "ERVOICE.h"
#include "math.h"






#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEVOICE dialog


CEVOICE::CEVOICE(CWnd* pParent /*=NULL*/)
: CDialog(CEVOICE::IDD, pParent)
{
//{{AFX_DATA_INIT(CEVOICE)
m_AGR4 = 18.0;
m_AGT4 = 0.0;
m_APT4 = 21.0;
m_ACELLRANGE4 = 2.0;
//}}AFX_DATA_INIT
}


void CEVOICE::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEVOICE)
DDX_Text(pDX, IDC_AGR4, m_AGR4);
DDX_Text(pDX, IDC_AGT4, m_AGT4);
DDX_Text(pDX, IDC_APT4, m_APT4);
DDX_Text(pDX, IDC_ACELLRANGE4, m_ACELLRANGE4);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CEVOICE, CDialog)
//{{AFX_MSG_MAP(CEVOICE)
ON_BN_CLICKED(IDOK, OnGOTOERVOICE)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEVOICE message handlers

void CEVOICE::OnGOTOERVOICE()





{
// TODO: Add your control notification handler cod e here

double w,x,y;
w=34.4; //w:Slope A
x=125.5; //x:Intercept B
y=m_ACELLRANGE4; //y:Cell range in km

double s,t,u,v;
s=10.5; //s:Log-normal fading margin in dB
t=3.0; //t:Soft handover gain in dB
u=10.0; //u:Penetration loss in car in dB
v=(w*log10(y))+x; //v:Allo wable path loss for cell range in dB

double p,q,r;
p=2.0; //p:Base station cable/connection loss in dB
q=0.0; //q:Fast fading margin in dB
r=v+s-t+u; //r:Maximum path loss in dB

double c,d;
c=3 .0; //c:Body/orientation loss in dB
d=m_APT4+m_AGT4-c; //d:Equivalent isotropic radiated power in dBm

double e,f,g,h,i,j,k,l,n,z;


e=-174.0; //e:Thermal noise density in dBm/Hz
f=5.0; //f:Base station receiver noise figure in dB
g=e+f; //g:Receiver noise density in dBm/Hz
h=g+(10*log10(3840000)); //h:Receiver noise power in dBm
i=3.0; //i:Interference margin [50% loading] in dB
j=10*log10((pow(10,((h+i)/10)))-(pow(10,(h/10)))); //j:Receiver interference power in dBm
k=10*log10((pow(10,(h/10)))+(pow(10,(j/10)))); //k:Total effective noise and
interference in dBm
l=10*log10(3840/12.2); //l:Processing gain in dB
n=d+m_AGR4-p-q-r; //n:Receiver sensitivity in dBm
z=n +l-k; //z:Eb/No ratio in dB

CERVOICE pERVOICE;
pERVOICE.m_ERVOICE=z;

pERVOICE.DoModal();

}






Result of Eb/N0 for Voice Service .CPP File:
// ERVOICE.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "ERVOICE.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CERVOICE dialog


CERVOICE::CERVOICE(CWnd* pParent /*=NULL* /)
: CDialog(CERVOICE::IDD, pParent)
{
//{{AFX_DATA_INIT(CERVOICE)
m_ERVOICE = 0.0;
//}}AFX_DATA_INIT
}


void CERVOICE::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CERVOICE)
DDX_Text(pDX, IDC_ERVOICE, m_ERVOICE);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CERVOICE, CDialog)
//{{AFX_MSG_MAP(CERVOICE)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CERVOICE message handlers






Calculation of Eb/N0 for Circuit-Switched Service .CPP File:
// ECS.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "ECS.h"
#include "ERCS.h"
#include "math.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CECS dialog


CECS::CECS(CWnd* pParent /*=NULL*/)
: CDialog(CECS::IDD, pParent)
{
//{{AFX_DATA_INIT(CECS)
m_AGR5 = 18.0;
m_AGT5 = 2.0;
m_APT5 = 24.0;
m_ACELLRANGE5 = 1.2;
//}}AFX_DATA_INIT
}


void CECS::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CECS)
DDX_Text(pDX, IDC_AGR5, m_AGR5);
DDX_Text(pDX, IDC_AGT5, m_AGT5);
DDX_Text(pDX, IDC_APT5, m_APT5);
DDX_Text(pDX, IDC_ACELLRANGE5, m_ACELLRANGE5);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CECS, CDialog)





//{{AFX_MSG_MAP(CECS)
ON_BN_CLICKED(IDOK, OnGOTOERCS)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CECS message handlers

void CECS::OnGOTOERCS()
{
// TODO: Add your control notification handler cod e here

double w,x,y;
w=34.4; //w:Slope A
x=122.3; //x:Intercept B
y=m_ACELLRANGE5; //y:Cell range in km

double s,t,u,v;
s=10.5; //s:Log-normal fading margin in dB
t=2.0; //t:Soft handover gain in dB
u=16.0; //u:Penetration loss in car in dB
v=(w*log10(y))+x; //v:Allo wable path loss for cell range in dB

double p,q,r;
p=2.0; //p:Base station cable/connection loss in dB
q=4.0; //q:Fast fading margin in dB
r=v+s-t+u; //r:Maximum path loss in dB

double c,d;
c=0 .0; //c:Body/orientation loss in dB
d=m_APT5+m_AGT5-c; //d:Equivalent isotropic radiated power in dBm

double e,f,g,h,i,j,k,l,n,z;
e=-174.0; //e:Thermal noise density in dBm/Hz
f=5.0; //f:Base station receiver noise figure in dB
g=e+f; //g:Receiver noise density in dBm/Hz
h=g+(10*log10(3840000)); //h:Receiver noise power in dBm
i=3.0; //i:Interference margin [50% loading] in dB
j=10*log10((pow(10,((h+i)/10)))-(pow(10,(h/10)))); //j:Receiver interference power in dBm
k=10*log10((pow(10,(h/10)))+(pow(10,(j/10)))); //k:Total effective noise and
interference in dBm
l=10*log10(3840/144); //l:Processing gain in dB
n=d+m_AGR5-p-q-r; //n:Receiver sensitivity in dBm
z=n +l-k; //z:Eb/No ratio in dB






CERCS pERCS;
pERCS.m_ERCS=z;

pERCS.DoModal();

}




Result of Eb/N0 for Circuit-Switched Service .CPP File:
// ERCS.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "ERCS.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CERCS dialog


CERCS::CERCS(CWnd* pParent /*=NULL* /)
: CDialog(CERCS::IDD, pParent)
{
//{{AFX_DATA_INIT(CERCS)
m_ERCS = 0.0;
//}}AFX_DATA_INIT
}


void CERCS::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CERCS)
DDX_Text(pDX, IDC_ERCS, m_ERCS);
//}}AFX_DATA_MAP
}






BEGIN_MESSAGE_MAP(CERCS, CDialog)
//{{AFX_MSG_MAP(CERCS)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CERCS message handlers




Calculation of Eb/N0 for Packet-Switched Service .CPP File:
// EPS.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "EPS.h"
#include "ERPS.h"
#include "math.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEPS dialog


CEPS::CEPS(CWnd* pParent /*=NULL*/)
: CDialog(CEPS::IDD, pParent)
{
//{{AFX_DATA_INIT(CEPS)
m_AGR6 = 18.0;
m_AGT6 = 2.0;
m_APT6 = 24.0;
m_ACELLRANGE6 = 1.8;
//}}AFX_DATA_INIT
}


void CEPS::DoDataExchange(CDataExchange* pDX)






{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEPS)
DDX_Text(pDX, IDC_AGR6, m_AGR6);
DDX_Text(pDX, IDC_AGT6, m_AGT6);
DDX_Text(pDX, IDC_APT6, m_APT6);
DDX_Text(pDX, IDC_ACELLRANGE6, m_ACELLRANGE6);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CEPS, CDialog)
//{{AFX_MSG_MAP(CEPS)
ON_BN_CLICKED(IDOK, OnGOTOERPS)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEPS message handlers

void CEPS::OnGOTOERPS()
{
// TODO: Add your control notification handler cod e here

double w,x,y;
w=34.4; //w:Slope A
x=127.5; //x:Intercept B
y=m_ACELLRANGE6; //y:Cell range in km

double s,t,u,v;
s=10.5; //s:Log-normal fading margin in dB
t=0.0; //t:Soft handover gain in dB
u=0.0; //u:Penetration loss in car in dB
v=(w*log10(y))+x; //v:Allowable path loss for cell rang e in dB

double p,q,r;
p=2.0; //p:Base station cable/connection loss in dB
q=4.0; //q:Fast fading margin in dB
r=v+s-t+u; //r:Maximum path loss in dB

double c,d;
c=0 .0; //c:Body/orientation loss in dB
d=m_APT6+m_AGT6-c; //d:Equivalent isotropic radiated power in dBm







double e,f,g,h,i,j,k,l,n,z;
e=-174.0; //e:Thermal noise density in dBm/Hz
f=5.0; //f:Base station receiver noise figure in dB
g=e+f; //g:Receiver noise density in dBm/Hz
h=g+(10*log10(3840000)); //h:Receiver noise power in dBm
i=3.0; //i:Interference margin [50% loading] in dB
j=10*log10((pow(10,((h+i)/10)))-(pow(10,(h/10)))); //j:Receiver interference power in dBm
k=10*log10((pow(10,(h/10)))+(pow(10,(j/10)))); //k:Total effective noise and
interference in dBm
l=10*log10(3840/384); //l:Processing gain in dB
n=d+m_AGR6-p-q-r; //n:Receiver sensitivity in dBm
z=n +l-k; //z:Eb/No ratio in dB

CERPS pERPS;
pERPS.m_ERPS=z;

pERPS.DoModal();

}




Result of Eb/N0 for Packet-Switched Service .CPP File:
// ERPS.cpp : implementation file
//

#include "stdafx.h"
#include "RLB.h"
#include "ERPS.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CERPS dialog


CERPS::CERPS(CWnd * pParent /*=NULL*/)
: CDialog(CERPS::IDD, pParent)
{
//{{AFX_DATA_INIT(CERPS)





m_ERPS = 0.0;
//}}AFX_DATA_INIT
}


void CERPS::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CERPS)
DDX_Text(pDX, IDC_ERPS, m_ERPS);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CERPS, CDialog)
//{{AFX_MSG_MAP(CERPS)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CERPS message handlers

Sign In or Register to comment.