This is a problem that has a trivial non-technical solution that NYC should have implemented decades ago: Put a compass rose outside every subway station exit.
It's an obvious enough solution that some Chaotic Good souls took it upon themselves to spray-paint compass roses on the sidewalk outside a few stations in Brooklyn.