Archive Compression Example: Determining Expected Value

Values arriving into the archiver for tag1 are

TimeValue
t02
t0+510
t0+1020
The expected value at time stamp t0+15 is calculated based on the samples at t0+5 and t0+10:
m_CompSlope = deltaValue / deltaTime m_CompSlope = (20-10) / 5
m_CompSlope = 2
m_CompOffset = lastValue - (m_CompSlope * LastTimeSecs)
m_CompOffset = 20 - (2 * 10)
m_CompOffset = 0
ExpectedValue = m_CompSlope * Time + m_CompOffset; 
ExpectedValue = 2 * 15 + 0;
ExpectedValue = 30

The expected value at t0+15 is 30.