Calculating height of rocket with tangent