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:
59
sensors/android/GyroscopeSensorAndroid.h
Normal file
59
sensors/android/GyroscopeSensorAndroid.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef GYROSCOPESENSORANDROID_H
|
||||
#define GYROSCOPESENSORANDROID_H
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "../GyroscopeSensor.h"
|
||||
|
||||
#include <QtSensors/QGyroscope>
|
||||
|
||||
#include "../AccelerometerSensor.h"
|
||||
|
||||
class GyroscopeSensorAndroid : public GyroscopeSensor {
|
||||
|
||||
private:
|
||||
|
||||
QGyroscope gyro;
|
||||
|
||||
/** hidden ctor. use singleton */
|
||||
GyroscopeSensorAndroid() {
|
||||
;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/** singleton access */
|
||||
static GyroscopeSensorAndroid& get() {
|
||||
static GyroscopeSensorAndroid gyro;
|
||||
return gyro;
|
||||
}
|
||||
|
||||
float degToRad(const float deg) {
|
||||
return deg / 180.0f * M_PI;
|
||||
}
|
||||
|
||||
void start() override {
|
||||
|
||||
auto onSensorData = [&] () {
|
||||
GyroscopeData data(degToRad(gyro.reading()->x()), degToRad(gyro.reading()->y()), degToRad(gyro.reading()->z()));
|
||||
informListeners(data);
|
||||
};
|
||||
|
||||
gyro.connect(&gyro, &QGyroscope::readingChanged, onSensorData);
|
||||
gyro.start();
|
||||
|
||||
}
|
||||
|
||||
void stop() override {
|
||||
throw "TODO";
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // ANDROID
|
||||
|
||||
#endif // GYROSCOPESENSORANDROID_H
|
||||
Reference in New Issue
Block a user