Combine Accela Filter with Hamilton Filter
As promised a while ago, here is a filter which combines the Accela gain curves with the rotation-space based filtering from the Hamilton filter. I hope it could maybe replace both the Accela and Hamilton filters.
Basically it applies the accela gain to the rotation vector magnitude of the shortest rotation between the current orientation and the measured orientation.
The position calculation is like in the Accela Filter.
I also included a smoothing amplification depending on the z-position. In my version I add to the smoothing amount. In the Hamilton Filter, I think the gain curve was modified which I wouldn't know how to do in the Accela way.
Maybe I could delete some of the disabled code for a spline GUI. Then again, it might be useful for tweaking those gain curves to those who know what they are doing :-D
Great job!
It would be useful to have the s.max_z point found automatically from the Mapping Z spline.
But I have no idea how to do this, maybe @sthalik can tell about this?
Try explicitly clamping the position value to be between 1e-3 and 1e3.
Should I come up with a QQuaternion replacement that uses double precision?
Try explicitly clamping the position value to be between
1e-3and1e3.
What? Where?
Should I come up with a
QQuaternionreplacement that uses double precision?
Nah. we can get way with float, I think. The mixing of float and double was awkward though. So I changed everything to float.
What? Where?
Wasn't z_max an attempt at getting an upper bound on input Z values? You can just clamp them to a conservative range and remove the user-visible option.
What? Where?
Wasn't
z_maxan attempt at getting an upper bound on input Z values? You can just clamp them to a conservative range and remove the user-visible option.
Hmm .... its the distance where the smoothing assumes the maximum value. Poorly named I guess ...
We can take our time here until you could test the filter yourself.
I see I'm added as a reviewer on this. I'm super rusty on this code and probably not the right person to review this.
I had a glance... It looks OK to me, but I didn't look very closely.
@dbaarda Thanks for taking a look even if superficial. sthalik and GO63-samara are available for reviews after all.
So let's just merge it.