This is an intriguing problem. To maintain a fixed size buffer containing a set of n equally spaced in time values that best represent the events over a time period that is continually increasing. To ensure there are always n values present (the device could be asked to dump its contents at any time) and that they faithfully represent the input time series means the n values must be "adjusted" as each new sample arrives. The adjustment would have less and less effect as it moves back in time through the buffer. It also means the sample period must slowly increase to match the elapsed time period, or else the samples are accumulated for an increasing time and then a mean taken before being added to the buffer. While sample period adjustment and the mechanism of the buffer update is not hard, choosing the "adjustment" algorithm for each value is. I am exploring some interpolation and averaging methods but comparing the buffer contents to an actual n samples of the total time series at the end of the simulation has significant errors. Anyone else got any ideas? Ron On Mon, 3 Nov 1997, TRESADERN J.M wrote: > Hi > > I am working on a final year project for my degree, > using a PIC controller as a data logger. At the > moment a predefined amount of data is logged for any > given session time. What I want to do it allow the > system to be run for any length of time and still have > the same amount of data logged (e.g 60 points). > > Does anybody have an algorithm or know where to find > one, that dynamically junks data as the time goes on, > such that I have a set of data with fairly equal spaces > in time between them. > --------------------------------------- > TRESADERN J.M > tc801404@stmail.staffs.ac.uk > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ron Kreymborg Systems Administrator Monash University CRC for Southern Hemisphere Meteorology Wellington Road Clayton, VIC 3168 Phone : 061-3-9905-9671 Australia Fax : 061-3-9905-9689 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~