This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Fusion2016/code/lukas/StepEvaluation.h
FrankE deb21fc550 fixed baraomter issue (skip first few readings due to sensor errors)
added new eval using shortest-path + plotting
removed compiler warnings for clean-code
fixed some minor issues
added new TeX code and new graphics
2016-02-07 13:30:04 +01:00

56 lines
1.0 KiB
C++
Executable File

#ifndef STEPEVALUATION_H
#define STEPEVALUATION_H
#include "../particles/MyState.h"
#include "StepObservation.h"
#include <math.h>
static constexpr double mu_walk = 90;
static constexpr double sigma_walk = 30;
static constexpr double mu_stop = 0;
static constexpr double sigma_stop = 5;
class StepEvaluation {
public:
double getProbability(const MyState& state, const StepObservation* obs) const {
(void) state;
(void) obs;
return 1;
// see: particle-filter-control-data
// const float mdlWalked_m = state.walkState.distanceWalked_m;
// ((MyState&)state).walkState.distanceWalked_m = 0;
// const float stepSize_m = 0.71;
// const float sensSigma_m = 0.05 + (0.05 * obs->steps);
// const float sensWalked_m = obs->steps * stepSize_m;
// if (obs->steps > 1) {
// int i = 0;
// int j = i+1; ++j;
// }
// const double prob = K::NormalDistribution::getProbability(sensWalked_m, sensSigma_m, mdlWalked_m);
// if (prob != prob) {
// throw 1;
// }
// return prob;
}
};
#endif // STEPEVALUATION_H