KalmanStatsBuffer.emadl 444 Bytes
Newer Older
Svetlana Pavlitskaya's avatar
Svetlana Pavlitskaya committed
1 2 3
package dp.subcomponents;

component KalmanStatsBuffer(Q startValue) {
Svetlana's avatar
Svetlana committed
4
    ports in Q^{2, 1} X,
Svetlana Pavlitskaya's avatar
Svetlana Pavlitskaya committed
5
	  in Q^{2, 2} errCov,
Svetlana's avatar
Svetlana committed
6
          out Q^{2, 1} outX,
Svetlana Pavlitskaya's avatar
Svetlana Pavlitskaya committed
7 8 9
	  out Q^{2, 2} outErrCov;

    implementation Math {
Svetlana's avatar
Svetlana committed
10
            static Q^{2, 1} bufferedX = [startValue; 0];
Svetlana Pavlitskaya's avatar
Svetlana Pavlitskaya committed
11 12 13 14 15 16 17 18 19
            static Q^{2, 2} bufferedErrCov = [1000, 0; 0, 1000];

	    outX = bufferedX;
	    outErrCov = bufferedErrCov;

	    bufferedX = X;
	    bufferedErrCov = errCov;
        }
}