diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-17 22:29:35 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-17 22:32:05 +0200 |
commit | a562bd75bd788bd2399aa4a96ba3276c22a77518 (patch) | |
tree | 418a29b05f213e4529fda7894c403e85e4ff852e /logic/tracker.h | |
parent | 630a8a253ca6b868148e9850ab4203484762c853 (diff) |
logic/tracker: cleanup gimbal lock fix
There were too many cases of variables with a "_real" suffix and without. Move
both cases into struct data members.
Also add experimental camera centering method.
Cleanup some other stuff like "is_nan" should take an arbitrary Mat.
Diffstat (limited to 'logic/tracker.h')
-rw-r--r-- | logic/tracker.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/logic/tracker.h b/logic/tracker.h index d3c2660b..6e5faddf 100644 --- a/logic/tracker.h +++ b/logic/tracker.h @@ -50,8 +50,19 @@ private: // the logger while the tracker is running. TrackLogger &logger; - rmat r_b, r_b_real; - double t_b[3]; + struct state + { + rmat center_yaw, center_pitch, center_roll; + rmat rot_center; + rmat camera; + rmat rotation, ry, rp, rr; + + state() : center_yaw(rmat::eye()), center_pitch(rmat::eye()), center_roll(rmat::eye()), rot_center(rmat::eye()) + {} + }; + + state real_rotation, scaled_rotation; + euler_t t_center; volatile bool centerp; volatile bool enabledp; |