aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-11-11 22:20:47 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-11-11 22:20:47 +0100
commitfe7413de47c83020bab5b5b603e446c139497174 (patch)
tree4cb10d4021b4df9b047e091425b6a2b100bf0152
parent5bf73ca209108e2ce8f3919d453050d957212779 (diff)
downloadodr-dpd-fe7413de47c83020bab5b5b603e446c139497174.tar.gz
odr-dpd-fe7413de47c83020bab5b5b603e446c139497174.tar.bz2
odr-dpd-fe7413de47c83020bab5b5b603e446c139497174.zip
Reverse X and Y on plot, add setters for pointcloud gain
-rw-r--r--pointcloud.cpp4
-rw-r--r--pointcloud.hpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/pointcloud.cpp b/pointcloud.cpp
index 7c92d16..d762366 100644
--- a/pointcloud.cpp
+++ b/pointcloud.cpp
@@ -88,8 +88,8 @@ void PointCloud::push_samples(std::pair<std::vector<complexf>, std::vector<compl
Point p;
// Magnitude is position
- p.x = std::abs(rx[i]) * m_rxgain;
- p.y = std::abs(tx[i]) * m_txgain;
+ p.x = std::abs(tx[i]) * m_txgain;
+ p.y = std::abs(rx[i]) * m_rxgain;
p.z = 0.0;
double arg_rx = std::arg(rx[i]);
diff --git a/pointcloud.hpp b/pointcloud.hpp
index b7df253..19febe5 100644
--- a/pointcloud.hpp
+++ b/pointcloud.hpp
@@ -54,6 +54,9 @@ class PointCloud
// one that constructed this instance.
void draw(void);
+ void set_tx_gain(double gain) { m_txgain = gain; }
+ void set_rx_gain(double gain) { m_rxgain = gain; }
+
private:
std::vector<Point> generate_border(void);