Brief
Everything near the ground falls with the same acceleration, about 9.81 m/s². You can measure it with a phone. Film a ball being thrown, find it in every frame, and ask which value of makes a physics model match what you saw. This project ties together the tools you already have: least squares, ODE solvers, gradient descent and autodiff.
Without air, the height is a parabola: . That is linear in the unknowns, so plain least squares gives a first estimate. Real balls also feel drag. With a drag constant the motion is , which has no simple formula. You solve it with RK4 and tune , and the launch state until the simulated path sits on your tracked points.
Most of the error comes from the video, not the maths. A wrong pixel scale or a wrong frame rate shifts directly. Many phones record at a variable frame rate, so check the timestamps rather than trusting the number on the label. Slow-motion mode at 120 or 240 frames per second gives many more points per throw.
DATA · your own video
Objectives
Read-only. Log in to update progress.
VICTORY CONDITIONS
- Your estimated g is within 3% of 9.81 m/s² (9.52 to 10.10) from your own video. Record it with `python tools/mlarena.py record BM-22 "<your g>"`.
- The fitted simulation follows the tracked points with an RMS error under 2 cm, and its residuals show no clear curve.
- The gradient from your autodiff matches a finite-difference check to a relative error under 1e-5.
Side quests
Terms in plain words
- Calibration
- Finding how many pixels make one metre, using an object of known length filmed at the same distance as the ball.
- Quadratic drag
- Air pushes back on the ball with a force that grows with the square of its speed and points against its motion.
- Residual
- The gap between a tracked point and the model's prediction for that frame. Good fits leave residuals that look like random noise.
- Parameter fitting
- Choosing the unknown numbers in a model (here g, the drag constant and the launch) so its output lines up with the data.