The same real-time early warning signals that prevent drones from losing control could one day tell your self-driving car that something is about to go wrong.