implement the flatzone detection, implement is_in_flatzone(), stats->flatzone_detected in defined
improve the documentation