worked on grid-walker
This commit is contained in:
@@ -50,8 +50,12 @@ namespace GW3 {
|
||||
/** evaluate the difference between head(start,end) and the requested heading */
|
||||
template <typename Node> class WalkEvalHeadingStartEnd : public WalkEvaluator<Node> {
|
||||
|
||||
const double sigma;
|
||||
|
||||
public:
|
||||
|
||||
WalkEvalHeadingStartEnd(const double sigma = 0.04) : sigma(sigma) {;}
|
||||
|
||||
virtual double getProbability(const Point3 pStart, const Point3 pEnd, const WalkParams& params) const override {
|
||||
|
||||
(void) params;
|
||||
@@ -64,7 +68,7 @@ namespace GW3 {
|
||||
const Heading head(pStart.xy(), pEnd.xy());
|
||||
const float diff = head.getDiffHalfRAD(params.heading);
|
||||
//const float diff = Heading::getSignedDiff(params.heading, head);
|
||||
return Distribution::Normal<double>::getProbability(0, 0.04, diff);
|
||||
return Distribution::Normal<double>::getProbability(0, sigma, diff);
|
||||
|
||||
}
|
||||
|
||||
@@ -73,10 +77,12 @@ namespace GW3 {
|
||||
/** evaluate the difference between distance(start, end) and the requested distance */
|
||||
template <typename Node> class WalkEvalDistance : public WalkEvaluator<Node> {
|
||||
|
||||
const double sigma = 0.1f;
|
||||
const double sigma;
|
||||
|
||||
public:
|
||||
|
||||
WalkEvalDistance(const double sigma = 0.1) : sigma(sigma) {;}
|
||||
|
||||
virtual double getProbability(const Point3 pStart, const Point3 pEnd, const WalkParams& params) const override {
|
||||
|
||||
const float walkedDistance_m = pStart.getDistance(pEnd);
|
||||
|
||||
Reference in New Issue
Block a user