Online interpolation of temporal signal I have a signal generated from an accelerometer, what I want to do is to receive the incoming signal and check if it is in a certain interval, if it is then I can apply interpolation on it(but interpolation is not the main issue). The basic problem is how to divide a signal into chunks Online and by online I mean that I don't already have an upper time limit of the signal.

A graph to describe further:


Green Signals are the actual samples I am receiving. Let suppose I have received first 2 Green Bars then I'll wait for  3rd green point and use interpolation to find a point at 10ms after that the 4th point will arrive and I want to use it to improve my interpolation by including 3rd and also 4th point until I reach 20ms where I will use the same method used on 10 ms point.

Until now what I have done is divided whole time sequence into chunks and performed interpolation but that is not very practical as in practice I won't have complete sequence already. I'm using python but it is not important. Any suggestion in this regard is highly appreciated. 

If this question is in the wrong place please let me know which platform should I use.
The idea of applying interpolation works well when you have a very high sampling rate. In some sense, what you are trying to do here is fit the missing data between the second and third green bars.

Approach

This approach is motivated from the results discussed in [1].


Construct gapped IMFs (Intrinsic Mode Functions)
Fill in gaps in each mode, based on geometrical constraints
Add up all gap-filled IMFs


Though, I am not sure if this can be implemented in real-time. You can make assumption that you are processing 100 ms data in every batch.

Reference

[1] A. Moghtaderi, P. Borgnat and P. Flandrin, "Gap-filling by the empirical mode decomposition," 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Kyoto, 2012, pp. 3821-3824.