One of the most challenging parts of being a pilot can be knowing when to keep a plane out of the sky.