How to detect a Human Left-Right Jump with Android Device?

Multi tool use
How to detect a Human Left-Right Jump with Android Device?
I have been working with Android's Linear Acceleration for some time, feeding it into our algorithm for detecting android device jump left or right.
I've been trying many different algorithms and different techniques to reach my approach. If you've any idea please help to solve this.
this is my code
//In onCreate method
sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
defaultSensor = sensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION);
sensorManager.registerListener(this, defaultSensor, SensorManager.SENSOR_DELAY_UI);
@Override
public void onSensorChanged(SensorEvent event) {
this.event = event;
x = Double.parseDouble(df.format(event.values[0]));
y = Double.parseDouble(df.format(event.values[1]));
z = Double.parseDouble(df.format(event.values[2]));
/**
* track event records when user fill free to Jump
*/
// some other calculation
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
In my calculation I've tried as Kalman Filter, Complementry Filter and also GPS Sensor fusion used to detect JUMP. Maybe it is possible I may miss something and I couldn't reach to the solution. So if you have solutions with Kalman filter and all then also I would be happy to try it.
Thanks in advance.
@MatPag, I have tried this as well but it is not accurate for all positions. Means if I do not consider rotation or tilting of the phone and stick to only one orientation then it works. otherwise it is not giving an accurate result. When I tilt phone it doesn't work.
– Cipher hex
Jul 3 at 7:00
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Have you read this? There are some useful formulas
– MatPag
Jul 3 at 6:48