summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Miller2017-04-03 09:51:19 -0500
committerMartin Miller2017-04-03 09:51:19 -0500
commit997967da8e01216b3c655613d875af30fdf2d0c8 (patch)
treecd13601a77820c42cd536e13c43cbb5c28ebd244 /tests
parent3896b8bb0f4026f5259bf23f43b0c991c002102f (diff)
downloadrefslam-997967da8e01216b3c655613d875af30fdf2d0c8.zip
refslam-997967da8e01216b3c655613d875af30fdf2d0c8.tar.gz
changes
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile2
-rw-r--r--tests/test_feature.cpp67
2 files changed, 65 insertions, 4 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 06e42ae..d27c965 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,4 +1,4 @@
-OBJECT=test_feature.o ../src/feature.o ../src/camera.o
+OBJECT=test_feature.o ../src/feature.o ../src/camera.o ../src/camera.h
CXXFLAGS+=-O2 -march=native -std=c++11 -pedantic-errors
CXXFLAGS+=-g -I../src
CXXFLAGS+=$(shell pkg-config --cflags eigen3 yaml-cpp)
diff --git a/tests/test_feature.cpp b/tests/test_feature.cpp
index 13b4e0a..4e6acc2 100644
--- a/tests/test_feature.cpp
+++ b/tests/test_feature.cpp
@@ -31,14 +31,24 @@ test_findDepth ( Camera &cam )
{
bool success;
UTM pos;
+ /* 16.bmp
pos.northing = 4451490.899494356;
pos.easting = 381887.311030777;
pos.up = 206.256890383;
+ */
+ // 9494.bmp
+ pos.northing = 4451693.139997130;
+ pos.easting = 382292.412884794;
+ pos.up = 203.230833591;
pos.zone_i = 16;
pos.zone_c = 'T';
+ /*
// Quat for 16.bmp
attitude_t att{ -1.073641623878,2.685395530695,16.357370508605};
+ */
+ // Quat for 9494.bmp
+ attitude_t att{ 1.669725078950,4.920310214269,49.251704514034};
double roll, pitch, yaw;
roll = M_PI*att.roll/180.;
@@ -51,7 +61,56 @@ test_findDepth ( Camera &cam )
* AngleAxisd(pitch, Vector3d::UnitY());
q = Quaterniond(R);
- Matrix<double,26,5> meas;
+ Matrix<double,48,5> meas;
+ meas << 94,201,258,192,509,
+ 184,210,265,200,480,
+ 588,297,265,296,386,
+ 614,483,267,487,316,
+ 810,352,251,355,415,
+ 996,147,267,142,384,
+ 1062,182,250,179,510,
+ 1070,82,246,73,416,
+ 1072,280,278,282,373,
+ 1146,274,257,272,402,
+ 1152,156,282,149,382,
+ 1274,249,263,246,393,
+ 1370,134,253,123,419,
+ 1432,238,265,242,381,
+ 1474,235,239,242,431,
+ 1520,270,276,271,368,
+ 1588,479,217,463,444,
+ 1640,249,273,252,363,
+ 1692,158,236,142,463,
+ 1724,271,255,272,387,
+ 1784,187,260,185,383,
+ 1792,335,266,338,348,
+ 1812,111,242,96,422,
+ 1820,59,226,49,437,
+ 1826,193,208,193,507,
+ 1834,160,245,154,412,
+ 1856,184,169,191,502,
+ 1862,288,219,293,422,
+ 1870,220,235,216,432,
+ 1872,309,283,309,348,
+ 1938,89,237,81,414,
+ 1976,161,189,168,496,
+ 1984,192,187,196,506,
+ 2002,156,226,153,421,
+ 2004,273,208,273,471,
+ 2008,63,267,59,390,
+ 2014,306,267,308,363,
+ 2034,205,235,201,400,
+ 2084,149,167,148,518,
+ 2114,243,295,239,330,
+ 2120,143,223,141,417,
+ 2134,176,188,163,470,
+ 2142,194,229,189,400,
+ 2168,55,237,47,399,
+ 2192,110,94,115,491,
+ 2194,221,268,220,353,
+ 2200,197,118,201,506,
+ 2220,212,245,212,381;
+/*
meas << 162,493,260,493,331,
66,370,229,369,352,
268,763,235,764,364,
@@ -78,10 +137,11 @@ test_findDepth ( Camera &cam )
1262,547,219,546,360,
1274,314,218,313,354,
1278,469,217,469,365;
+ */
double z;
- z = -0.34;
- z -= 0.6*3.43*sin(pitch);
+ z = -0.55;
+ z -= 0.65*3.43*sin(pitch);
Vector3d xbw;
xbw << pos.northing, pos.easting, -pos.up;
@@ -100,6 +160,7 @@ test_findDepth ( Camera &cam )
xr = cam.img2body(xri);
Feature f(id,xs,xr,xbw,q,z);
+ //Feature f(id,xs,xbw,q);
if (f.sane())
{
UTM utmi;