136
|
1 #ifndef __FXANALISE_ALLAN_H__
|
|
2 #define __FXANALISE_ALLAN_H__
|
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
3
|
136
|
4 /**
|
|
5 * The Allan deviation is computed at 2^(N tau0) seconds integration times
|
|
6 * with N ranging from 0 to ALLAN_NUM_DATAPOINTS - 1. Setting this parameter
|
|
7 * to 14 allows to compute the allan deviation up to 2^13 = 8192 seconds. */
|
|
8 #define ALLAN_NUM_DATAPOINTS 14
|
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
9
|
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
10 typedef struct {
|
136
|
11 int AllanPanel; /* display panel handle */
|
|
12 double X[ALLAN_NUM_DATAPOINTS];
|
|
13 double AllanVar[ALLAN_NUM_DATAPOINTS]; /* Allan variance computed at tau = 2^(N tau0) */
|
|
14 double LastMean[ALLAN_NUM_DATAPOINTS]; /* mean of the last block of 2^N data for which averaging was completed */
|
|
15 int BlocksNumber[ALLAN_NUM_DATAPOINTS]; /* number of 2^N data points blocks used for computing AVAR(2^(N tau0)) */
|
|
16 double CurrentAverage[ALLAN_NUM_DATAPOINTS]; /* sum of the last P data points retrieved. P < 2^N */
|
|
17 int NbCurrentAverage[ALLAN_NUM_DATAPOINTS]; /* number of data point being summed in CurrentAverage */
|
|
18 double Drift; /* frequency drift rate [Hz/s] */
|
|
19 double Mean; /* mean frequency [Hz] */
|
135
|
20 double normalization;
|
|
21 int autoscale;
|
136
|
22 int active; /* active */
|
|
23 int parent; /* panel containig the activation control */
|
|
24 int control; /* activation control handle */
|
|
25 } Allan_Data;
|
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
26
|
136
|
27 void Allan_InitPanel(Allan_Data *data, const char * title, double Normalizer, int parent, int control);
|
|
28 void Allan_ClosePanel(Allan_Data *data);
|
|
29 void Allan_AddFrequency(Allan_Data * data, double Freq);
|
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
30
|
136
|
31 #endif
|