Aircraft could be equipped with onboard AI to help with midair stalls and sharp altitude drops, researchers have said.