BRouter - Beta Version - Setting up the Android App
===================================================

Installing the BRouter App
--------------------------

Download the "BRouter.apk" and install it on your Android.

For instructions how to install from an APK (in contrast to
installing from Google Play), search the internet for tips.
I use "Astro Filemanager" to manage apps. You may need to
change system configuration, some setting like
"Applications->Unknown sources" depending on Android version.

The BRouter App asks for permissions to access the SD-Card
and to de-activate the screen saver. Being an offline app,
it does NOT ask for internet access. The drawback is that
you have to install the additional resources manually.

Installing the OsmAnd App
-------------------------

If you have not yet installed a map tool (OsmAnd or Locus)
, do so now. Get it from Google-Play or look at www.osmand.net
or http://www.locusmap.eu

Before starting to download offline maps, decide for a SD-Card
directory to store them. If appropriate, reconfigure the base-directory
of your map tool to an external device with enough space.


BRouter's SD-Card Directory Structure
-------------------------------------

*** HINT1: USING LOCUS AS MAP-TOOL:
*** the following describes the usage of BRouter
*** together with "OsmAnd". However, using "Locus" 
*** works the same way, just replace osmand -> locus
*** and osmand/track -> locus/mapitems

*** HINT2: new directory names for new version
*** Because starting with BRouter version 0.6,
*** the structure of the datafiles and the profiles
*** changed, the subdirectory names changed as
*** well (profiles -> profiles2, segments -> segments2 )
*** to allow both versions to co-exist (=re-installing
*** the old apk will use the old files)

BRouter guesses a reasonable sd-card base directory and on first
start prompts you for a base directory with it's guess as a default.

If later on you want to change the base directory, you can delete
or rename the 'brouter' subfolder, so it will prompt again for
a base directory. You should choose the same base directory that
is used by your map-tool (OsmAnd or Locus). 

After choosing a base-directory, BRouter creates the 'brouter'
folder and 2 subfolders, so you end up with e.g. following structure:

/mnt/sdcard/osmand         <- OsmAnd's sd-card dir
/mnt/sdcard/osmand/track   <- OsmAnd's track storage

/mnt/sdcard/brouter
/mnt/sdcard/brouter/segments2  <- put routing data files (*.rd5) here
/mnt/sdcard/brouter/profiles2  <- put lookup-table and routing profiles here

So the minimum files BRouter needs to work are e.g.

/mnt/sdcard/brouter/segments2/E5_N45.rd5
/mnt/sdcard/brouter/profiles2/lookups.dat
/mnt/sdcard/brouter/profiles2/trekking.brf

But of course you can put as many routing data files
and routing profiles as you like.

When BRouter starts up, it will create the directories,
but then complain about missing files, so you have to
download and install them manually.

Get the profiles and the lookup.dat from

  http://www.dr-brenschede.de/brouter/profiles2

And the routing data files from:

  http://h2096617.stratoserver.net/brouter/segments2

Routing data files are organised as 5*5 degree files,
with the Filename containing the south-west corner
of the square, which means:

- You want to route near West48/North37 -> get W50_N35.rd5
- You want to route near East7/North47 -> get E5_N45.rd5

From the above link you find routing data for all
places in the world where OSM data is available.

Starting the BRouter Android-APP
--------------------------------

To calculate a route using BRouter, first
find start and end point using OsmAnd and store
them in it's "Favorites" list as "from" and "to"
(as Favorite names, any category will work).

Be careful not to create duplicates, use
"replace favorite" to store new positions.

Then you can start BRouter. It will read the from/to
position from OsmAnd's favorites file, calculate
the route and store the result as "brouter0.gpx"
in OsmAnd's track directory.

BRouter shows a graphical animation of the routing
algorithm, and shows some messages on distances
and ascends. The "filtered ascend" is a measure
for the real hill-climbing pain, with small
variations filtered out.

Then you can use OsmAnd to view or navigate the
route (with spoken directions from OsmAnd!)

If started once more with identical input,
BRouter will store a second route broute1.gpx
for the first alternative.
