In a previous project I visualized the trajectory of a ball that I threw vertically into the air with a real-time position, velocity and acceleration plot. Extending upon this project, I desired to calculate and visualize a trajectory prediction based on a straightforward physics model. On this post, I’ll explain how I fit the model to the measured state of the ball and visualize the anticipated trajectory.
Let’s start with the physics model for the ball. For simplicity, I’m only considering the vertical movement of the ball, simplifying the issue to a one-dimensional one. Moreover, I’m only modelling the ball as soon because it leaves my hand and neglecting any air drag. This simply leaves us with a single constant force acting on the ball: gravity.
The force is calculated with the mass of the ball and the gravitational acceleration g, which is roughly 9.8m/s², depending on location and altitude. The…