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 FirstMean[ALLAN_NUM_DATAPOINTS]; /* mean of the first block of 2^N data for which averaging was completed */
|
|
15 double LastMean[ALLAN_NUM_DATAPOINTS]; /* mean of the last block of 2^N data for which averaging was completed */
|
|
16 int BlocksNumber[ALLAN_NUM_DATAPOINTS]; /* number of 2^N data points blocks used for computing AVAR(2^(N tau0)) */
|
|
17 double CurrentAverage[ALLAN_NUM_DATAPOINTS]; /* sum of the last P data points retrieved. P < 2^N */
|
|
18 int NbCurrentAverage[ALLAN_NUM_DATAPOINTS]; /* number of data point being summed in CurrentAverage */
|
|
19 double Drift; /* frequency drift rate [Hz/s] */
|
|
20 double Mean; /* mean frequency [Hz] */
|
135
|
21 double normalization;
|
|
22 int autoscale;
|
136
|
23 int active; /* active */
|
|
24 int parent; /* panel containig the activation control */
|
|
25 int control; /* activation control handle */
|
|
26 } Allan_Data;
|
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
27
|
136
|
28 void Allan_InitPanel(Allan_Data *data, const char * title, double Normalizer, int parent, int control);
|
|
29 void Allan_ClosePanel(Allan_Data *data);
|
|
30 void Allan_AddFrequency(Allan_Data * data, double Freq);
|
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
31
|
136
|
32 #endif
|