I need a formula to get speed and max height on mobile app

Job ID: 31092504

Budget: $10 – $30 USD

I have a mobile app (ios and android).
I collect gyroscope and accelerometer data x, y, z axis (+ other sensors if necessary).
I need a formula, based on these sensor data (x, y, z), in order to calculate:
1. maximum speed (m/s) when I move the phone in hand or when I throw the phone up in the air (we have to keep in mind the gravity)
2. maximum height (m) when I move the phone in hand or when I throw the phone up in the air
3. Number of complete rotation on each axis: x, y, z (ex: x: 3 complete rotation, y: 2 complete rotation, z: 1 complete rotation)

Let's say that all data are collected in an interval of 10 seconds: I press start on the phone, I move the phone in hand/throw the phone, and stop .

All I need is the formula to calculate these. (if I will need other sensors data, I can get them).

Optional: Calculate Velocity!

Thank you!

If you need, I can provide excel file with these data collected: just let me know what data you need. (Or I can apply formula and let you know if it's working)