Monday, September 17, 2012

ViewRanger

I am speaking on the point view of a sports tracking user not for this particular app. It just happened to have almost all the features that is required for a proper sports tracking. Therefore, I take this app as the reference.

Tracking sports activity is basic for all sports tracker. It keeps a log of your activity. How well and how accurate the tracking actually depends on the GPS that you have. At times it is accurate while it really foul up at other times. It once reported that I traveled at 600Kph on my bicycle. However basic it is, VR(ViewRanger) has it. Only problem is that the button appears on the map itself. It is easy to touch it by accident. It has no pause but it will prompt you to continue, start new or cancel. It does have auto pause and has a few threshold settings.

Maps is useful if you need to know where you are along the way. Those who have unlimited mobile data plan have no problem showing the maps during tracking. However, if the place is really out of range then you will simply get a blank background. Thus, it is vital that up-to-date offline maps are available. VR have both online, cache and offline maps.

Cached maps are dangerous as it will be automatically erased. Offline map is the preferred choice. This especially critical if you have a number of tracks at different part of the world. You could always go online to download but people without mobile data plans have to pre-load the map before commencing their journey. Therefore, offline map is the best choice. VR even have update feature for the downloaded maps. This means you need not define the map area every time you need an updated map.

Routes are vital if you need to travel through unknown areas or the route has too many twists and turns. Sometimes you need to move through a number of waypoints in a particular order. Routes will allow you to do that. Showing the route on maps is available on some sports trackers.

"Follow route" is one feature that is very useful. It is like navigation. You just follow along the pre-planned route and it worked like a charm. A good navigation app will automatically points to the next waypoint as you go along the route. Some even show you the new plotted route to the nearest waypoint if you went out of the way. VR does not replot the route to the nearest waypoint. It only plot a straight line from your current location to the nearest waypoint. That is one point I am not so happy about. However, if you are off road, no sports tracker will be able to give you any guide any way.

Direction idiots like me have problem reading the map. I am always confused as to which direction I am heading or moving. Good navigation program will provide you a heading direction indicator. It will show the rough direction where your device is pointing at. This will allow you to align your route to your heading direction. This is a feature that is very useful. VR does not have heading direction indicator. It does have a movement direction indicator. When you move, it will show the direction of your movement. Although this is not the best choice, it does help to align user back to the route. You will simply do trial and error by moving and realign yourself.

Voice navigation is a plus for map navigation especially if you don't have time to look at the device. So far none of the sports-tracker have voice synthesized navigation. VR does not have it too. Normally, I would use OsmAnd for voice navigation. It has offline maps too but is not for sports tracking use.

Social media linkage is one optional features which many user likes. VR does allow you to update your activity to Facebook and Twitter.

View routes/tracks published by other is also one feature that may prove useful. Instead of plotting my own route, you could use other's route for my own activity. Viewing the tracks done by others also allow us to gauge ourselves as to how fit we were compared to others (possibly of same age). VR does not show tracks done by others. It does show published routes by others. I personally find that routes are better than tracks as individual have repeated tracks that may not be useful as a route. Like other trackers, VR did allow users to convert tracks to routes.

VR does not automatically centers the map to the GPS location. If you turn off the screen and back on later, the GPS location may go off the map. Just tap the "lock GPS" button will solve the problem.

Also, the screen time out feature of Android will keep turning off your screen. VR does not have "keep awake" feature yet. To solve this problem, you just have to install a "keep awake" app so that could easily turn off/on "keep awake".

Don't even think of importing tracks into VR. Many sports tracker allow you to import tracks. This is one thing which I don't like about VR. I have only one activity, why do I need two devices to record it? You can only import routes in GPX format.

VR site allows you to import GPX as routes. Some route creating web output is not compatible with it. GeoPlanner, MapOmeter generated routes are not possible to import. VR have its own route creating facility but it has only straight line. No "follow road" plotting possible.

One last reminder. Please be aware that VR does a lot of calculations plotting your track on map and navigation (if you turn "follow route" on). Your battery will drain extra fast.


How to use ViewRanger on Android to follow a track offline

The first thing you need to do is to ensure that your GPS is set to on. Download the app from Google Play. It will then prompt you to register yourself on my.viewranger.com.

Zoom out by touching the "-" button so that it showed at least the local area of your interest. Wait patiently as it start to locate itself and download the map into cache. Do this at home where you have your home wifi turned on and your phone connected to it otherwise ensure that you have unlimited data plan as the cache is preset to 100MB.

Touch the map area. A top bar and a bottom bar will appear. Touch the right most bottom bar icon that looked like a list. Select "Create Saved map". Select "street" regardless of whether it is selected already. You can now touch the map and select the areas. Press the "+" or "-" icon to zoom in and out. When you are sure all the area you needed is selected, click "download". It may take a long time to download depending on the area you selected. If I am not wrong, there is a maximum limit to the size of the area. Wait till download is completed.

