Air Force video: F-16 pilot saved by automatic collision avoidance system
arstechnica.com
arstechnica.com
The initial prototype ran on a smartphone aboard a small drone, and they'll make versions for the F-22 and F-35 too.
Just last week an F-18 pilot sadly flew straight into a mountain side here in Switzerland (https://www.yahoo.com/news/altitude-data-blame-mystery-f-18-...), such a system could have avoided that.
And here's a video of the system in testing - it's an almost identical circumstance to the one in the OP: https://www.youtube.com/watch?v=aPr2LWctwYQ