Scattering matrices and scattering geodesics of locally symmetric spaces