added stuff for bluetooth
worked on resampling methods
This commit is contained in:
@@ -100,7 +100,7 @@ namespace SMC {
|
||||
|
||||
auto mode = drawMode(cumTransitionModeProbability);
|
||||
newParticles[k] = drawParticle(mode);
|
||||
newParticles[k].weight = equalWeight;
|
||||
newParticles[k].weight = equalWeight; //todo: why equal weight? i guess if the different filters have different representations of probability?
|
||||
}
|
||||
|
||||
focusedFilter.setParticles(newParticles);
|
||||
@@ -133,7 +133,7 @@ namespace SMC {
|
||||
/** draw one particle according to its weight from the copy vector of a given mode */
|
||||
const Particle<State>& drawParticle(ParticleFilterMixing<State, Control, Observation>& filter) {
|
||||
|
||||
double weights = filter.getParticles().back().weight;
|
||||
//double weights = filter.getParticles().back().weight;
|
||||
|
||||
// generate random values between [0:cumWeight]
|
||||
std::uniform_real_distribution<float> dist(0, filter.getParticles().back().weight);
|
||||
|
||||
Reference in New Issue
Block a user