a lot!!! of changes
added main menu added debug display many debug widgets for plotting live data worked on android live sensors added offline-data sensor feeding some dummy data sensors worked on the map display added ui debug for grid-points, particles and weights added a cool dude to display the estimation added real filtering based on the Indoor components c++11 fixes for android compilation online and offline filtering support new resampling technique for testing map loading via dialog
This commit is contained in:
@@ -2,9 +2,17 @@
|
||||
#define ACCELEROMETERSENSORDUMMY_H
|
||||
|
||||
#include "../AccelerometerSensor.h"
|
||||
#include "RandomSensor.h"
|
||||
#include <random>
|
||||
|
||||
class AccelerometerSensorDummy : public AccelerometerSensor {
|
||||
class AccelerometerSensorDummy : public RandomSensor<AccelerometerData, AccelerometerSensor> {
|
||||
|
||||
private:
|
||||
|
||||
/** hidden ctor */
|
||||
AccelerometerSensorDummy() : RandomSensor(Timestamp::fromMS(10)) {
|
||||
;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -14,13 +22,25 @@ public:
|
||||
return acc;
|
||||
}
|
||||
|
||||
void start() override {
|
||||
//throw "todo";
|
||||
protected:
|
||||
|
||||
std::minstd_rand gen;
|
||||
std::uniform_real_distribution<float> distNoise = std::uniform_real_distribution<float>(-0.5, +0.5);
|
||||
|
||||
AccelerometerData getRandomEntry() override {
|
||||
|
||||
const Timestamp ts = Timestamp::fromRunningTime();
|
||||
const float Hz = 1.6;
|
||||
const float intensity = 2.0;
|
||||
|
||||
const float x = distNoise(gen);
|
||||
const float y = distNoise(gen);
|
||||
const float z = 9.81 + std::sin(ts.sec()*2*M_PI*Hz) * intensity + distNoise(gen);
|
||||
|
||||
return AccelerometerData(x,y,z);
|
||||
|
||||
}
|
||||
|
||||
void stop() override {
|
||||
throw "todo";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user