The technology exists to physically take command away from a pilot to save an aircraft from imminent collision with the ground and is in operation with the U.S. Air Force.
Developed by NASA, the Air Force and Lockheed Martin, the Automatic Ground Collision Avoidance System (Auto-GCAS), entered service in September 2014 and is already credited with saving at least two F-16sand their crews. A similar automated GCAS system has also been developed bySaab for the JAS-39 Gripen fighter.
The system works by constantly comparing the aircraft’s trajectory with that of a terrain profile generated from an onboard digital terrain database (DTED). If the system detects a threat an evasion command is issued and, if no action is immediately taken by the pilot, the system automatically assumes control. As soon as the aircraft is on a safe trajectory control is returned to the pilot. 
While not considered ‘bullet-proof’, the system is provided as a last resort in case of spatial disorientation, loss of situational awareness, gravity-induced loss of consciousness, and gear-up landings.
In military applications pilots have the option to disarm the system, though for other uses it is conceivable a system that cannot be disabled could be considered.
NASA is working to expand the use of Auto-GCAS to lower-performance general aviation aircraft and unmanned air systems, and has demonstrated its effective use in a UAV equipped with a smartphone in which detailed terrain data for the whole world was compressed into a single sim card.
VIDEO: During a 1-hr. 20-min. flight on the Air Force Research Laboratory/NASAF-16 testbed in 2010, Guy Norris observed a variety of scenarios, many flown at extremely low altitudes and high speed, designed to show how the automatic ground collision avoidance system will prevent mishaps while allowing the full range of tactical flying without triggering nuisance fly-ups.
The Air Force is also developing a related system to automatically prevent air collisions (Auto-ACAS) which will ultimately be combined with Auto-GCAS to provide a fully integrated collision avoidance system.
NASA says the payoff from implementing this technology, designed to operate with only minimal aircraft modifications, could result in billions of dollars and hundreds of lives and aircraft being saved.