SimmSpline data interpolation 100 to 1000Hz
Posted: Thu May 15, 2014 10:52 am
Hi all,
I am trying to spline fit kinematic data to get it with a sample frequency equal to the ground reaction forces (1000Hz) but I am not succeeding very well with this.
I think I successfully managed to create the simmsplines with the following
where MTime and vRMF/vLMF are arrays containing the time and velocity values of a point.
From here I thought I could use the function
to get the spline function values at all the timings of the GRF but this function only takes a constant SimTK::Vector of size 1(this I checked with the 'argumentsize' function). This gave back a insanely large number when I placed a value from the MTime array in the constant SimTK::Vector.
So my question is how does this work with the SimmSpline? All I want is an array or vector with interpolated 'Y' values from the cubic spline fit with a given set of data.
Best regards,
Erik
I am trying to spline fit kinematic data to get it with a sample frequency equal to the ground reaction forces (1000Hz) but I am not succeeding very well with this.
I think I successfully managed to create the simmsplines with the following
Code: Select all
SimmSpline rSpline, lSpline;
for(int i=1; i<MTime.getSize()-1;i++){
rSpline.addPoint(MTime[i],vRMF[i]);
lSpline.addPoint(MTime[i],vLMF[i]);
}
From here I thought I could use the function
Code: Select all
double aValue = rSpline.calcValue(x)
So my question is how does this work with the SimmSpline? All I want is an array or vector with interpolated 'Y' values from the cubic spline fit with a given set of data.
Best regards,
Erik