For issue #19: Took 50 measurements of 3 different colors (white, grey, black) on 15 different real Kilobots. Then analyzed the measurements to find the distribution of each of these colors. I found that the standard deviation of the light measurements depends on the intensity of the light being measured (more light->higher standard deviation). I then fit a second-degree polynomial to the std_dev of the measurements I took. Each time get_ambientLight() is called, the standard deviation polynomial uses the noise-free measurement to find the std_dev at that specific measurement. A normal distribution random number generator finds the measurement with noise.
I'm going to wait to merge this until we figure out the multi-threading issue, in case the problem is related to the threaded random number generation.
For issue #19: Took 50 measurements of 3 different colors (white, grey, black) on 15 different real Kilobots. Then analyzed the measurements to find the distribution of each of these colors. I found that the standard deviation of the light measurements depends on the intensity of the light being measured (more light->higher standard deviation). I then fit a second-degree polynomial to the std_dev of the measurements I took. Each time get_ambientLight() is called, the standard deviation polynomial uses the noise-free measurement to find the std_dev at that specific measurement. A normal distribution random number generator finds the measurement with noise.