You may not be able to climb straight ahead sustainably more steeply than the terrain rises. In fact, even a Pitts probably can’t maintain even a 30 degree climb for a great distance. Certainly there’s plenty of mountains and even a few hills steeper than that.
What you can do, unless you start real slow, is half-Cuban out of the canyon. Your forward progress into the cul-de-sac ends when you pass vertical going uphill. The fact your airspeed is decaying like mad doesn’t matter either as long as you can get past level inverted before you run out. It doesn’t matter if the cliff face is 5 miles tall at that point; you’re going the other way.
In addition to shiny jets I also flew low-speed tactical airplanes for USAF. They were not nearly as powerful or as G-capable as a Pitts, but we still flew them aggressively within their power & G limits. One of the big things aerobatics teaches you is how to really use all 3 dimensions. Most lightplane pilots operate it like a 2D car that’s able to gradually climb or descend in addition to 2D turning and that’s about it.
Anecdote/war story.
While in USAF stateside I once rented a 172 and went flying with another USAF officer who was a private + instrument rated pilot but not a USAF flyer. We’re out noodling around seeing the sights from a couple thousand AGL. She points out something back at around our 4 o’clock she wants to see. I had the controls.
Without much thought I go to full power, pull up to about 30 degrees nose high, roll right to about 120 degrees bank, and pull through at 2-ish Gs going to idle as we start building speed. In just a few seconds we’ve changed direction 180 degrees, offset laterally almost not at all, lost 500 feet, and the target is filling the windscreen. Non-event for me; I’d done it hundreds of times in sorta-similar aircraft; the next move we couldn’t complete that day is to stuff a rocket into the target then pull off and go find something else that needs shooting.
Barely halfway through the turn she lets out a squeal I’d never have expected from either her personality or her flying history. Turns out her flying repertoire ended at 60 degree “steep” turns in level flight. This was not something she believed a 172 would or could do survivably. This was utterly outside her experience base, much less her comfort zone.
The point is *not *“ain’t I cool.” I’m not. The point is her idea of the capabilities of the airplane covered barely 10% of what it could do. That is IMO a massive failure of training. Conversely, Richard’s immediate and casual “Just go vertical and leave the other way” bespeaks the all-envelope thought processes common to aerobatic pilots.
Absent altitude to spare, my rocket attack is not a good escape maneuver in a 172; you will bottom out lower than you started.
But a wingover-like maneuver can get you out of a box canyon that a level steep turn won’t. Unless you’re already so slow and so close to your service ceiling that pulling the nose up even a little drops you down to a speed where you can’t pull >1 Gs without stalling.