Forgive me if this is answered elsewhere, I am new to Mathematica and this forum and have tried a number of search phrases to no avail. My question is very general but for example, suppose I throw a ball into the air and record sequential positions on the same image (a motion diagram) but my camera faulted and didn't open the shutter in equal intervals. I can only measure y(x) rather than x(t) and y(t).
In Mathematica I can assume a physical model (quadratic drag) and, using ParametricNDSolve, I find numerical solutions to x(t) and y(t) with initial speed, v0, and drag, d, as fitting parameters.
I can easily fit x(t) or y(t) to the respective data but I am restricted to fitting y(x) to my available data. Armed with numerical solutions to x(t) and y(t), how would I find a numerical fit to my y(x) data? I can plot y(x) just fine but how do I fit the data? My example code resulting in x(t) and y(t) with fabricated data is below.
Clear[d, v0]; g = 9.81;ϕ0 = 40 Degree;
d::usage =
"d has units of length and is the ratio of inertia over viscosity";
v0::usage = "v0 is the initial speed with upwards considered positive";
ϕ0::usage = "ϕ0 is the angle at which the ball is thrown";
eqnx = {x''[t] + (1/d)*Sqrt[(x'[t])^2 + (y'[t])^2]*x'[t] == 0};
eqny = {y''[t] + g + (1/d)*Sqrt[(x'[t])^2 + (y'[t])^2]*y'[t] == 0};
ic = {x'[0] == v0*Cos[ϕ0], x[0] == 0, y'[0] == v0*Sin[ϕ0], y[0] == 2};
solPN = ParametricNDSolve[{eqnx, eqny, ic}, {x, y}, {t, 0, 6}, {d, v0}]
data = Table[{t, (x[8, 23][t] /. solPN) +
RandomInteger[{-5, 5}]/30, (y[8, 23][t] /. solPN) +
RandomInteger[{-5, 5}]/30}, {t, 0.1, 3, 0.2}];
Thank you for your help.