Interpolation (give coordinates, speed & time between 'position')
Hello,
Given: a set of coordinates (x/y) and a speed at this coordinates,
and the time-delta between values is a constant millisecond (eg 100).
Now I need to query on any give timestamp what the interpolated position
would be. Lineair interpolation of the coordinates is working, but in fast
turns with big speed differences between points it is a bit 'shaky'.
Since I also know the speed, I was wondering if it's possible to use that
to get better results?
Any suggestions for an algorithm - or how to approach this problem?
Regards
I assume you have the velocity (speed and direction) not just the speed.
If you know the points you are heading for in advance then you can use some form of spline interpolation (I recommend Catmull-Rom as a good starting point). To get the correct results you will have to solve the spline for constant speed and then use the velocity you have stored to update the position down the spline.
If you don't know the points in advance then you need more information. If you store the angular velocity at each point then you can use that in your interpolation to get a more accurate solution when turning.
If you know the points you are heading for in advance then you can use some form of spline interpolation (I recommend Catmull-Rom as a good starting point). To get the correct results you will have to solve the spline for constant speed and then use the velocity you have stored to update the position down the spline.
If you don't know the points in advance then you need more information. If you store the angular velocity at each point then you can use that in your interpolation to get a more accurate solution when turning.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement