zotbins / waste_watcher

Waste Watcher is an IoT based sensor module to help keep track of waste data metrics such as bin fullness, bin weight, images of waste, etc. This is intended to help quantify waste data and promote actionable solutions to lower the amount of waste people throw away.
MIT License
3 stars 0 forks source link

Ultrasonic Data Mean of Medians Approach #8

Open okyang opened 3 years ago

okyang commented 3 years ago

To ensure reliability of fullness data we want to try implementing this approach.

  1. collect 9 fullness data points
  2. sort the data points
  3. Take the middle 5 values and take the average
  4. Return that average as the fullness data

Changing this script: https://github.com/zotbins/waste_watcher/blob/main/v1/smartbin_sensor_module_v1_demo_version/smartbin_sensor_module_v1_demo_version.ino

okyang commented 3 years ago

@DevPopat, are you interested in this?

patrickanguyen commented 3 years ago

For the sorting, highly recommend using a iterative algorithm like insertion sort instead of a recursive one to prevent stack overflow problems