![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Statistics functions. More...
#include "std.h"
Go to the source code of this file.
Functions | |
int32_t | mean_i (int32_t *array, uint32_t n_elements) |
Compute the mean value of an array This is implemented using floats to handle scaling of all variables. | |
int32_t | variance_i (int32_t *array, uint32_t n_elements) |
Compute the variance of an array of values (integer). | |
int32_t | covariance_i (int32_t *array1, int32_t *array2, uint32_t n_elements) |
Compute the covariance of two arrays V(X) = E[(X-E[X])(Y-E[Y])] = E[XY] - E[X]E[Y] where E[X] is the expected value of X This is implemented using floats to handle scaling of all variables. | |
float | sum_f (float *array, uint32_t n_elements) |
Compute the sum array elements. | |
float | mean_f (float *arr, uint32_t n_elements) |
Compute the mean value of an array (float) | |
float | variance_f (float *array, uint32_t n_elements) |
Compute the variance of an array of values (float). | |
float | covariance_f (float *array1, float *array2, uint32_t n_elements) |
Compute the covariance of two arrays V(X) = E[(X-E[X])(Y-E[Y])] = E[XY] - E[X]E[Y] where E[X] is the expected value of X. | |
Statistics functions.
Definition in file pprz_stat.h.
Compute the covariance of two arrays V(X) = E[(X-E[X])(Y-E[Y])] = E[XY] - E[X]E[Y] where E[X] is the expected value of X.
[in] | *array1 | The first array |
[in] | *array2 | The second array |
[in] | n_elements | Number of elements in the arrays |
Definition at line 152 of file pprz_stat.c.
References foo.
Referenced by cloud_sensor_callback(), set_cov_div(), set_cov_div(), set_cov_flow(), and variance_f().
Compute the covariance of two arrays V(X) = E[(X-E[X])(Y-E[Y])] = E[XY] - E[X]E[Y] where E[X] is the expected value of X This is implemented using floats to handle scaling of all variables.
[in] | *array1 | The first array |
[in] | *array2 | The second array |
[in] | n_elements | Number of elements in the arrays |
Definition at line 78 of file pprz_stat.c.
References foo.
Referenced by variance_i().
Compute the mean value of an array (float)
[in] | *array | The array |
[in] | n_elements | Number of elements in the array |
Definition at line 122 of file pprz_stat.c.
References array, foo, and sum_f().
Referenced by cloud_sensor_callback().
Compute the mean value of an array This is implemented using floats to handle scaling of all variables.
[in] | *array | The array |
[in] | n_elements | Number of elements in the array |
Definition at line 39 of file pprz_stat.c.
Compute the sum array elements.
[in] | *array | The first array |
[in] | n_elements | Number of elements in the arrays |
Compute the sum array elements.
[in] | *array | The array |
[in] | n_elements | Number of elements in the arrays |
Definition at line 106 of file pprz_stat.c.
Referenced by mean_f().
Compute the variance of an array of values (float).
The variance is a measure of how far a set of numbers is spread out V(X) = E[(X-E[X])^2] = E[X^2] - E[X]^2 where E[X] is the expected value of X
array | Pointer to an array of float |
n_elements | Number of values in the array |
Definition at line 139 of file pprz_stat.c.
References array, covariance_f(), and foo.
Referenced by baro_cb(), cloud_sensor_callback(), and cloud_sensor_init().
Compute the variance of an array of values (integer).
The variance is a measure of how far a set of numbers is spread out V(X) = E[(X-E[X])^2] = E[X^2] - E[X]^2 where E[X] is the expected value of X This is implemented using floats to handle scaling of all variables
array | pointer to an array of integer |
n_elements | number of elements in the array |
Definition at line 64 of file pprz_stat.c.
References array, covariance_i(), and foo.