One of the worst emergencies that an aircraft could face midair is the possibility of an onboard fire. Even the slightest of indications, such as a cockpit alarm, haze, or smoke, is enough for the cockpit crew to take immediate action and land the plane at the nearest available airport.