annotate Allan.h @ 189:e6cb16365d12

New build
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 31 Mar 2014 17:03:31 +0200
parents 792ac7151f0f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
136
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
1 #ifndef __FXANALISE_ALLAN_H__
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
2 #define __FXANALISE_ALLAN_H__
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
3
136
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
4 /**
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
5 * The Allan deviation is computed at 2^(N tau0) seconds integration times
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
6 * with N ranging from 0 to ALLAN_NUM_DATAPOINTS - 1. Setting this parameter
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
7 * to 14 allows to compute the allan deviation up to 2^13 = 8192 seconds. */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
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
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
11 int AllanPanel; /* display panel handle */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
12 double X[ALLAN_NUM_DATAPOINTS];
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
13 double AllanVar[ALLAN_NUM_DATAPOINTS]; /* Allan variance computed at tau = 2^(N tau0) */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
14 double LastMean[ALLAN_NUM_DATAPOINTS]; /* mean of the last block of 2^N data for which averaging was completed */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
15 int BlocksNumber[ALLAN_NUM_DATAPOINTS]; /* number of 2^N data points blocks used for computing AVAR(2^(N tau0)) */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
16 double CurrentAverage[ALLAN_NUM_DATAPOINTS]; /* sum of the last P data points retrieved. P < 2^N */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
17 int NbCurrentAverage[ALLAN_NUM_DATAPOINTS]; /* number of data point being summed in CurrentAverage */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
18 double Drift; /* frequency drift rate [Hz/s] */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
19 double Mean; /* mean frequency [Hz] */
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
20 double normalization;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
21 int autoscale;
136
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
22 int active; /* active */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
23 int parent; /* panel containig the activation control */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
24 int control; /* activation control handle */
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
25 } Allan_Data;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
26
136
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
27 void Allan_InitPanel(Allan_Data *data, const char * title, double Normalizer, int parent, int control);
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
28 void Allan_ClosePanel(Allan_Data *data);
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
29 void Allan_AddFrequency(Allan_Data * data, double Freq);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
30
136
7b9cf3d4346e Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
31 #endif