What time is it? and Where am I? – two seemingly simple questions but just look what happens when you start to explore the depths of the questions.
Mario Corchero is doing a talk on It’s time for datetime at PyCon coming up in May. “We will also speak about different standards of time, time zones, Daylight Saving Times, leap seconds, serialization and datetime arithmetics.”
Working with time is not a trivial challenge. Python includes a native module in the standard library to work with it but datetime keeps being together with unicode a common source of errors. This often leads to the widespread of many other libraries in the attempt of easing the work of working with datetime. Datetime is one of those API that looks easy to use but given the many concepts around time, is it easy to get backfired if the developer has not solid knowledge about the them.
Those are the issues at the bottom of an NTP stratum server based on GPS time. Fortunately most of the shenanigans can be left to the client so the server part can be simplified.
Another case where these issues got interesting is trying to put together a standalone clock with a Picaxe board and a clock chip. Setting the clock was a challenge for human interface ideas. Automatic DST adjustments were another can of worms entirely.
On the ‘where am I’ front is Chris Rizos And Donald Grant with How GPS keeps up with a continent in constant motion. How can you keep GPS and the map copacetic?
The Australian continent, perched on the planet’s fastest moving tectonic plate, is drifting at about seven centimetres a year to the northeast. This is taking features marked on our maps out of line with the global navigation satellite systems (GNSS) such as GPS.
These reference points and their coordinate system of latitudes, longitudes and heights are called a geodetic datum. Every country has its own datum, and the one Australia has used to date is called the Geocentric Datum of Australia 1994, or GDA94.
Satellite positioning systems – such as GPS, the Russian GLONASS, the European Union’s Galileo and China’s BeiDou – give coordinates based on a datum that is not fixed to any continent, but rather the average of all continents. So the coordinates of fixed features on the Earth’s surface, such as the Australian continent, are always changing, like slow-moving ships at sea.
Historically, coordinate differences of a metre or so have not been an issue, because positioning systems have not been accurate enough for users to notice. When GDA94 was first introduced, the GPS locations were only accurate to around 100 metres and sometimes much worse.
But two important things have happened since then. Australia has moved about 1.6 metres northeast, effectively moving the location of mapped features and their associated GDA94 coordinates.
At the same time, positioning technology has evolved considerably.
There are really two issues here. One is a model for the shape of the earth for an accurate location coordinate and the other is a map of features on that earth. Most GPS systems use a fairly simple sea level datum but allow you to choose from among the most common.See Wikipedia on Geodetic Datum. The math can be rather interesting at it is trying to model complex shapes in three dimensions and those shapes have a lot of interesting important features.
Chasing Australia as it moves northeast presents another challenge. Rather than update maps on a regular basis, the GDA94 datum might be updated instead. See Esri Australia Technical Blog Australia is on the move GDA2020.
Fasten your seatbelts!