Monday, 5 December 2011

Getting started with SpotLog


brief guide for people testing spotLog


SpotLog has three main areas:
  1. The notepad, where you enter sightings
  2. The data book, which holds details of classes and locomotives
  3. The log, which is the log of sightings.
We need to start with the the data book.

The Data Book

Click the book tab (second tab) to get to the data
book.

If you have not yet imported or created any railway or class definitions, these pages will be blank.

The databook is organised in layers, 
  • The top layer is the "Company" or "Railway" layer - for example a databook set up for Switzerland might have railways "Rhatische Bahn", "SBB, "BLS" "MGB" etc.
    For the UK you would probably have "Mainline", "London Underground", "Croydon Tramlink" etc.
  • The next layer is the class layer (see first screenshot above).  You get to the class layer by clicking on a railway record in the railway list.  The class layer shows all the classes for a given railway.
  • The third layer - loco layer (second screenshot) shows class detail, by clicking on a class in the second layer, you get to the detail record for the class which shows all the locos in that class.
  • (Not yet implemented) it will be possible in due course to go down to a fourth level to see details of an individual loco
Creating records in the databook

The first thing we need to do is set up some railway and/or class records in the databook.  This can be done two ways, either by creating the records by hand, or by importing a data definition file.

To create a railway record
  • Click the Databook tab
  • Click the menu button and select "New Railway"
  • A blank form for the company/railway opens, enter railway details in the three boxes:
    • Railway Name (eg UK mainline railways)
    • Company initials (short ref)  (eg UK)
    • Any notes about the railway
  • Click Add
The new railway record should then appear in the databook view, you can click on the entry to see classes defined for that railway, or long-click it to edit the record.

To create a class record
  • Click the databook tab
  • Click the menu button and select "New Class"
  • A blank class form appears, complete the boxes 
    • Select the railway this class applies to
    • Enter the class code (eg "66")
    • Enter the number range (eg 66001 to 66250)
    • Enter a note if required
  • Click Add
The records for this class will be created in the databook  (this can take a little while if the number range (as above) is large)

At the moment, the only data for each class is the class name, the number and a brief note.  I plan to add space for more data, such as build data, technical info and/or link to a web page, eg wikipedia page.

You should now have one railway and one class defined in the databook:  When you click the book tab, the railway (UK) will be displayed, click the railway to see the list of classes defined for that railway (ie just "66" at the moment) and click the class record to see the list of loco's (66001 > 66250 if you followed the steps above).

To edit a class record


You can edit the class record (or the railway record) by clicking on the record and holding your finger down (long-click) this will open the record in the same form as above to edit and update it (or delete it).

Hint where a class has gaps in its numbering, eg UK Class 66 is 66001-66250 then 66301-66305 etc you use the edit option to add the additional number ranges, eg create the record as above - this creates the entries for 66001 to 66250, then edit the class 66 record and change the number range to 66301 to 66305 - now when you click "update" numbers 301-305 are created (and the original 001-250 are kept).  You can repeat this to add other ranges, eg 701-746 as required.

Exporting and Importing data definitions


You can export a class definition to an external file and then reimport into the application.  Thus if someone has gone to the trouble to enter all the data for the class 66 (for example) they could then share that definition with other users.  Users are encouraged to share definition data ;-)

You can export definition data at the level of Class or Railway.  If you export a class, only that class data is included in the file, if you export at the railway level, all data for that railway and all its classes is exported to a single file.

Export is in XML format:


<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<Definition>
  <Company Code="UK Mainline railways" Name="UK "> 
    <Class Code="66"> 
      <Loco Number="66001"/> 
      <Loco Number="66002"/> 
      <Loco Number="66003"/> 
      <Loco Number="66004"/>

etc

To export a data definition.
Select the Book tab, and navigate to the railway or class you want to export, select "Export Defs" from the menu, choose a suitable file name and location, and the XML file will be created.


To import a data definition
You can import files in two formats 1) XML (As above)  2) Tab separated text files
To import a file, load the file onto the device, select the Book tab and click the menu button, select "import" and navigate to the import file, the data will be imported into the database and will update any existing records.

Text file format
You can import text files into the database, the text file format should be a line for each record with company code, class code, number and name separated by tabs:

