[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: updated the decison maker of 16QAM
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: updated the decison maker of 16QAM |
Date: |
Wed, 21 Jan 2015 22:49:15 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 0832b5bd7cfe583bda929d950955d7c918c48cf0
Author: fengzhe29888 <address@hidden>
Date: Wed Jan 21 17:33:56 2015 -0500
updated the decison maker of 16QAM
---
gr-digital/lib/constellation.cc | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/gr-digital/lib/constellation.cc b/gr-digital/lib/constellation.cc
index f8ea72d..9bb7475 100644
--- a/gr-digital/lib/constellation.cc
+++ b/gr-digital/lib/constellation.cc
@@ -947,37 +947,37 @@ namespace gr {
float re = sample->real();
float im = sample->imag();
- if(im < 0 && im > -2*level && re > 0 && re < 2*level)
+ if(im <= 0 && im >= -2*level && re >= 0 && re <= 2*level)
ret = 0;
- if(im < 0 && im > -2*level && re < 0 && re > -2*level)
+ else if(im <= 0 && im >= -2*level && re <= 0 && re >= -2*level)
ret = 1;
- if(im < -2*level && re > 2*level)
+ else if(im <= -2*level && re >= 2*level)
ret = 2;
- if(im < -2*level && re < -2*level)
+ else if(im <= -2*level && re <= -2*level)
ret = 3;
- if(im < 0 && im > -2*level && re < -2*level)
+ else if(im <= 0 && im >= -2*level && re <= -2*level)
ret = 4;
- if(im < 0 && im > -2*level && re > 2*level)
+ else if(im <= 0 && im >= -2*level && re >= 2*level)
ret = 5;
- if(im < -2*level && re < 0 && re > -2*level)
+ else if(im <= -2*level && re <= 0 && re >= -2*level)
ret = 6;
- if(im < -2*level && re > 0 && re < 2*level)
+ else if(im <= -2*level && re >= 0 && re <= 2*level)
ret = 7;
- if(im > 2*level && re < -2*level)
+ else if(im >= 2*level && re <= -2*level)
ret = 8;
- if(im > 2*level && re > 2*level)
+ else if(im >= 2*level && re >= 2*level)
ret = 9;
- if(im > 0 && im < 2*level && re < 0 && re < -2*level)
+ else if(im >= 0 && im <= 2*level && re <= 0 && re <= -2*level)
ret = 10;
- if(im > 0 && im < 2*level && re > 0 && re < 2*level)
+ else if(im >= 0 && im <= 2*level && re >= 0 && re <= 2*level)
ret = 11;
- if(im > 2*level && re > 0 && re < 2*level)
+ else if(im >= 2*level && re >= 0 && re <= 2*level)
ret = 12;
- if(im > 2*level && re < 0 && re > -2*level)
+ else if(im >= 2*level && re <= 0 && re >= -2*level)
ret = 13;
- if(im > 0 && im < 2*level && re > 2*level)
+ else if(im >= 0 && im <= 2*level && re >= 2*level)
ret = 14;
- if(im > 0 && im < 2*level && re < -2*level)
+ else if(im >= 0 && im <= 2*level && re <= -2*level)
ret = 15;
return ret;