fixed some minor bugs using ble on android
added BLE to the evaluation of the particle filter made first evaluation inside fhws
This commit is contained in:
154
Settings.h
154
Settings.h
@@ -4,6 +4,7 @@
|
||||
#include <Indoor/grid/GridPoint.h>
|
||||
#include <Indoor/data/Timestamp.h>
|
||||
#include <Indoor/sensors/radio/VAPGrouper.h>
|
||||
#include <Indoor/sensors/beacon/BeaconMeasurementGrouper.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
@@ -12,114 +13,123 @@ namespace Settings {
|
||||
|
||||
const int numParticles = 5000;
|
||||
|
||||
namespace IMU {
|
||||
const float turnSigma = 1.5; // 3.5
|
||||
const float stepLength = 0.80;
|
||||
namespace IMU {
|
||||
const float turnSigma = 1.5; // 3.5
|
||||
const float stepLength = 0.80;
|
||||
const float stepSigma = 0.40; //toni changed
|
||||
}
|
||||
}
|
||||
|
||||
const float smartphoneAboveGround = 1.3;
|
||||
const float smartphoneAboveGround = 1.3;
|
||||
|
||||
const float offlineSensorSpeedup = 2;
|
||||
const float offlineSensorSpeedup = 2;
|
||||
|
||||
namespace Grid {
|
||||
constexpr int gridSize_cm = 20;
|
||||
}
|
||||
namespace Grid {
|
||||
constexpr int gridSize_cm = 20;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//const GridPoint destination = GridPoint(70*100, 35*100, 0*100); // use destination
|
||||
const GridPoint destination = GridPoint(0,0,0); // do not use destination
|
||||
//const GridPoint destination = GridPoint(70*100, 35*100, 0*100); // use destination
|
||||
const GridPoint destination = GridPoint(0,0,0); // do not use destination
|
||||
|
||||
namespace SensorDebug {
|
||||
const Timestamp updateEvery = Timestamp::fromMS(200);
|
||||
}
|
||||
namespace SensorDebug {
|
||||
const Timestamp updateEvery = Timestamp::fromMS(200);
|
||||
}
|
||||
|
||||
namespace WiFiModel {
|
||||
namespace WiFiModel {
|
||||
|
||||
constexpr float sigma = 10.0; //TODO: im Museum hatten wir 8.0
|
||||
|
||||
/** if the wifi-signal-strengths are stored on the grid-nodes, this needs a grid rebuild! */
|
||||
/** if the wifi-signal-strengths are stored on the grid-nodes, this needs a grid rebuild! */
|
||||
constexpr float TXP = -45;
|
||||
constexpr float EXP = 2.3;
|
||||
constexpr float WAF = -5.0;
|
||||
|
||||
// how to perform VAP grouping. see
|
||||
// - calibration in Controller.cpp
|
||||
// - eval in Filter.h
|
||||
// NOTE: maybe the UAH does not allow valid VAP grouping? delete the grid and rebuild without!
|
||||
const VAPGrouper vg_calib = VAPGrouper(VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO, VAPGrouper::Aggregation::AVERAGE);
|
||||
const VAPGrouper vg_eval = VAPGrouper(VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO, VAPGrouper::Aggregation::AVERAGE);
|
||||
// how to perform VAP grouping. see
|
||||
// - calibration in Controller.cpp
|
||||
// - eval in Filter.h
|
||||
// NOTE: maybe the UAH does not allow valid VAP grouping? delete the grid and rebuild without!
|
||||
const VAPGrouper vg_calib = VAPGrouper(VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO, VAPGrouper::Aggregation::AVERAGE);
|
||||
const VAPGrouper vg_eval = VAPGrouper(VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO, VAPGrouper::Aggregation::AVERAGE);
|
||||
// const VAPGrouper vg_calib = VAPGrouper(VAPGrouper::Mode::DISABLED, VAPGrouper::Aggregation::AVERAGE);
|
||||
// const VAPGrouper vg_eval = VAPGrouper(VAPGrouper::Mode::DISABLED, VAPGrouper::Aggregation::AVERAGE);
|
||||
}
|
||||
}
|
||||
|
||||
namespace BLEModel {
|
||||
|
||||
constexpr float sigma = 8.0;
|
||||
|
||||
namespace MapView3D {
|
||||
const int maxColorPoints = 10000;
|
||||
constexpr int fps = 15;
|
||||
const Timestamp msPerFrame = Timestamp::fromMS(1000/fps);
|
||||
}
|
||||
constexpr float TXP = -59;
|
||||
constexpr float EXP = 2.3;
|
||||
constexpr float WAF = -9.0;
|
||||
|
||||
namespace Filter {
|
||||
const Timestamp updateEvery = Timestamp::fromMS(500);
|
||||
constexpr bool useMainThread = false; // perform filtering in the main thread
|
||||
}
|
||||
const BeaconMeasurementGrouper vg_eval = BeaconMeasurementGrouper(BeaconMeasurementGrouper::Mode::DISABLED, BeaconMeasurementGrouper::Aggregation::AVERAGE);
|
||||
}
|
||||
|
||||
namespace Data {
|
||||
namespace MapView3D {
|
||||
const int maxColorPoints = 10000;
|
||||
constexpr int fps = 15;
|
||||
const Timestamp msPerFrame = Timestamp::fromMS(1000/fps);
|
||||
}
|
||||
|
||||
// notes
|
||||
// copy: scp -P 2222 /tmp/grid.dat kazu@192.168.24.11:/storage/sdcard1/YASMIN/maps/car/
|
||||
// all: scp -P 2222 -r /apps/android/workspace/YASMIN_DATA/* kazu@192.168.24.11:/storage/sdcard1/YASMIN/
|
||||
namespace Filter {
|
||||
const Timestamp updateEvery = Timestamp::fromMS(500);
|
||||
constexpr bool useMainThread = false; // perform filtering in the main thread
|
||||
}
|
||||
|
||||
static inline std::string getRoot() {
|
||||
#ifdef ANDROID
|
||||
// const std::string folder = getenv("EXTERNAL_STORAGE") + std::string("/YASMIN/maps/"); // this is NOT the sdcard?!
|
||||
// qDebug(folder.c_str());
|
||||
// return folder;
|
||||
//return "/storage/sdcard1/YASMIN/";
|
||||
//const std::string f1 = "/storage/sdcard1/YASMIN/";
|
||||
//const std::string f2 = "/sdcard/YASMIN/";
|
||||
//if (QFile(f1.c_str()).exists()) {return f1;}
|
||||
//if (QFile(f2.c_str()).exists()) {return f2;}
|
||||
std::string tried;
|
||||
QDir dStorage("/storage");
|
||||
QStringList lst = dStorage.entryList();
|
||||
namespace Data {
|
||||
|
||||
// notes
|
||||
// copy: scp -P 2222 /tmp/grid.dat kazu@192.168.24.11:/storage/sdcard1/YASMIN/maps/car/
|
||||
// all: scp -P 2222 -r /apps/android/workspace/YASMIN_DATA/* kazu@192.168.24.11:/storage/sdcard1/YASMIN/
|
||||
|
||||
static inline std::string getRoot() {
|
||||
#ifdef ANDROID
|
||||
// const std::string folder = getenv("EXTERNAL_STORAGE") + std::string("/YASMIN/maps/"); // this is NOT the sdcard?!
|
||||
// qDebug(folder.c_str());
|
||||
// return folder;
|
||||
//return "/storage/sdcard1/YASMIN/";
|
||||
//const std::string f1 = "/storage/sdcard1/YASMIN/";
|
||||
//const std::string f2 = "/sdcard/YASMIN/";
|
||||
//if (QFile(f1.c_str()).exists()) {return f1;}
|
||||
//if (QFile(f2.c_str()).exists()) {return f2;}
|
||||
std::string tried;
|
||||
QDir dStorage("/storage");
|
||||
QStringList lst = dStorage.entryList();
|
||||
lst.append("sdcard/YASMIN/");
|
||||
lst.append("emulated/0");
|
||||
|
||||
//TODO: THIS IS A MESS, PURE CHAOS xD
|
||||
|
||||
// try each potential folder
|
||||
for (const QString subfolder : lst) {
|
||||
QString path = dStorage.path() + "/" + subfolder + "/YASMIN/";
|
||||
if (QFile(path).exists()) {return path.toStdString();}
|
||||
tried += path.toStdString() + "\n";
|
||||
}
|
||||
throw Exception("data folder missing. tried:\n" + tried);
|
||||
#else
|
||||
//return "/home/toni/Documents/programme/localization/YASMIN/YASMIN_DATA/";
|
||||
return "/apps/android/workspace/YASMIN_DATA/";
|
||||
#endif
|
||||
}
|
||||
// try each potential folder
|
||||
for (const QString subfolder : lst) {
|
||||
QString path = dStorage.path() + "/" + subfolder + "/YASMIN/";
|
||||
if (QFile(path).exists()) {return path.toStdString();}
|
||||
tried += path.toStdString() + "\n";
|
||||
}
|
||||
throw Exception("data folder missing. tried:\n" + tried);
|
||||
#else
|
||||
//return "/home/toni/Documents/programme/localization/YASMIN/YASMIN_DATA/";
|
||||
return "/apps/android/workspace/YASMIN_DATA/";
|
||||
#endif
|
||||
}
|
||||
|
||||
/** get the directory where maps are stored */
|
||||
static inline std::string getMapDir() {
|
||||
return getRoot() + "maps/";
|
||||
}
|
||||
/** get the directory where maps are stored */
|
||||
static inline std::string getMapDir() {
|
||||
return getRoot() + "maps/";
|
||||
}
|
||||
|
||||
static inline std::string getOfflineDir() {
|
||||
return getRoot() + "offline/";
|
||||
}
|
||||
static inline std::string getOfflineDir() {
|
||||
return getRoot() + "offline/";
|
||||
}
|
||||
|
||||
static inline std::string getRecordsDir() {
|
||||
return getRoot() + "records/";
|
||||
}
|
||||
static inline std::string getRecordsDir() {
|
||||
return getRoot() + "records/";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user