Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Functions | |
void | init_random (void) |
double | rand_uniform (void) |
double | rand_gaussian (void) |
Functions for getting random numbers. The rand_gaussian() internally uses the rand_uniform(). rand_uniform() uses rand() internally which is initialized with the current time on rand_init(). This means that the board doesn't need an internal rng but comes at the cost of more computations.
Usage: rand_init(); // initialize once
float random_number = rand_uniform();
Definition in file pprz_random.c.
void init_random | ( | void | ) |
Definition at line 35 of file pprz_random.c.
References get_sys_time_msec().
Referenced by sys_id_chirp_init().
double rand_gaussian | ( | void | ) |
Definition at line 53 of file pprz_random.c.
References rand_uniform().
Referenced by set_current_chirp_values().
double rand_uniform | ( | void | ) |
Definition at line 45 of file pprz_random.c.
Referenced by rand_gaussian().