summaryrefslogtreecommitdiffhomepage
path: root/logic/pipeline.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-03-03 10:49:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-03-03 13:05:54 +0100
commit7072e072f4bb8388b40d6599a2a509d84d41a51d (patch)
tree58b063c59a872f27acf6c06f7ccdc9136b0b16f6 /logic/pipeline.hpp
parent4d2106c3c6f51c574fbfad69d6086cbe74af1179 (diff)
logic/pipeline: centering fix
The `scaled_rotation' gimbal lock "fix" didn't take into account sign changes, making center close to +-180 useless. remove the "fix". This leaves with a gimbal lock problem at +-90 yaw. Fix in another commit.
Diffstat (limited to 'logic/pipeline.hpp')
-rw-r--r--logic/pipeline.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/logic/pipeline.hpp b/logic/pipeline.hpp
index 45d5b2b2..d51655b3 100644
--- a/logic/pipeline.hpp
+++ b/logic/pipeline.hpp
@@ -98,16 +98,16 @@ private:
struct state
{
- rmat rot_center;
+ rmat inv_rot_center;
rmat rotation;
- state() : rot_center(rmat::eye())
+ state() : inv_rot_center(rmat::eye())
{}
};
reltrans rel;
- state real_rotation, scaled_rotation;
+ state rotation;
euler_t t_center;
ns backlog_time = ns(0);
@@ -117,7 +117,7 @@ private:
double map(double pos, Map& axis);
void logic();
void run() override;
- void maybe_enable_center_on_tracking_started();
+ bool maybe_enable_center_on_tracking_started();
void maybe_set_center_pose(const Pose& value, bool own_center_logic);
Pose clamp_value(Pose value) const;
Pose apply_center(Pose value) const;
@@ -126,9 +126,9 @@ private:
Pose apply_reltrans(Pose value, vec6_bool disabled);
Pose apply_zero_pos(Pose value) const;
- // note: float exponent base is 2
- static constexpr inline double c_mult = 16;
- static constexpr inline double c_div = 1./c_mult;
+ // reminder: float exponent base is 2
+ //static constexpr inline double c_mult = 16;
+ //static constexpr inline double c_div = 1./c_mult;
public:
pipeline(Mappings& m, runtime_libraries& libs, event_handler& ev, TrackLogger& logger);
~pipeline();