That code should give you 0 km/hour if you are not moving along the y-axis which is the height. I think you may be wanting to get the speed along the z-axis. If that's the case then just dind the difference in z coordinates rather than the y coordinates.
|