Category Archives: Blog

Nicer track rendering

One of MyTrails’ design principles has always been performance. I’m very proud of the fact that no other Android mapping application is as fast and smooth as MyTrails. This is partly because it uses OpenGL to render the map and tracks.

A big part of that is that MyTrails has to be able to display tens of tracks with thousands of track points without slowing down, and because of this, I have been hesitant to change the track rendering algorithm.

Things came to a head recently when I implemented the new Time and Distance colorizations. Suddenly (and especially in an emulator running on my low-pixel density computer display), the track looked very crude to me. And it’s always been: zoom out enough and it degenerates into a mess of horizontal and vertical hatches. Even up close, sharp edges in the track look broken. This is because OpenGL’s support for lines is very, very crude.

Also, it’s limited in terms of the thickness of lines it can draw (based on the GPU in each model of phone), and high-density screen in devices that use low-end GPUs (such as the Nexus 4) caused the tracks to be thinner than they should, and lack a border.

No more! In MyTrails 1.4.0, I’ve rewritten the track rendering algorithm, and lines are smoothly blended, can be rendered at any width, and are unbroken at any zoom level. And they’re still very fast (56 frames per second on a Galaxy S3, compared to 57fps for the previous algorithm).

New track rendering

New track rendering

During the beta period for 1.4.0, I will try to keep the hidden option ‘toggle track mode’ operational so you can compare the modes for yourself (there’s an intermediate mode that uses un-smoothed lines). If some phones are too slow for the new rendering mode, I can make it an official option for the release.

You can test the new rendering in MyTrails 2.0.0a6 and shortly in 1.4.0b1.

A few more screenshots to compare the old and new modes.

1.3.24-1.3.26

  • New map: VTTrack-ST (single-track layer map)
  • New colorizations: distance and time
  • Layer maps can be taken off-line
  • Show disabled GPS icon when no data is received from the GPS
  • Screen lock no longer engages while using a dialog (only on Android 4.2 and later)
  • File upload progress is more regular
  • 2.1 work-around for IGN is no longer necessary
  • GPSies: download your own private tracks

1.3.25 and 1.3.26 are bug-fix releases, sorry!

New colorizations: distance and time

In MyTrails 1.3.24 (currently in beta), I am very excited to add two new colorizations (or 4, depending how you look at them)!

How this came about was: one user wanted an easier way to figure out which way a track that circled back on itself came into and left the intersection. Playing with different possibilities, I realized that being able to visualize time and distance on the track (other than by looking at the speed visualization and performing differential math in our heads), would be useful.

I think my favorite is the distance colorization: it uses alternating black and white bands every 100m (100yd if you’re using imperial units), so you can very easily count the distance between two points on the track. It’s also easier than looking at the scale imagine twisting it along the track.

Distance dashed

Distance dashed

This only works if the track contains a high-enough density of points that MyTrails can alternate colors (which can happen only on a track point, not between points). Generated tracks (from a driving direction service, or by manually adding track points), or highly-simplified tracks (such as you may get from an online track sharing service) may not contain enough track points. Similarly, zooming out causes MyTrails to simplify the track and lose the ability to correctly represent the track.

Similarly, if you want to count how long it took to go from one point to another, the time colorization is very helpful. Each band corresponds to one-minute intervals.

Time dashed

Time dashed

The “rainbow” versions of these colorizations look silly, but they’re useful to try and follow the track through an intersection. Just keep in mind the sequence of colors, and follow along.

Distance rainbow

Distance rainbow

Unfortunately, when you look at these in MyTrails 1.3.24, they will not look as nice and smooth as these screenshots. This is because these were taken with an alpha version of 1.4.0, which I will tease more in another post soon!

MyTrails 2 Preview

MyTrails 2 is finally ready for preview!

What’s new?

The headline features in this upcoming version are stats and graphs, which I have previously teased. The track manager has also been completely rewritten and the main parts of the UI have been transitioned to a Holo UI.

Stats

MyTrails now has what is probably the most complete stats functionality of any smartphone-based navigation app. Not only can you choose among a very large selection of variables, but you can also display stats for multiple tracks, with the UI scaling to display as much information as possible within the available space.

To select other stats or reorder them, tap the Edit (pencil) button. You can select a different font by tapping the eye button. Please let me know your preferences.

Long-tap a stat to add it to the HUD (maximum 3); highlighted stats are displayed in the HUD.

Stats

Graphs

Graphs can be displayed for multiple tracks simultaneously, and they are updated in real-time. You can choose from a wide variety of variables to plot.

You can use pinch-zooming to zoom in on the graph, and then pan.

Graphs

New Track manager

The track manager makes it easier to find tracks by searching and sorting. Tap and hold on a track to select multiple tracks, so you can (for example) upload multiple tracks at once.

