Here are some pix of the U-2 from the Basil Dodd era. There were no modern navaids then such as doppler, INS, star-trackers, or ring-lasers.
Navigation depended on meticulous pre-flight planning by a specialist navigator plus an on time U-2 launch.
The pilot used his eyes, pencil, paper, stop-watch, ADF and drift sight.
Pre-calculated manual sun and star shots were also employed. Each shot took a couple of minutes twiddling a knob to keep the celestial body centred & produced a single position line.
The downward looking drift sight - the circular prism in the top centre of the instrument display - could also be made to look upwards to the sky. (All done by mirrors!)