How does GPS detect coordinates?
The GPS receiver projects the XYZ coordinate that it finds from trilateration (or quadrilateration) onto a oblate spheroid model of the earth to find the latitude and longitude. Some fancier chipsets even have a (very coarse) height model of the earth that it uses to back-calculate latitude and longitude.