Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-1-software-lab-1
/
0509_team2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김현우
2019-05-12 21:35:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1200fd036a28d9083c4c5ee7132fad08ae121a50
1200fd03
1 parent
d37ad457
change sender
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
29 deletions
constellation/.vs/constellation/v15/.suo
constellation/.vs/constellation/v15/Browse.VC.db
constellation/.vs/constellation/v15/ipch/AutoPCH/3d2223615b794956/SENDER.ipch
constellation/constellation/constellation.vcxproj
constellation/constellation/constellation.vcxproj.filters
constellation/constellation/sender.cpp
constellation/.vs/constellation/v15/.suo
View file @
1200fd0
No preview for this file type
constellation/.vs/constellation/v15/Browse.VC.db
View file @
1200fd0
No preview for this file type
constellation/.vs/constellation/v15/ipch/AutoPCH/3d2223615b794956/SENDER.ipch
View file @
1200fd0
This file is too large to display.
constellation/constellation/constellation.vcxproj
View file @
1200fd0
...
...
@@ -112,7 +112,6 @@
<ItemGroup>
<ClCompile Include="constellation_main.cpp" />
<ClCompile Include="myMatrix.cpp" />
<ClCompile Include="receiver.cpp" />
<ClCompile Include="sender.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
...
...
constellation/constellation/constellation.vcxproj.filters
View file @
1200fd0
...
...
@@ -24,9 +24,6 @@
<ClCompile Include="sender.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="receiver.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="sender.h">
...
...
constellation/constellation/sender.cpp
View file @
1200fd0
...
...
@@ -6,67 +6,79 @@
using
namespace
std
;
Csender
::
Csender
()
{
srand
((
unsigned
int
)
time
(
NULL
));
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
data
[
i
]
=
rand
()
%
2
;
}
}
float
s
[
Nbits
/
Nbitspersymbol
*
Nsamplespersymbol
];
// trasmitted signal
void
Csender
::
transmitData
()
{
float
A
=
1
;
float
c0
[
20
];
float
c1
[
20
];
for
(
int
i
=
0
;
i
<
20
;
i
++
)
{
for
(
float
t
=
0
;
t
<
1
/
Nsamplespersymbol
;
t
+
0.05
)
float
c
;
srand
((
unsigned
int
)
time
(
NULL
));
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
c0
[(
int
)
t
]
=
sqrt
(
2
*
Nsamplespersymbol
)
*
cos
(
2
*
PI
*
Nsamplespersymbol
*
t
);
}
data
[
i
]
=
rand
()
%
2
;
}
for
(
int
i
=
0
;
i
<
20
;
i
++
)
cout
<<
"data: "
<<
endl
;
for
(
int
i
=
0
;
i
<
40
;
i
++
)
{
for
(
float
t
=
0
;
t
<
1
/
Nsamplespersymbol
;
t
+
0.05
)
for
(
int
j
=
0
;
j
<
25
;
j
++
)
{
c
1
[(
int
)
t
]
=
sqrt
(
2
*
Nsamplespersymbol
)
*
sin
(
2
*
PI
*
Nsamplespersymbol
*
t
)
;
c
out
<<
data
[
i
*
25
+
j
]
<<
" "
;
}
cout
<<
endl
;
}
float
A
=
10
;
for
(
int
i
=
0
;
i
<
1000
;
i
+
2
)
for
(
float
t
=
0
;
t
<
(
1.
/
Nsamplespersymbol
);
t
=
t
+
1
/
400.
)
{
if
(
data
[
i
]
==
'0'
&&
data
[
i
+
1
]
==
'0'
)
c
=
400.
*
t
;
c0
[(
int
)
c
]
=
sqrt
(
2
*
Nsamplespersymbol
)
*
cos
(
2
*
PI
*
Nsamplespersymbol
*
t
);
c1
[(
int
)
c
]
=
sqrt
(
2
*
Nsamplespersymbol
)
*
sin
(
2
*
PI
*
Nsamplespersymbol
*
t
);
}
c0
[
12
]
=
-
4.41708
;
c1
[
12
]
=
-
4.41708
;
for
(
int
i
=
0
;
i
<
1000
;
i
=
i
+
2
)
{
if
(
data
[
i
]
==
0
&&
data
[
i
+
1
]
==
0
)
{
for
(
int
k
=
0
;
k
<
20
;
k
++
)
{
s
[
20
*
i
+
k
]
=
A
*
c0
[
k
]
+
A
*
c1
[
k
];
s
[(
i
*
10
)
+
k
]
=
A
*
c0
[
k
]
+
A
*
c1
[
k
];
}
}
else
if
(
data
[
i
]
==
'0'
&&
data
[
i
+
1
]
==
'1'
)
else
if
(
data
[
i
]
==
0
&&
data
[
i
+
1
]
==
1
)
{
for
(
int
k
=
0
;
k
<
20
;
k
++
)
{
s
[
20
*
i
+
k
]
=
A
*
c0
[
k
]
-
A
*
c1
[
k
];
s
[(
i
*
10
)
+
k
]
=
A
*
c0
[
k
]
+
(
-
A
)
*
c1
[
k
];
}
}
else
if
(
data
[
i
]
==
'1'
&&
data
[
i
+
1
]
==
'0'
)
else
if
(
data
[
i
]
==
1
&&
data
[
i
+
1
]
==
0
)
{
for
(
int
k
=
0
;
k
<
20
;
k
++
)
{
s
[
20
*
i
+
k
]
=
-
1
*
A
*
c0
[
k
]
+
A
*
c1
[
k
];
s
[(
i
*
10
)
+
k
]
=
(
-
A
)
*
c0
[
k
]
+
A
*
c1
[
k
];
}
}
else
if
(
data
[
i
]
==
'1'
&&
data
[
i
+
1
]
==
'1'
)
else
if
(
data
[
i
]
==
1
&&
data
[
i
+
1
]
==
1
)
{
for
(
int
k
=
0
;
k
<
20
;
k
++
)
{
s
[
20
*
i
+
k
]
=
-
1
*
A
*
c0
[
k
]
+
-
1
*
A
*
c1
[
k
];
s
[(
i
*
10
)
+
k
]
=
(
-
A
)
*
c0
[
k
]
+
(
-
A
)
*
c1
[
k
];
}
}
}
};
\ No newline at end of file
...
...
Please
register
or
login
to post a comment