You must assume that trajectory is of the form:x(t)=v_{x0}t+x_0,\quad y(t)=gt^2+v_{y0}t+y_0, then express your distances as a function of (x,y), take 5 points and solve those 5 equations system to obtain (g,v_{x0},v_{y0},x_0,y_0) or (better) take more points and perform least square fit over...