many changes and updates

- changed the wifi-estimation api
- adjusted test-cases
- worked on grid-bulding and grid-importance
- new walking modules
- fixed some minor issues
This commit is contained in:
2016-08-29 19:02:32 +02:00
parent a2c9e575a2
commit a203305628
23 changed files with 505 additions and 251 deletions

View File

@@ -0,0 +1,54 @@
#ifndef WALKMODULEFAVORZ_H
#define WALKMODULEFAVORZ_H
#include "WalkModule.h"
#include "WalkStateHeading.h"
#include "../../../../geo/Heading.h"
#include "../../../../math/Distributions.h"
/** favor z-transitions */
template <typename Node, typename WalkState> class WalkModuleFavorZ : public WalkModule<Node, WalkState> {
public:
/** ctor */
WalkModuleFavorZ() {
;
}
virtual void updateBefore(WalkState& state) override {
(void) state;
}
virtual void updateAfter(WalkState& state, const Node& startNode, const Node& endNode) override {
(void) state;
(void) startNode;
(void) endNode;
}
virtual void step(WalkState& state, const Node& curNode, const Node& nextNode) override {
(void) state;
(void) curNode;
(void) nextNode;
}
double getProbability(const WalkState& state, const Node& startNode, const Node& curNode, const Node& potentialNode) const override {
(void) state;
(void) startNode;
if (curNode.z_cm != potentialNode.z_cm) {
return 8;
} else {
return 1;
}
}
};
#endif // WALKMODULEFAVORZ_H

View File

@@ -26,14 +26,14 @@ private:
public:
/** ctor 3.0 should be OK! */
WalkModuleHeadingControl(Control* ctrl) : dist(Distribution::VonMises<double>(0.0f, 1.5).getLUT()), draw(dist.getDrawList()), ctrl(ctrl) {
WalkModuleHeadingControl(Control* ctrl) : dist(Distribution::VonMises<double>(0.0f, 2.0).getLUT()), draw(dist.getDrawList()), ctrl(ctrl) {
;
}
virtual void updateBefore(WalkState& state) override {
const float var = draw.get() * 0.15;//0.05;
const float var = draw.get() * 0.20;//0.05;
//const float var = 0;
state.startHeading += ctrl->turnAngle + var;

View File

@@ -44,8 +44,8 @@ public:
(void) curNode;
const double prob = potentialNode.getNavImportance();
return std::pow(prob, 10);
//return prob;
//return std::pow(prob, 10);
return prob;
}