Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great read! The bit about the time stuck out at me. With Internet access comes `ntp`, but without it... just how well tuned is the timekeeping circuit in cellphone chipsets, and how much did that even matter?


Cell towers require precise timing for a variety of reasons and phones can synchronise to that time source. Phone clocks are good enough that as long as you don't go too long between seeing cell towers then your signal isn't going to have walked too much.

The way they're using them, it sounds like 1 second resolution is easily sufficient. That would be achieved by a 1 ppm accuracy crystal (fairly standard) that is synchronised once a week.


Cell phones can receive GPS signals which are a very accurate source of timekeeping.


Is that right? The way I understood it, GPS works like a kind of triangulation, with your distance from the satellites being calculated based on how long the time-stamped signal takes to travel to you. Meaning your device has to keep its own very accurate time in order to be able to compare.

But the phone can get the time from the cell towers.

I may be wrong, this is just a layperson's understanding :)


If you have an atomic clock in your GPS device, you need to see 3 satellites to get a fix. As you said, you calculate travel time for the signal from the atomic clock on the satellite to the one on the receiver and that puts you somewhere on the surface of a sphere. Two spheres intersect to give you a circle, and a third gives you a point (technically 2, but one is probably in space).

Doing it like that would require you to have an atomic clock in every receiver though, which isn't feasible (and anything less accurate would make the fix too inaccurate). Instead you add one extra variable (current time) and one extra constraint (extra satellite) and the equation is solvable again. This is why you need 4 satellites for a fix. The solution to the equation not only gives location but also precise time, which is why GPS receivers can be used as standalone time references.

The other thing you need to know to do all of this is where the satellites actually are: this information is called the ephemera and the almanac. You can download this from the satellite signal, but it is very low data rate and takes several minutes. This is why handheld GPS receivers can take time to get a fix. Mobile phones instead download this from the network which is why they can make very fast fixes - they just need to scan frequencies to get a lock while doing the download and then do a bit of maths.


As far as I understand it, the only things a receiving device needs to work out where it is are a stable timer, a good view of the sky and time.

Each satellite transmits where it is and the current time in UTC, which means you can get a pretty good idea of what the time is (presumably to within a second) by picking up a single satellite's transmission, then work out what the actual time is once you've got all the other satellites and triangulated yourself.

Phones can do this a lot faster by connecting to the internet to figure out what the time is, what the satellite orbital parameters are and where they all are right now.

(Sources: A friend explained this to me once and I just skimmed the wikipedia page)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: