Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Scientific visualization > Re: How to resa...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 17 of 27 Topic 789 of 833
Post > Topic >>

Re: How to resample continuosly time data to be represented real time ?

by "Skybuck Flying" <BloodyShame@[EMAIL PROTECTED] > May 23, 2008 at 05:19 AM

Here is a possible idea:

The final result will be an average for each line/point though:

First simply collect 500 measurements.

Then for each next measurement.

Two measurements need to be average... so two become one.

At first the most left becomes the average... of measurement 0 and 
measurement 1.

Measurements 2 to 500 remain intact.

Now keep track of an average index which specifies which element of the
500 
is to be average next.

So the average index goes to 1.

Now a new measurement comes in...

Value at average index1 is averaged with value at index 1.

The rest is ****fted down.

So what will happen is something like this, let's say it's limited to 10 
measurements:

0123456789  // 10 measurements

0
1234567890 // 11 measurements
N

02
1345678901 // 12 measurements
NN

024
1356789012 // 13 measurements
NNN

0246
1357890123 // 14 measurements etc.
NNNN

           // N = the new value of the previous 2 averaged.

// Example:
0+1/2
2+3/2
4+5/2
6+7/2

Then when it's full... when the average index reaches the last it goes
back 
to zero.

So then it goes like so:

0246802468
1357913579
----------
NNNNNNNNNN   // 20 measurements


0
1234567890 <- N  // 21 measurement
         |
         21

Now it starts re-average the stored value.

There are two ways to do this:

(0 + 1) / 2 = Average... this is a low pass filter I think they call it.

Another better way would be to keep track of how many lines were averaged.

(=How many times did the average index go back)

So then the formula becomes:

( ( OldN * (AverageLines-1) ) / AverageLines ) + ( NewMeasurement / 
AverageLines ) = NewN

You get the idea ?

This way all measurements end up in the graph averaged and none are thrown

away ! ;)

Bye,
  Skybuck.
 




 27 Posts in Topic:
How to resample continuosly time data to be represented real tim
pamela fluente <pamela  2008-05-21 03:50:34 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-21 14:54:10 
Re: How to resample continuosly time data to be represented real
pamela fluente <pamela  2008-05-21 07:10:14 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-21 23:25:09 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-21 23:28:00 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-21 23:37:43 
Re: How to resample continuosly time data to be represented real
"Paul E. Black"  2008-05-21 12:54:25 
Re: How to resample continuosly time data to be represented real
pamela fluente <pamela  2008-05-21 15:28:16 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-22 01:10:43 
Re: How to resample continuosly time data to be represented real
pamela fluente <pamela  2008-05-21 16:55:23 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-22 08:32:16 
Re: How to resample continuosly time data to be represented real
pamela fluente <pamela  2008-05-22 02:45:37 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 04:22:23 
Re: How to resample continuosly time data to be represented real
LordOfThePi@[EMAIL PROTEC  2008-05-22 08:49:59 
Re: How to resample continuosly time data to be represented real
pamela fluente <pamela  2008-05-22 11:22:21 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 04:31:17 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 05:19:32 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 05:43:27 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 05:53:25 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 06:00:57 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 06:02:22 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-23 06:18:23 
Re: How to resample continuosly time data to be represented real
pamela fluente <pamela  2008-05-23 11:01:15 
Re: How to resample continuosly time data to be represented real
Patricia Shanahan <pat  2008-05-27 05:52:42 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-28 19:57:24 
Re: How to resample continuosly time data to be represented real
"Skybuck Flying"  2008-05-28 20:03:12 
Re: How to resample continuosly time data to be represented real
pamela fluente <pamela  2008-06-18 10:30:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:54:28 CST 2008.