Why couldn’t I get the GPS coordinates in a remote place?

I went on a trip somewhere in the distance, and I didn’t have mobile access, but I thought that my GPS would work anyway, since the GPS transmitter just relies on satellites. I have the following code to get the GPS location:

mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); mlocListener = new MyLocationListener(); mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mlocListener); 

I tried to record my GPS coordinates, and they turned out to be empty.

Is there something that I am not doing right or that I do not understand?

What can I change so that my phone can record raw GPS data with or without network access?

+4
source share
1 answer

A GPS receiver must have several GPS satellites above the horizon in order to receive the signals it uses to calculate its longitude and latitude. Each satellite transmits this ephemeris information as part of the data stream, but a standalone receiver may take several minutes to scan available satellite frequencies from a cold start (when ephemeris caching information is outdated or incorrect for the current location),

GPS receivers on cell phones often use a "GPS-enabled GPS receiver", where the cellular network occasionally pushes the latest satellite ephemeris of GPS satellites, so the phone already knows which satellites are in sight any given time / location without having to search .

If you don’t have access to the cellular network, your phone may be programmed to return to the satellite to find useful signals, and it may take longer to get your first GPS fix (if it can get everything without the help of an operator) .

+4
source

Source: https://habr.com/ru/post/1394736/


All Articles