Company Code<tab>Class Code<tab>Number<tab>Name

The text file provides an easy way to import bulk data from other sources, eg spreadsheet, as it is generally easier to edit the text file than the XML file. 


Loco names and other information  each loco has an additional field, intended for holding the loco name, it could also be used for things like livery information.  At present the only way to put data into this field is by editing the XML or TXT input files and importing the info.  The ability to edit this info within the application will be added soon.

Once we have some information in the databook we can turn to the notepad page

The NotePad
The notepad is the page for recording loco sightings:

This screen is designed to provide an easy and quick way of capturing loco sightings

The first, and most important box is the top left "Num" box - this is where the numbers are entered.  Numbers can be entered using the normal device keys, or the large number pad on this screen.
You can also provide additional information such as railway (enter the railway short code), location or a note in the other boxes provided.
Note that the railway info and location info is only used if the tick boxes next to the text fields are ticked.
The "clr" buttons may be used to clear the location and note boxes if required.

Once information, primarily the number, is entered, click "Add" to record the sighting.  Note that there are two "Add" buttons, the left hand "Add" button records the train sighting, the righthand "Add (P) button does the same but with the additional information that a photograph was taken of the train.

When you click "Add" or "Add(P)" the information is added to the list below the number pads and the application will try to match it with a record in the databook.  While the matching process takes place, you can carry on entering numbers using the notepad.
When you click the add button, you will see the record appear at the top of the list under the number pad, and then disappear again once it has been matched - once it has disappeared, look in the databook or the log to see the record.


How the matching process works:

  • If no railway code is given, the program looks for a unique match of the number with loco's defined in the databook.  If there is a match and only one match, the record is applied to that locomotive.
  • If a railway code is given, the program looks for a unique match of the number with loco's defined for that railway in the databook.  If there is a match and only one match, the record is applied to that locomotive.
  • If the record can not be matched, or matches more than one loco record, the record is left in the notepad list.

Example using Swiss RhB and MGB railways:

  • I enter "107" using the notepad keys and click "Add"
  • The record for 107 appears in the list under the notepad and the matching process starts.
  • The matching process will find that there are two possible matches for 107:  a) an electric loco belonging to the MGB b) a steam loco belonging to the RhB. Since the matching process can not resolve this ambiguity, the record is left in the notepad list.
  • If I had entered the railway code "MGB" and ticked the railway box, the matching process would have been able to resolve the record and add it to the log.
Resolving Ambiguities
If a record is not matched, it can be edited to get a match with the database.

To edit a record, click it in the notepad list - the data is removed from the list and put back in the notepad form - it can then be edited, or information such as company added and then the "Add" button clicked again.

Example - using the same information as above
  • "107" has not been removed from the list, so I need to add or change information.
  • Click the record in the notepad list - the data is loaded back into the form
  • I enter "MGB" in the railway box and tick the railway tick
  • I click "Add"
  • The information - including the railway code is added to the notepad list and the match process is started
  • This time - with the extra information, an exact match is found, so the record is transferred to the log and removed from the notepad list.

In future it will be possible to resolve ambiguous matches with a form, eg in the above example clicking the record would pop up a form with a choice of "RhB Steam loco" or "MGB Electric loco", selecting one would enter the record against that loco.


Viewing records

Once entered, you can view records in two places:

  • The log shows a time sorted list of records with newest at the top and older ones below.  The log shows the loco recorded, the location and if a photograph was taken.
    it will be possible in future to click a record to go to the entry for that locomotive.
  • The databook shows records against locomotives, so going down to the third (loco) level in the databook shows a tick against locos that have been seen.  In future it will be possible to click a loco to see the records for that specific locomotive.


And more


This is a very new application and will continue to develop, future additions will probably include:

  • Add GPS location to a record
  • Output log as formatted HTML
  • Support for UIC loco numbering
  • Ability to enter or import historic data (at present all records get timestamped with current time)
  • Resolve matches in notepad list
  • Choose columns seen on log screen
  • Ability to temp disable a railway from matching, eg if I'm in the UK I might disable swiss railways as I'm unlikely to see any swiss locos ;-(
suggestions for other features are welcomed

No comments:

Post a Comment