From d63ac013f70b7bfc0d253ff8efd7835f2d2bf731 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 29 Apr 2013 17:28:36 +0200 Subject: use doubles consistently --- ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 6 +++--- 1 file 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)); -- cgit v1.2.3