summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Miller2017-07-04 19:59:59 -0500
committerMartin Miller2017-07-04 19:59:59 -0500
commitc4356f7eb431649505cf2bf10b2198af76f90eae (patch)
tree98d4704e7c4bec48bda4a076432d9408a955b633
parentd2070eef13177191a25e97cdb78b60bd58743a9e (diff)
downloadrefslam-c4356f7eb431649505cf2bf10b2198af76f90eae.zip
refslam-c4356f7eb431649505cf2bf10b2198af76f90eae.tar.gz
add canoe height params
-rw-r--r--src/main.cpp15
-rw-r--r--src/types.h3
2 files changed, 11 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 81b7df7..85ccf55 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -29,7 +29,10 @@ double view_noise = 0.0006;
double initial_view_noise = 0.0001;
double reflection_view_noise = 0.0006;
-double r_height,acc_std,ang_std,acc_bias_std;
+double r_height = 0.2025;
+double acc_std = 0.002835;
+double ang_std = 0.008019;
+double acc_bias_std = 0.00891;
using std::cout;
using std::endl;
@@ -86,10 +89,10 @@ aboveWater(const Quaterniond &q)
{
Vector3d tip;
#ifdef HEIGHT_FROM_ATTITUDE
- tip << CANOECENTER*3.43, 0, CANOEHEIGHT;
+ tip << canoecenter*3.43, 0, canoeheight;
tip = q._transformVector(tip);
#else /* ----- not HEIGHT_FROM_ATTITUDE ----- */
- tip[2] = CANOEHEIGHT;
+ tip[2] = canoeheight;
#endif /* ----- not HEIGHT_FROM_ATTITUDE ----- */
return tip[2];
}
@@ -459,10 +462,8 @@ main(int argc, char **argv)
// read params file
FILE *pfin;
pfin = fopen(argv[2], "r");
- fscanf(pfin,"%lf",&r_height);
- fscanf(pfin,"%lf",&acc_std);
- fscanf(pfin,"%lf",&ang_std);
- fscanf(pfin,"%lf",&acc_bias_std);
+ fscanf(pfin,"%lf",&canoecenter);
+ fscanf(pfin,"%lf",&canoeheight);
fclose(pfin);
// Read sensors from file
int i=0;
diff --git a/src/types.h b/src/types.h
index c0e5833..b9a5560 100644
--- a/src/types.h
+++ b/src/types.h
@@ -26,6 +26,9 @@ extern double acc_std;
extern double ang_std;
extern double acc_bias_std;
+extern double canoecenter;
+extern double canoeheight;
+
typedef Eigen::Matrix<double,2,1,Eigen::DontAlign> UVector2d;
// A struct for storing measurements.
typedef enum {BOTH,REFLECTION,MONO,HEIGHT} measurement_type;