A method, comprising: receiving, by one or more communication interfaces of a server, a plurality of global positioning system, GPS, signal samples and corresponding time stamps from a mobile device; identifying, by one or more processors of the server in response to receiving the plurality of GPS signal samples, a set of visible satellites and for each visible satellite a corresponding Doppler frequency and code phase from the GPS signal samples; requesting, by one or more processors of the server, ephemeris data of the visible satellites from a database; determining one or more regions in which the mobile device may be located by using the Doppler frequencies and ephemeris data corresponding to the visible satellites; identifying, by one or more processors of the server, a set of possible reference locations within the one or more regions; and determining, by one or more processors of the server, a set of possible locations corresponding to the received GPS signal samples at least in part by applying coarse time navigation, CTN, calculation using each of the reference locations, each of the possible locations corresponding to one of the reference locations identified, the set of possible locations including a location of the mobile device; wherein said CTN calculation determines the possible locations using the time stamps and the code phases from the GPS signal samples without decoding the GPS signal; wherein the set of possible locations includes at least one shadow location, the method further comprising eliminating shadow locations to determine the location of the mobile device, wherein eliminating at least one of the shadow locations comprises restraining the set of possible locations to a range near the Earth's surface. receiving, by one or more communication interfaces of a server, a plurality of global positioning system, GPS, signal samples and corresponding time stamps from a mobile device; identifying, by one or more processors of the server in response to receiving the plurality of GPS signal samples, a set of visible satellites and for each visible satellite a corresponding Doppler frequency and code phase from the GPS signal samples; requesting, by one or more processors of the server, ephemeris data of the visible satellites from a database; determining one or more regions in which the mobile device may be located by using the Doppler frequencies and ephemeris data corresponding to the visible satellites; identifying, by one or more processors of the server, a set of possible reference locations within the one or more regions; and determining, by one or more processors of the server, a set of possible locations corresponding to the received GPS signal samples at least in part by applying coarse time navigation, CTN, calculation using each of the reference locations, each of the possible locations corresponding to one of the reference locations identified, the set of possible locations including a location of the mobile device; wherein said CTN calculation determines the possible locations using the time stamps and the code phases from the GPS signal samples without decoding the GPS signal; wherein the set of possible locations includes at least one shadow location, the method further comprising eliminating shadow locations to determine the location of the mobile device, wherein eliminating at least one of the shadow locations comprises restraining the set of possible locations to a range near the Earth's surface.