News flash


New release: 1.09

What's new
To Do

LACs and Cells

Nokia Python
PyS60 on Sourceforge
Py2sis for linux OS/X
Guido's clock



Suppose we are on a train. If we can guess where we are and know what time it is then we should be able to guess how late the train is running and its estimated time of arrival at its destination.

In a typical train journey the number of cell towers you encounter will outnumber the number of stations listed on the timetable. To get good estimates of how the train is progressing we really need to know what time it should encounter each cell tower.

The simple way to get these times is simply to record the times for a typical journey. Anorak allows you to save a log of the times you encounter each cell tower on a particular journey.

Next, anorak requires information from the train timetable for each train you are interested in.

Anorak was intended for commuters on train journeys, but of course the timetable features can be used for any regular journey that you might make.

This documentaion just talks about trains for simplicity. Substitute bus, coach, bicycle, walking etc as appropriate.

Setting it up, the hard way

A little work is required to set up timetables for your phone.

Where to put the files

Anorak stores all data in foo/../data/anorak, where foo is the apps folder on your phone. On my phone this is E:/System/apps. The train information should be placed in the trains sub-folder of the data/anorak.

Timetable index

First, you need to create a simple index file, something like this:
     heuston_18.00, heuston-kildare.itn
     heuston_18.35, heuston-kildare.itn
     heuston_20.35, heuston-kildare.itn
     heuston_21.45, heuston-kildare.itn
     heuston_09.00, heuston-kildare.itn
     kildare_07.43, kildare-heuston.itn
     kildare_07.54, kildare-heuston.itn
     kildare_08.11, kildare-heuston.itn
Each line field should be a file that also exists in the trains folder. The first field is a timetable file, the second an itinerary, as explained below.

Timetable entries

Timetable entries just give the timetable for the train and should look something like this:
     Kildare,      19007,  6820,  7:54
     Newbridge,    19007,  7834,  8:01
     Heuston,      12007, 61805,  8:39
There are four fields per record:
  1. Name of station
  2. LAC code for nearest cell tower to station.
  3. Cell id of nearest cell tower to the station.
  4. Time that the train is at the station.


As mentioned above, there are more cell towers than train stations, so we need a bit more information to provide good estimates on how a train is progressing.

This is where itinerary files come in. The idea is to provide timings for a sample journey along your route. The anorak code can then adjust these timings to the timetable for your particular train and hence estimate what time the train should encounter each cell tower along your route.

Note that a single itinerary file can be used for all trains along a particular route.

Below is a snippet of an itinerary file.

    1140424784, 19007, 6820, Kildare station
    1140424794, 19007, 7807, Curragh East
    1140425290, 19007, 7809, Kildare station East
    1140425361, 19007, 7819, Curragh
    1140425428, 19007, 7836, Newbridge West
    1140425464, 19007, 7834, Newbridge
There are four fields per record:
  1. Unix timestamp. Can actually be on any base, all that matters are the relative values and that the values are in seconds.
  2. LAC code for nearest cell tower to station.
  3. Cell id of nearest cell tower to the station.
  4. Description for the location.

Creating an itinerary

From the train tab you can select Start recording. anorak will prompt you with a name for the new itinerary file.

Once you have started recording the details of each cell tower you encounter will be collected.

When you reach the end of your journey, select Stop recording from the trains menu. The itinerary will be saved.


Examples for Kildare to Heuston trains can be found here.

Creating a timetable entry

Select Add journey from the trains menu. anorak will prompt you with a name for the new journey file.

Next you will be asked to select an itinerary file to use for the journey.

Once you have selected the itinerary file you will be shown the locations along the itinerary. Starting with the first stop on your journey, selecte the nearest location for that stop and enter the time for that stop.

Repeat until you have entered all the stops along your route.

Often you can manage just entering the times for the start and end of your journey.

Anorak interface to trains

Once you have trains information loaded onto your phone you should be able to select a train from the menu on the trains tab.

Once a train is selected the train tab shows where you are and how late/early your train is together with the ETA at the final stop for your timetable.

The log tab also displays the ETA at destination.

ETA display on Guido's clock

For good measure, if you have a train selected the clock tab will show your eta, in red if you are running late and green if early.