summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-29 17:28:36 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-29 17:29:11 +0200
commitd63ac013f70b7bfc0d253ff8efd7835f2d2bf731 (patch)
treebe30c6770b98b5df0d20f105e4131bd7b78e4601
parent6d08285f89b1d50204ae2569cbc2e0d9dac44d65 (diff)
use doubles consistently
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index d468dd85..ddf91c59 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -193,8 +193,8 @@ void Tracker::paint_widget() {
bool Tracker::GiveHeadPoseData(double *data)
{
- const float rad2deg = 180.0/3.14159265;
- const float deg2rad = 1.0/rad2deg;
+ const double rad2deg = 180.0/3.14159265;
+ const double deg2rad = 1.0/rad2deg;
{
QMutexLocker lock(&mutex);
@@ -233,7 +233,7 @@ bool Tracker::GiveHeadPoseData(double *data)
R = R_RG * R * R_RG.t();
// extract rotation angles
- float alpha, beta, gamma;
+ double alpha, beta, gamma;
//beta = atan2( -R(2,0), sqrt(R(0,0)*R(0,0) + R(1,0)*R(1,0)) );
beta = atan2( -R(2,0), sqrt(R(2,1)*R(2,1) + R(2,2)*R(2,2)) );
alpha = atan2( R(1,0), R(0,0));