diff options
-rw-r--r-- | src/main.cpp | 9 | ||||
-rw-r--r-- | src/main.h | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 1de5b29..c7ed177 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,12 +31,12 @@ double aboveWater(const Quaterniond &q) { Vector3d tip; -#ifdef DOHEIGHT +#ifdef HEIGHT_FROM_ATTITUDE tip << CANOECENTER*3.43, 0, CANOEHEIGHT; tip = q._transformVector(tip); -#else /* ----- not DOHEIGHT ----- */ +#else /* ----- not HEIGHT_FROM_ATTITUDE ----- */ tip[2] = CANOEHEIGHT; -#endif /* ----- not DOHEIGHT ----- */ +#endif /* ----- not HEIGHT_FROM_ATTITUDE ----- */ return tip[2]; } @@ -78,11 +78,12 @@ imgCallback(message &msg, State &mu, Camera &cam, const Quaterniond &q) { if (seenutm && seenpva && seencov) { std::vector<measurement_t> z; - +#ifdef MEASURE_HEIGHT measurement_t height; height.z_type = HEIGHT; height.height = aboveWater(q); z.push_back(height); +#endif strcat(msg.image_names[0],".txt"); FILE *fin; @@ -37,7 +37,8 @@ #define CANOECENTER 0.65 /* center of gravity of canoe */ #define CANOEHEIGHT -0.55 #define DOWNSAMPLE 1 /* */ -#define DOHEIGHT /* */ +//#define HEIGHT_FROM_ATTITUDE /* use the attitude to measure the height */ +//#define MEASURE_HEIGHT #if ROS_PUBLISH #include <ros/ros.h> |