Tap on a track for details about that track; swipe among 4 views: track details, map view, stats and graph.

On tablets, the detail of the track(s) is displayed next to the list of tracks.

On the main map view, tap on a track (except the current recording) to see details about that track.

New track manager

Limitations of the alpha

The following are known bugs or limitations, please don’t report them:

  • some stats do not update in the HUD when the GPS is not recording (fixed in a10)
  • # satellites stat doesn’t update correctly (fixed in a10)
  • reordering stats (by tap-and-hold) is odd, and makes it hard to get the desired order (fixed in a9, there is a completely different mechanism for reordering and selecting stats)
  • the new features are enabled for all users (Pro and non-Pro), except for the fact that in non-Pro mode only one track can be displayed; this will probably change before the final release
  • pinch-zooming on a graph doesn’t work with a vertical gesture, use a horizontal pinch (fixed in a9)
  • text on the graph is displayed very small on high-density screens (fixed in a3)
  • in the Track Manager, attempting to save multiple tracks at once only saves the first one (fixed in a9)
  • in the behavior preferences, choosing a folder (for offline maps) doesn’t do anything, and the corresponding button in the offline downloader is also non-functional (fixed in a9)
  • most translations (including French) are very incomplete when it comes to the new features
  • some sort orders can not be reversed
  • the keyboard pops up inopportunely in the track manager (fixed in a3)
  • there is no option to load all tracks in a folder yet (fixed in a9)

What you should report

In order of decreasing importance:

  1. Any crashing bug, or any loss of data
  2. incorrect statistics (there are so many, I haven’t been able to thouroughly test them all yet)
  3. missing features and graphical glitches

How to install

First option: side-by-side with MyTrails 1

This is the safest option, as you can continue to use MyTrails 1 for your day-to-day activities if you find MyTrails 2 to miss some essential feature, or if you’re afraid it’s not production-quality (this option only recently became available, based on Android’s new build system).

Just download the preview version here.

Drawbacks:

  • your two versions of MyTrails are separate: different preferences and loaded tracks, etc. You can load in both the tracks you save in either, but that is a manual process
  • once you have a second instance of MyTrails installed, you can no longer sign in to Dropbox (unless you use a tool to freeze one of the instances so you can log in to the other; you only need to do this once); recent versions of Dropbox crash if you try to authorize MyTrails when the 1.x and 2.x versions are installed side-by-side.
  • I have not enabled in-app purchases on the preview, so you can’t purchase maps or the Pro version from it (it will let you try, but you will get an error message); just connect to your Google or FrogSparks account from both apps and make any purchases from MyTrails 1

Second option: use the Play Store alpha track

This is a true alpha version: do not rely on it for important track recordings! I would strongly discourage installing this alpha without first making and securing a backup of MyTrails with Titanium Backup or a similar tool: it’s entirely possible that the alpha will mess up the list of tracks (not the GPX files themselves) and the rest of your MyTrails settings.

  • Even you are already a member of the MyTrails Google+ community, you need to join the MyTrails 2.0 alpha community.
  • Then click on this link and click Become a tester. I believe you will need to do this even if you are already part of the beta testing (for MyTrails 1.4.x).

Once this is done, the Play Store will offer to update MyTrails the next time it checks for updates. It unfortunately doesn’t specify which version it’s downloading, but when you launch MyTrails the version log will tell you what’s changed.

Please note that MyTrails 2 will only be available for Android 2.2 (Froyo) and later. MyTrails 1.4.x will continue to be updated with bug fixes and new maps, but little else.

If you encounter a crash, please provide your email address in the crash comment and make sure you send the crash report.

How to leave the alpha test

Click on this link and click Leave the test, or leave the MyTrails 2.0 alpha community (use the second option if you want to stay on the beta track). This in itself will not roll back MyTrails to the latest released version, you will need to do that yourself.

Look at the instructions in the FAQ for leaving the beta for details on how to backup, uninstall and reinstall MyTrails.

Switching translation in MyTrails

I realized I hadn’t written an post about this, so if you didn’t read the release notes, you might have missed this feature, introduced in MyTrails 1.3.17: the ability to switch MyTrails to a different language.

You’ll find this at the bottom of the Appearance preferences, and you can use it to force MyTrails to English if the default translation for your language is lacking, or to force a different language than the system language.

2013-08-28 08.48.06

The translator for the currently-used language is credited there as well.

New translation tool

Notice: the translation server is currently unavailable…

For many months I have been using a wobbly system for translation: a combination of the impressive android2po, which transforms Android string files (in xml format) to the ubiquitous .po format, and a translation server based on Drupal Localization server, which is barely maintained, and missing many features.

