new grid walkers + fixes new test-cases worked on step/and turn detection android offline-data-reader worked on vap-grouping
55 lines
1.0 KiB
C++
55 lines
1.0 KiB
C++
#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 40;
|
|
} else {
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
#endif // WALKMODULEFAVORZ_H
|