commit before merge
This commit is contained in:
@@ -50,7 +50,7 @@ private:
|
|||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
//Log::add("SLWA", "calling android with lon/lat/floor");
|
//Log::add("SLWA", "calling android with lon/lat/floor");
|
||||||
int res = QAndroidJniObject::callStaticMethod<int>("indoor/java/StepLoggerClient", "log", "(DDD)I", x, y, z);
|
int res = QAndroidJniObject::callStaticMethod<int>("indoor/java/StepLoggerClient", "log", "(DDD)I", x, y, std::round(z));
|
||||||
//if (res != 1337) {throw Exception("invalid return code while sending the current position to StepLogger.\nService Down?");}
|
//if (res != 1337) {throw Exception("invalid return code while sending the current position to StepLogger.\nService Down?");}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ public:
|
|||||||
const WiFiMeasurements wifiObs = vg.group(_observation.wifi);
|
const WiFiMeasurements wifiObs = vg.group(_observation.wifi);
|
||||||
const int numAP2 = wifiObs.entries.size();
|
const int numAP2 = wifiObs.entries.size();
|
||||||
|
|
||||||
Log::add("Filter", "VAP: " + std::to_string(numAP1) + " -> " + std::to_string(numAP2));
|
//Log::add("Filter", "VAP: " + std::to_string(numAP1) + " -> " + std::to_string(numAP2));
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
Assert::equal((int)particles.size(), Settings::numParticles, "number of particles does not match the settings!");
|
Assert::equal((int)particles.size(), Settings::numParticles, "number of particles does not match the settings!");
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ private:
|
|||||||
const Timestamp tsDiff = ts2-ts1;
|
const Timestamp tsDiff = ts2-ts1;
|
||||||
const QString filterTime = QString::number(tsDiff.ms());
|
const QString filterTime = QString::number(tsDiff.ms());
|
||||||
avgSum += tsDiff.ms(); ++avgCount;
|
avgSum += tsDiff.ms(); ++avgCount;
|
||||||
Log::add("xxx", "ts:" + std::to_string(curObs.currentTime.ms()) + " avg:" + std::to_string(avgSum/avgCount));
|
//Log::add("xxx", "ts:" + std::to_string(curObs.currentTime.ms()) + " avg:" + std::to_string(avgSum/avgCount));
|
||||||
QMetaObject::invokeMethod(mainController->getInfoWidget(), "showFilterTime", Qt::QueuedConnection, Q_ARG(const QString&, filterTime));
|
QMetaObject::invokeMethod(mainController->getInfoWidget(), "showFilterTime", Qt::QueuedConnection, Q_ARG(const QString&, filterTime));
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ private:
|
|||||||
|
|
||||||
//lastEst = curEst;
|
//lastEst = curEst;
|
||||||
curEst = pf->update(&curCtrl, curObs);
|
curEst = pf->update(&curCtrl, curObs);
|
||||||
Log::add("Nav", "cur est: " + curEst.position.asString());
|
//Log::add("Nav", "cur est: " + curEst.position.asString());
|
||||||
|
|
||||||
// inform listeners about the new estimation
|
// inform listeners about the new estimation
|
||||||
for (NavControllerListener* l : listeners) {l->onNewEstimation(curEst.position.inMeter());}
|
for (NavControllerListener* l : listeners) {l->onNewEstimation(curEst.position.inMeter());}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <Indoor/sensors/imu/StepDetection.h>
|
#include <Indoor/sensors/imu/StepDetection.h>
|
||||||
#include "AccelerometerSensor.h"
|
#include "AccelerometerSensor.h"
|
||||||
|
|
||||||
|
#include <Indoor/misc/Debug.h>
|
||||||
|
|
||||||
struct StepData {
|
struct StepData {
|
||||||
const int stepsSinceLastEvent = 0;
|
const int stepsSinceLastEvent = 0;
|
||||||
@@ -45,6 +46,7 @@ public:
|
|||||||
const bool step = sd.add(ts, data);
|
const bool step = sd.add(ts, data);
|
||||||
if (step) {
|
if (step) {
|
||||||
informListeners(ts, StepData(1));
|
informListeners(ts, StepData(1));
|
||||||
|
Log::add("Step", "Step Detected!" + std::to_string(ts.ms()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user