GPS tracking and statistics

I’ve always had “a bit of a thing” for GPS devices, and have owned a dozen or more for different purposes – CF card receivers that plugged into Windows Mobile devices, a Garmin standalone device for hiking, a TomTom when I owned a car etc. Of course these days every smartphone has GPS built in – but as ever with such convergent devices, the battery life is the problem.

A few years ago I wanted to start geo-tagging my photos. Although a few more cameras now come with GPS receivers, it’s still not a common feature. But the way around it is to log your position every few seconds, and then use these data when you get home to tag photos with their position. The key thing here is to make sure that the camera has the correct time set, and then software interpolates between subsequent GPS points to find an approximate location for the picture, and writes these data into the EXIF header.

There are quite a few devices that do this, but my latest is the PhotoTrackr Mini (DPL900). With a 17 hour battery life and a 2MB flash memory storing up to 250K points it is easily capable of recording a day hike or bike with 1 s resolution.

Gisteq PhotoTrackr Mini
Gisteq PhotoTrackr Mini

Since I use Ubuntu, the bundled software doesn’t get used. Fortunately the Skytraq chipset is well supported by other tools, in particular gpsbabel which, as the name suggests, is capable of grabbing GPS data from a range of devices and converting into different formats. For those interested, data can be dumped and erased with:

gpsbabel -i skytraq,erase -f /dev/ttyUSB0 -o gpx -F gpsdata.gpx

I usually then use gpscorrelate to read a set of files and a GPS track, perform the interpolation and write the data back to the photos. All in all a pretty painless experience.

But it’s not just about tagging the location of photos, as a data junky one can never have too many data! Being able to look back at speeds, distances, altitudes etc. is very cool. And because I’ve just found the WP-GPX-maps plugin, here are some data from a recent bike ride:

Download file: bike.gpx

Neat eh? 🙂 And of course this is only the tip of the iceberg – aggregated over time such statistics can be great for training – of course these days there are a million and one apps to help you do this, but there’s still something neat about Doing It Yourself.

Where is Rosetta now?

The Rosetta spacecraft is currently in hibernation, but is heading back towards the inner Solar System – getting warmer and happier! Despite having large solar panels to collect the Sun’s light and turn it into electrical energy, at it’s farthest from the Sun Rosetta just doesn’t get enough juice to keep all of the on-board systems running. To get around this, the spacecraft was all but switched off for the coldest and loneliest part of the journey.

Although we’re out of contact with the spacecraft, unless something unexpected has happened we are pretty sure we know where it is! ESA have produced this nice app to show the entire trajectory from launch until the end of mission – that’s a journey of 10 years! Unfortunately it seems to be only available in German, but hopefully it’s still clear. On the left side of the app “Ereignis” lets you choose an event – by default the app shows “Jetzt” – now – and gives you the up-to-date position of the spacecraft.

Along the bottom you can re-centre the view on various objects – for now the comet and spacecraft are the most interesting! Finally you can change the zoom level at the top, and hit the play button to run an animation forward in time. As you can see we’re almost at the comet!

[kml_flashembed movie=”” width=”625″ height=”491″ /]

All being well, Rosetta will wake up on schedule on Monday 20th January 2014, call home, and let us know that everything is fine. Then it’s all systems go as the spacecraft trajectory is adjusted to put us on our final intercept course to intercept and land on a comet!

Evernote on ubuntu

Evernote is one of the few apps that I regularly pay real money for – as productivity apps go, you really can’t beat it! For those who don’t know it, Evernote is a note taking application that syncs to the web. It has clients for Windows, Mac, various mobile platforms and a pretty full-featured web interface. Each note can contain rich text, “clippings” from web pages, and file attachments. Notes live in notebooks, which can be grouped into stacks (e.g. I have one notebook per project, and all of my work notebooks in a stack). In addition, notes can be tagged, are full-text searchable (including inside images and PDFs!) and there is a comprehensive power-user-friendly search syntax.

The typical usage case that Evernote gives is snapping a picture of a wine bottle, having the label automagically searchable from any client etc. For me, Evernote is more of an electronic lab notebook – in fact I discovered it in 2008 whilst trying to fulfil that need. Before this I was using a blogger weblog to store my notes – mainly so that I didn’t have to lug paper between my office and lab during my PhD, and so that it was always backed up and in sync. Since then I’ve moved from mainly being a Windows user, to exclusively using ubuntu, and now also Android. The mobile clients are really coming along in leaps and bounds – offering full offline sync for Premium users, and a nice tablet-friendly interface (great for my Nexus 7). But the linux space is not so lucky. Unlike some other companies (Dropbox, Google, Spotify etc.) Evernote chose not to develop a linux client; this was no doubt a wise strategy given the low number of users. They do, however, provide an well-documented API, in theory allowing a client to be built for any platform.

My first experience of using Evernote on ubuntu was using the Windows client via wine; with the current version of the client this works surprisingly well! However, a few things don’t work (import folders etc.), and it can be a bit “finicky”. In addition in the latest ubuntu (12.04 and above) there is a problem connecting with SSL – however, installing an older version of wine (1.4) using PlayOnLinux works OK.

Fortunately, a project sprang up to fill the gap and provide an open source native (well, java/QT!) client: Nixnote (formerly Nevernote). This is a fully-fledge desktop client which syncs with the Evernote service, and it probably ties with my web browser for the app I spend most time in! Pretty much all of the Windows/Mac client functionality is reproduced; in fact there are some great novel features like embedding LaTeX equations, and offering a “quick link” function which creates inter-note links based on the highlighted text. On the downside it takes quite a lot of memory. However, Nixnote 2 is under development, which should offer some improvements in this area.

