From
https://news.ycombinator.com/item?id=21409114During those first few seconds after I hit the Autoland button, the system went through a series of complex calculations and decision-making processes to determine the nearest suitable runway based on runway length, width, and surface; fuel remaining; crosswind component; terrain; obstacles; and general weather information. The system requires an RNAV approach, but beyond that, the runway and weather criteria can be decided by the airframe manufacturer.
The system even forecasts its own weather if the nearest suitable runway is a significant distance away, long enough that the current ADS-B or SiriusXM weather may not be valid. It uses the latest weather trend information, for example, to determine if a thunderstorm might move into the runway environment where it intends to land. It will route the airplane around thunderstorms as well as terrain and obstacles, all of which it gets from its internal databases. If en route to a runway it determines, because of changing weather conditions, that another runway is closer or more suitable, it will change its destination. It can even estimate changing barometric conditions and adjust the altimeter—using algorithms. Garmin engineers say the calculated barometric readings are within 0.01 inches of mercury of actual ambient conditions.