Touch the screen and choose "list" button again. This time choose "offline". Touch the screen again and cliick on the "map" icon and select "organizer". Choose "Maps", "online maps", "openstreetmap" (unless you choose another map while creating your map), "my saved maps". Select the map that you saved and click "view". You are now on offline mode.

Next go to my.viewranger.com and create your track or download a track (you may need to pay to download a track). After creating and saving the track, go hack to your Android and click on "menu","options","settings","synchronize", Go back to "organizer", "Routes" and  click on the "down arrow" icon. Click "follow route" and you can start follow the route.

If your position is not at the route, there will be a black line from your location to the nearest waypoint. Just follow the direction. You may need to move around a bit to see where you are heading as it does not show your heading direction unlike other navigation program. However it does have movement direction indicator. Heading direction shows you the direction you (your handphone) are facing whereas movement direction show the direction you are moving. The former is better as you don't have to move to know where you are heading to.

If you have unlimited data plan and your route is always within the range, don't bother to use the offline method. This note is for people who don't have mobile data plan or the route is out of mobile data range.

IF you want to track your performance then there is a "rec" button at the bottom right side of the map. Click on it and you can track your performance. Make sure you don't touch the button again while navigating.




Wednesday, September 12, 2012

Insert Exif into existing picture

If you have pictures that is already taken but does not have EXIF (geotag) information? Well, there is a windows program that will allow you to insert the geotag information. The program is called GeoSetter. You can just locate from the map (Google Maps or OSM) the exact location (that is if you know) and the information will be inserted into the picture itself (only for GIF). Multiple selection is possible. 

You will need a free account from geonames.org if you want to insert the location name. I think it is not necessary to have it (its not very accurate anyway). Just ignore the warning and the geotag (long and lat) will be inserted.



Update latest OSM in OSMAnd

OSM data can be outdated in OSMAnd. Rather than wait for OSMAnd to post its update. You could download the data yourself to get the latest copy of the area concerned.

The first thing you need is OsmAndMapCreator from OsmAnd itself. Next, you need to download the daily update from geofabrik.de/osm. Singapore map is included in "Malaysia-Singapore-Brunei" map. Download and unzip the osm file and use the MapCreator to convert to obf file. Upload the obf file into Android \osmand directory. 

OsmAnd will automatically choose the map if your location is within the map area.



Friday, July 01, 2011

SQL COALESCE

I find it difficult to use this function. Its use is really limited.

The function coalesce(esp1,esp2....) is actually an expansion of NVL(esp, replacement) in some language.

Both function checks for NULL. NVL() is translated to if "esp" is null then use "replacement" otherwise use "esp". Coalesce() extends the "if" to many evaluations and has no "replacement" unless you specifically define one expression that is always true.

What then is the use of coalesce()? Basically, it allows you to return a value from a list of expressions in the order that you defines it. It will pick up the value of the first expression that return a NOTNULL.

In a more English term, the function allows you to choose the first field from a list of fields that is not empty.

In practice, I can't find a real use of it. At least not for the field of work I am in. However, I can imagine a practical use. For example, I have a list of prices for a given part. The prices are select in the order of preferences refurbished, local, regional and worldwide. If the higher preference price is not available then the next lower price preference is used. Usually, the different prices are not compiled. Rather, it is taken from joins that refers to different tables which are updated independently. Thus it is normally unknown if a particular preference has a value. Obviously, there must be another coalesce to indicate where the source of the price is from.

Another example is as follows.

I have a list of free gifts which I need to keep track of the stock. When customer indicates a choice. It is updated into the database at the particular choice field. I am then able to simply "count" the different choices made by customers. At the same time, I am able to view the choices made by individual customer. Two actions with just one update.



Choosing dates in SQL

If there is a datetime field in your database, chances is that you would want to choose a period between dates. There are more than one way to choose a period.

First I would show the wrong way.

Select mydate from mytable where datefield > '1/1/1900' and datefield < '1/31/1900'

This SQL is not wrong by itself. However, without time qualification, the default time is 00:00:00. It then posts a problem. ">" actually means greater than. This means that the date 1/1/1900 00:00:00 is excluded. "<" refers to less than. This means that the date 1/31/1900 00:00:00 and above will not be included too. In English, this condition means "exclusive" term.

A more correct way is as follows.

select my date from mytable where datefield >= '1/1/1900' and datefield < '2/1/1900'

Another way to select a period is as follows.

select my date from mytable where datefield between '1/1/1900' and '1/31/1900'

I am not sure if that is correct too since the time definition on the second date is missing. To be more exact the second date should be 1/31/1900 23:59:59.

Monday, June 27, 2011

Vlan Tag

Read from Blogger (mili liew) that you don't really have to use 2wire 5012NV for your Singtel NGBN.

There is a blog that details how you can use your own switch to connect to the Optical hub.

The suggested switch used is a "managed switch that support vlan tagging". Vlan tagging is actually a protocol IEEE 802.1Q. The switch must be able to support this tagging.

Tag used as belows.

vlan 10 - Internet
vlan 20 - MIO TV
vlan 30 - VOIP
vlan 40 - Management

I don't quite know what vlan 40 is used for.