A newcomer to the scene is Everpad, which doesn’t aim to be a complete desktop client as NixNote does, but offers excellent integration with ubuntu and unity. Everpad runs in the background and synchronises all notes, and then provides a few ways to access them. A unity lens allows one to search and filter notes, an indicator applet shows the most recent notes (and “pinned” favourites), and a unity launcher provides a shortcut to create a new note. The note display and editor is atypical in that it separates out attachments, rather than displaying them inline, but it is early days and the app shows a lot of promise.

As well as these client apps, there are various web services which integrate with Evernote via the API. For example the online markdown editor markable imports and exports notes from your Evernote account.

To sum up – I’m “happy-ish” with the various solutions for using Evernote on linux – none is quite as robust or slick as the Windows or Mac desktop clients, but Nixnote and Everpad both have unique features. So give them a try – and let me know if you have another solution!

Comets and asteroids – spot the difference

Warning: Undefined variable $list_found in /customers/b/3/e/ on line 213

The images that comets and asteroids bring to mind are quite different – we typically think of comets as being bright objects with long tails, and asteroids as being dead lumps of rock. But in fact at closer inspection the differences are not as great as you might think! Comets and asteroids typically have different orbits – this is one of their key defining parameters. And of course comets, which typically spend much of their time in the outer reaches of the Solar System, undergo dramatic changes each time they pass close to the Sun.

As comets heat up, ices present underneath the surface sublimate (that is they transform directly from solid ice to a gas) and stream out from the comet, dragging along ice and dust particles from the surface. Once free, these dust grains suddenly find themselves being pushed this way and that by a variety of forces – the gravitational field of the comet, the gas flux, and even the tiny but incessant force of sunlight. Over time these particles evolve into the “coma”, the long tail of the comet which can span half the Solar System, with the heart of the comet (the “nucleus”) being reduced to an invisible spot hidden by the bright coma.

Fred Whipple and the dirty snowball

Looking at a nucleus far from the Sun, however, shows a quiet different picture. The old picture of comets was that of a dirty snowball, as shown in the picture to the left. However, all of our recent spacecraft flybys have shown that the comet nucleus is in fact dark and hot – and even when active, this activity is confined to only a small fraction of the surface. In fact the images of inactive comets and asteroids are so similar that you would be hard pressed to tell the difference from a picture alone. This of course raises the question of whether or not there really are two distinct classes of object, asteroids and comets, or merely a single broad family of objects, some with more ice, some with less, some in cometary orbits, and others captured and bound to the inner Solar System. In fact there is a session dedicated to just this question (“The asteroid-comet continuum“) at this year’s EPSC (European Planetary Science Congress). You can see for yourself by taking a look at this neat picture produced by Emily Lakdawalla showing all of the comets and asteroids so far visited by spacecraft:

All asteroids and comets visited by spacecraft as of June 2010 (click for high resolution version)

It is immediately clear that amongst the small bodies we have visited, the asteroids are larger; indeed the largest comets we know are considerably smaller than the largest asteroids. But a close up of either reveals very little difference – or, rather, many differences (since every asteroid and comet shows a unique surface), but very little to distinguish the two classes of object.

Schematic layered comet model (Prialnik, 1997)

What I find really interesting here is that the existence (or not!) of the cometary coma, an object that can be enormous, and has been a potent symbol for cultures through the ages, depends critically on the very outer layer of the already rather small cometary nucleus. For a comet to be active, heat has to penetrate through the dust crust (the hot, dry, outer layer of the comet) to the pristine ice, during the small time window when the comet is close to the Sun. Typical comet models, like the one shown (from this paper), assume that during each passage the ice “front” retreats deeper in to the nucleus, and a fraction of the overall mass is loss as gas, dust and ice emissions. It used to be thought that this ice front, or equivalently the thickness of the dust (“mantle”) layer, was at some tens to hundreds of metres depth. However, recent observations – in particular the NASA mission Deep Impact – have suggested that ice can be found only a few centimetres below the surface. So now the story is really interesting! The existence of the coma, which can evolve to billions of kilometres in length, depends on a covering of dust a mere few centimetres thick! If the dust mantle is thick enough, heat doesn’t penetrate to the ice layer at all, and the comet can become dormant – effectively looking like an asteroid.

The ease with which heat flows through a material is described by its thermal conductivity – materials with low conductivity are good insulators, whereas highly conductive materials allow heat to flow easily. Thermal conductivity is a straightforward parameter to measure for large lumps of material; it’s a little harder for granular materials, which conduct heat in a variety of ways non-uniformly! And of course to do this remotely on a spacecraft is even more tricky. Nevertheless, it is a parameter that cannot easily be estimated remotely. Infrared measurements of the surface temperature can help, but you really need to get down and dirty with the comet to get a good measure of conductivity!

Measuring thermal conductivity in-situ on the surface of 67P /C-G is one of primary goals of the MUPUS instrument onboard the Philae lander, part of the Rosetta mission. To do this, MUPUS carries a rather large nail which will be remotely hammered into the surface of the nucleus. With a combination of temperature measurements, and actively heating the surrounding material, MUPUS should be able to study how well heat flows through these vitally important outer layers of a comet. I’ll save the details of that for another post, but you can get a sneak preview in this neat animation produced by the Space Research Institute of the Polish Academy of Sciences (audio in Polish):

So, in summary, comets and asteroids have more in common than first thought – at least from studying their surfaces. How deep these similarities go, and whether we really have an asteroid-comet continuum, or if we just wrongly identify dormant comets as asteroids, remains to be seen! At least with Rosetta we have the chance to study one cometary nucleus in more detail, and to get below the surface as well. One thing is for sure, we will have enough data from Rosetta to keep us happy for at least a few years 😉