HI
I tried to implement a simple GPS tracker. Therefore is used
lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
lm.requestLocatio
Gps simply measures the time a known signal is sent from several satellites. The more satellites in view of your Gps receiver the more accurate your position will be determined relative to those satellites. While the system is prone to some error- background noise (the satellite signal is relatively weak and space is relatively noisy), low precision time piece in your receiver, GDOP: geometric dillution of precision (all satellites grouped in one corner of sky), refraction of the signal due to the ionosphere changing heights,- overall it is very accurate in determining your distance from a satellite. Geometrically you need at least 3 satellites in view to get a position and a 4th to get altitude. More satellites contribute to greater accuracy and in some more complex receivers (not our phones but specifically aviation applications) RAIM: receiver autonomous integrity monitoring, is provided to forecast accuracy in an area and time ie before an aircraft lands...
Altitude is problematic for the gps system because the earth does not curve at mathematical constant. So while the system knows where you are relative to the satellite it must now overlay that on a mathematical model of the earth. In aviation the more accurate Gps receivers must have altitude supplemented with barometers and in some receivers enhanced position due to a known surveyed point comparison (WAAS and LAAS).