huge commit
- worked on about everything - grid walker using plugable modules - wifi models - new distributions - worked on geometric data-structures - added typesafe timestamps - worked on grid-building - added sensor-classes - added sensor analysis (step-detection, turn-detection) - offline data reader - many test-cases
This commit is contained in:
28
tests/sensors/offline/TestOffline.cpp
Normal file
28
tests/sensors/offline/TestOffline.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
#include "../../Tests.h"
|
||||
|
||||
#include "../../../sensors/offline/OfflineAndroid.h"
|
||||
|
||||
TEST(Offline, test1) {
|
||||
OfflineAndroid off(getDataFile("offlineAndroid.dat"));
|
||||
ASSERT_EQ(6, off.getGroundTruth().size());
|
||||
ASSERT_EQ(1, off.getWiFi().size());
|
||||
}
|
||||
|
||||
// cleanup pattern
|
||||
// ^[0-9]*;(-1|0|1|2|3|4|5|6|7|9|10|11);.*
|
||||
TEST(Offline, test2) {
|
||||
OfflineAndroid off(getDataFile("path4wifi.dat"));
|
||||
ASSERT_EQ(20, off.getGroundTruth().size());
|
||||
}
|
||||
|
||||
|
||||
TEST(Offline, testPath) {
|
||||
OfflineAndroid off(getDataFile("train/walks/path4_nexus_backward.dat"));
|
||||
ASSERT_EQ(21, off.getGroundTruth().size());
|
||||
ASSERT_EQ(off.getWalkedPath().pos_cm[0], off.getWalkedPath().pos_cm[1]); // same waypoint twice. not moving within first few seconds
|
||||
off.getWalkedPathInterpolatorCM();
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user