worked on signal-strength-estimation

add this information to grid nodes
evaluate this information
new test-cases
This commit is contained in:
2016-07-15 15:29:07 +02:00
parent 34e52cd7f0
commit 99ee95ce7b
21 changed files with 568 additions and 26 deletions

View File

@@ -159,12 +159,12 @@ public:
template <typename T> bool isDoor( T& nSrc, std::vector<T*> neighbors ) {
MiniMat2 m;
Point3 center = nSrc;
Point3 center = nSrc.inCentimeter();
// calculate the centroid of the nSrc's nearest-neighbors
Point3 centroid(0,0,0);
for (const T* n : neighbors) {
centroid = centroid + (Point3)*n;
centroid = centroid + n->inCentimeter();
}
centroid /= neighbors.size();
@@ -174,7 +174,7 @@ public:
// build covariance of the nearest-neighbors
int used = 0;
for (const T* n : neighbors) {
Point3 d = (Point3)*n - center;
Point3 d = n->inCentimeter() - center;
if (d.length() > 100) {continue;} // radius search
m.addSquared(d.x, d.y);
++used;