I have array of data points where x is speed and y is a timestamp, some data points are missing time, what would be correct formula to calculate interpolated time for certain speed based on other data point. Basically this is acceleration time up to certain speed. As I understand linear interpolation is not correct here since acceleration is not linear. Would be formula the same for deceleration(braking) time?
Example: [{ speed:9, time:1 }, {speed: 10, time: ???}, {speed: 10.5, time: 2,5}, ...., {speed: 20, time: ???}, {speed:21, time: 20}]
Clarification: What I am trying to do is calculate time for car needed to get from one speed to another speed. My input data looks like array of data points (speed, timestamp UTC). Speed comes in decimal values as 1.1, 1.9, 2.2 etc. So basically if I want to calculate time from 10 mph to 20 mph and my input data look like 9.5, 10.8 ..... 19.5, 20.9 I need to interpolate 10 and 20.