I had looked at several hosted services such as MyGengo String (promising, but flawed and now defunct), Crowdin (started out ugly and free, now less-ugly, full-featured but expensive), Get Localization (very nice and free, but never fixed the fatal flaws in their Android support) and took a quick look at other very expensive commercial solutions…

Finally, I settled on using Weblate. It’s pretty, it’s fast, it’s full-featured, its developer is friendly and responsive, it has good documentation, it’s very easy to integrate (if you’re using git for source control and you have your own server) and it fully supports Android. Because it directly uses git, I can keep an eye on all translation changes easily and fix anything that is amiss.

Instructions for translators

Whether you’ve already been contributing to MyTrails translations on the old server or whether you’re a new contributor, please connect to the new server and register (sorry, I haven’t been able to migrate accounts across). You will receive an activation email (if you don’t please contact me).

http://weblate.frogsparks.com

Once your account is activated, please let me know so I can accept you as part of the Translators group. If your language is not yet present in the interface, please specify it, so I can activate it.

If you don’t have a Save button on the translation page (just a Suggest button), you haven’t yet been accepted as a translator; you can start translating, but you’ll have to later approve each translation.

You can edit your profile to specify the language(s) you’re interested in translating (this adds shortcuts in the Weblate menus). You should also subscribe to Notifications on new strings to translate and Notification on new suggestion so you can stay on top of your translations.

Once you’re ready to start translating, navigate to your language and the relevant MyTrails subproject (at the moment, latest is the current active project) and click the Translate button to start translating untranslated strings.

1.3 @ Weblate 2013-08-27 17-50-21

In the translation interface, you will see the English version of the string (and of any other Secondary language you selected in your profile). Edit the translation and click Save (the next untranslated string will be loaded automatically).

You can use Google Translate in the Machine translation tab as a starting point by clicking the Copy button next to it.

1.3 - Italian @ Weblate 2013-08-27 17-56-02

In some cases, it may be useful to check the Nearby messages tab to get a bit of context. In some cases the Comments or Source tabs will have some guidance.

For more information, please see the full Weblate manual.

Suggesting translations

If you are not an official translator you can still easily suggest a translation, even without creating an account, if you find a typo or awkward translation. Simply navigate to the language you’re interested in, and in the Search tab, type the word as it is misspelled in the application, which will lead you to the offending entry.

1.3 - French @ Weblate 2013-08-28 09-06-08

There, you can simply fix the translation and click the Suggest button. The official translator will integrate your suggestion if they agree with it.

1.3 - Français @ Weblate 2013-08-28 09-08-27

 

Thank you all for your contributions!

Translation status

MyTrails 2: Stats

One of the major new features in MyTrails 2.0 (not yet released) is support for statistics.

In MyTrails, statistics are fully dynamic and they work with multiple tracks, so if you have multiple tracks loaded, you will be able to compare the stats for each of the tracks that supports that statistic. The first three statistics will be shown in the HUD.

Here’s the list of stats we’re currently planning to support:

  • Target
    • Heading to target
    • Distance to target
    • Time to target
    • Target altitude
    • Altitude Δ to target
  • Altitude
    • Min altitude
    • Max altitude
    • Current alt.
    • Altitude Δ
    • Cumulative climb
    • Cumulative descent
  • Speed
    • Current speed
    • Recent speed
    • Max speed
    • Average speed
  • Speed (computed)
    • Avg. speed (total)
    • Avg. speed (recording)
    • Avg. speed (moving)
    • Current speed (computed)
    • Recent speed (computed)
    • Max speed (computed)
  • Duration
    • Total duration
    • Recording duration
    • Moving duration
    • Start time
    • Current time
  • Distance
    • Distance
  • Vertical speed
    • Current vertical speed
    • Max vertical speed (+)
    • Max vertical speed (-)
    • Avg vertical speed
  • Slope
    • Current slope</string>
    • Maximum slope (+)
    • Maximum slope (-)
    • Average slope
  • Track points
    • # track points
    • # track waypoints
    • # pauses
  • GPS and compass
    • GPS Accuracy (horizontal)
    • GPS Accuracy (vertical)
    • GPS # satellites
    • Compass bearing
    • GPS bearing

If you think this list is missing something, please don’t hesitate to point it out in the comments!

A few screenshots…

1.3.21

  • Fixed slowness and old imagery for Google Maps and Satellite
  • Changed error and logging provider to no longer rely on Android logging
  • Direct loading of VisuGpx.com tracks
  • Improved parsing of GPX
  • Layer maps: upscale bottom map if it maxes out at a lower zoom level than the top
  • Added new IGN SCAN Express maps (vector-based topo maps)
  • Fixed downloading from Dropbox