statistics.h
Go to the documentation of this file.
1 /*
2  * statistics.h
3  *
4  * Created on: Jul 30, 2013
5  * Author: Walt Johnson
6  */
7 
8 #ifndef STATISTICS_H_
9 #define STATISTICS_H_
10 
11 #include "ISMatrix.h"
12 
13 
14 //_____ M A C R O S ________________________________________________________
15 
16 //_____ D E F I N I T I O N S ______________________________________________
17 
18 typedef struct
19 {
20  ixVector3 ave; // mean
21  ixVector3 var; // variance
22  ixVector3 std; // standard deviation
23  float aveAlph; // alpha gain
24  float aveBeta; // beta gain
25  float varAlph; // alpha gain
26  float varBeta; // beta gain
27 } sRTSDVec3;
28 
29 //_____ G L O B A L S ______________________________________________________
30 
31 //_____ P R O T O T Y P E S ________________________________________________
32 
33 
34 /*
35  * Find the average value of the array.
36  */
37 f_t mean( f_t *input, int size, int byteIncrement );
38 f_t mean_int32(int32_t *input, int size, int byteIncrement);
39 double mean_int64(int64_t *input, int size, int byteIncrement);
40 double mean(double *input, int size, int byteIncrement);
41 
42 /*
43  * Find the variance of the array.
44  */
45 f_t variance(f_t *input, int size, int byteIncrement);
46 f_t variance_int32(int32_t *input, int size, int byteIncrement);
47 double variance_int64(int64_t *input, int size, int byteIncrement);
48 double variance(double *input, int size, int byteIncrement);
49 f_t variance_mean( f_t *input, f_t *ave, int size, int byteIncrement );
50 
51 /*
52 * Sum of the squares of input minus ave.
53 */
54 f_t delta_mean(f_t *input, int size, int byteIncrement, float ave);
55 
56 /*
57  * \brief Find the standard deviation of array.
58  *
59  * \param input Float pointer to start of data.
60  * \param length Number of values used in output.
61  * \param byteIncrement Number of bytes size of data structure used to increment pointer by (f_t = 4). Used to iterate across an structure arrays.
62  */
63 f_t standard_deviation( f_t *input, int size, int byteIncrement );
64 double standard_deviation_d(double *input, int size, int byteIncrement);
65 f_t standard_deviation_int32(int32_t *input, int size, int byteIncrement);
66 double standard_deviation_int64(int64_t *input, int size, int byteIncrement);
67 f_t standard_deviation_mean( f_t *input, f_t *mean, int size, int byteIncrement );
68 void standard_deviation_Vec3( ixVector3 result, ixVector3 input, int size, int byteIncrement );
69 void stardard_deviation_mean_Vec3( ixVector3 result, ixVector3 input, ixVector3 mean, int size, int byteIncrement );
70 void mean_Vec3( ixVector3 ave, ixVector3 input, int size, int byteIncrement );
71 
72 // Set ave to zero to get true RMS
73 f_t root_mean_squared(f_t *input, int size, int byteIncrement, float ave);
74 
75 
76 void init_realtime_std_dev_Vec3( sRTSDVec3 *s, float dt, float aveCornerFreqHz, float varCornerFreqHz, ixVector3 initVal );
77 
78 void realtime_std_dev_Vec3( f_t *input, sRTSDVec3 *v );
79 
80 
81 
82 #endif /* STATISTICS_H_ */
ixVector3 std
Definition: statistics.h:22
double variance_int64(int64_t *input, int size, int byteIncrement)
Definition: statistics.cpp:186
float varAlph
Definition: statistics.h:25
f_t standard_deviation_int32(int32_t *input, int size, int byteIncrement)
Definition: statistics.cpp:258
f_t mean(f_t *input, int size, int byteIncrement)
Definition: statistics.cpp:24
void stardard_deviation_mean_Vec3(ixVector3 result, ixVector3 input, ixVector3 mean, int size, int byteIncrement)
Definition: statistics.cpp:308
f_t ixVector3[3]
Definition: ISConstants.h:791
f_t standard_deviation_mean(f_t *input, f_t *mean, int size, int byteIncrement)
Definition: statistics.cpp:282
float f_t
Definition: ISConstants.h:786
float aveBeta
Definition: statistics.h:24
f_t standard_deviation(f_t *input, int size, int byteIncrement)
Definition: statistics.cpp:237
double standard_deviation_d(double *input, int size, int byteIncrement)
Definition: statistics.cpp:248
void standard_deviation_Vec3(ixVector3 result, ixVector3 input, int size, int byteIncrement)
Definition: statistics.cpp:294
void init_realtime_std_dev_Vec3(sRTSDVec3 *s, float dt, float aveCornerFreqHz, float varCornerFreqHz, ixVector3 initVal)
Definition: statistics.cpp:331
f_t variance_mean(f_t *input, f_t *ave, int size, int byteIncrement)
Definition: statistics.cpp:211
ixVector3 ave
Definition: statistics.h:20
f_t mean_int32(int32_t *input, int size, int byteIncrement)
Definition: statistics.cpp:67
double mean_int64(int64_t *input, int size, int byteIncrement)
Definition: statistics.cpp:89
float varBeta
Definition: statistics.h:26
void mean_Vec3(ixVector3 ave, ixVector3 input, int size, int byteIncrement)
Definition: statistics.cpp:322
f_t delta_mean(f_t *input, int size, int byteIncrement, float ave)
Definition: statistics.cpp:375
ixVector3 var
Definition: statistics.h:21
f_t variance(f_t *input, int size, int byteIncrement)
Definition: statistics.cpp:111
f_t root_mean_squared(f_t *input, int size, int byteIncrement, float ave)
Definition: statistics.cpp:365
f_t variance_int32(int32_t *input, int size, int byteIncrement)
Definition: statistics.cpp:161
void realtime_std_dev_Vec3(f_t *input, sRTSDVec3 *v)
Definition: statistics.cpp:348
double standard_deviation_int64(int64_t *input, int size, int byteIncrement)
Definition: statistics.cpp:270
float aveAlph
Definition: statistics.h:23


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:58