Mobile Trail Explorer

Mobile Trail Explorer - Explore your trails using the mobile phone and GPS unit (internal/external)

Mountain Bike Trail

Mobile Trail Explorer is an application where user can view and record tracks using the mobile phone and GPS device (either external or internal). Recorded tracks can be exported in KML or GPX formats so that they can be viewed in Google Earth application. Mobile Trail Explorer is mainly targeted for recording biking, hiking etc. trails.

You can also create trails or placemarks in Google Earth and import those to Mobile Trail Explorer in KML format. You can then display the imported track as “ghost” trail and follow the trail or waypoints.

Mobile Trail Explorer can also post your current location to web in specified URL address. You can send your current location, speed, altitude and heading information in query parameters and do whatever you like with them on your server application.

Mobile Trail Explorer software runs on Java platform (J2ME/Java ME) so it is supported by many mobile phones. It is required that mobile phone supports either Bluetooth connections (JSR 82) or Location API (JSR 179) for GPS and File connection (JSR 75) for exporting trails to kml files.

Platform: Java MIDP-2.0 CLDC-1.1

Price: Free

License: GPL

Screenshots (Nokia N80):

Mobile Trail Explorer - Trail view Mobile Trail Explorer - Elevation view

Mobile Trail Explorer - Information view Mobile Trail Explorer - Waypoints view

Mobile Trail Explorer - Satellites view Mobile Trail Explorer - Satellite sky view

Trail exported to Google Earth:

Recorded Trail in Google Earth

Download example: track_2006-09-07_08-47.kml

Download:

TrailExplorer.jar
TrailExplorer.jad

Source and Binaries (including NetBeans IDE project files)

Discussion Group:

http://groups.google.com/group/mobile-trail-explorer

Google Groups
Subscribe to mobile-trail-explorer
Email:
Visit this group

Version History:

Version 1.10 (May 6th 2008)

  • Support varying screen sizes like rotating screen on N95 (Issue 90)
  • Improved startup time
  • Support for uploading position to web server (Issue 78)
  • Scrolling (up/down) works on the information screen (Issue 73)
  • Fixed the saving/loading of trails using RMS (Issue 89)
  • Import trails from KML files
  • Import waypoints from KML files
  • Fixed waypoint editing when handling quickly added or imported waypoints

Version 1.9 (April 1st 2008)

  • Trail is now projected using the mercator projection
  • Both trail and map are now zoomed with same keys (1 and 3)
  • File browser for importing trails and selecting export path
  • Logger can now write to the filesystem
  • Signal strength SNR key to Sky View and updated help screen
  • Change screen on space key as well as 0 key
  • Export and import waypoints
  • Initial JSR-179 support

Version 1.8 (December 3rd 2007)

  • Trail duration is displayed and exported to KML
  • Trail maximum speed is displayed and exported to KML
  • Trail average speed is displayed
  • Initial map texture support (Issue 49)
  • User can select filename for exported trail

Version 1.7 (August 17th 2007)

  • Changed Logging Levels to more “understandable” ones.
  • Logger now states what level it’s currently logging at.
  • Changed How Trails & GpsPositions are serialized
  • Implemented a Version system, to allow for updates etc.
  • Implemented an update feature for version 1.6 and lower
  • Implemented re-exporting of Tracks that are saved in RMS (Issue 44)
  • Satellite sky view (Issue 51)
  • Track elevation view (Issue 31)
  • Export saved trail (Issue 45/50)
  • Added Sms Ability to send a GpsPosition/Waypoint as an SMS! (Issue 52)
  • Drawing style options (draw whole the trail or end of the trail)

Version 1.6 (June 10th 2007)

  • Display current time (Issue 37)
  • Fix for invalid KML (Issue 38)
  • Display ghost trail (Issue 33)
  • Altitude is exported to both KML and GPX files (Issue 34)
  • Waypoints are exported to GPX files (Issue 34)

Version 1.5 (April 28th 2007)

  • Autosuggest waypoint name (Issue 12)
  • Added ability to ‘Force’ screen’s backlight to stay on (Issue 21)
  • Improved speed of KmlConverter and GpxConverter
  • MTE now remembers last position on startup (Issue 17)
  • About/Help Screen (Issue 23)
  • Fixed Bluetooth Device List refresh exception (Issue 22)
  • Controls in the setting forms will be re-initialized when pressing “Cancel” (Issue 27)
  • Added zoom scale bar (Issue 28)
  • Separate information, waypoints and satellites view (Issue 15)
  • Fixed “Unable to save waypoints” problem (Issue 26)
  • Added “Trail Actions” screen when stopping recording, where user can export the trail to multiple formats and/or save trail to phone memory (Issue 18)
  • Fixed bluetooth problem seen on Nokia 6230 (Thanks Patrick)

Version 1.4 (March 26th 2007)

  • Compass in main view
  • Fixed the GPX format and file extension
  • Distance is displayed in main view
  • User can pan the view

Version 1.3 (February 25th 2007)

  • Display speed, altitude and heading
  • Record speed/time markers every Nth position
  • Export trails in GPX format

Version 1.2 (January 24th 2007)

  • User can change recording interval via settings
  • Recording is automatically paused when user is stopped
  • Waypoints are stored when application shuts down

Version 0.2 (October 7th 2006)

  • First “public” release
  • Record and export trails to Google Earth’s KML format
  • Draw recorded trail and waypoints
  • Show current location as longitude and latitude

52 Responses to “Mobile Trail Explorer”

  1. Jimmy Says:

    Hello,

    i try to download TrailExplorer.jar
    if i click on it , i download TrailExplorer.zip but i can’t find the file there ?

    What do i wrong ,

    thank you for looking.
    with kind regards
    Jimmy

  2. Daki Says:

    Great tool, installed it on my k750, found the BT GPS instantly and started recording…as easy as it gets! Congrats on the sw.

  3. Cary Wiedemann Says:

    Thank you for releasing the source of your tool to the public! You have done a great favor for FAR more than the few people that take the time to leave a comment.

  4. Tommi Laukkanen Says:

    Jimmy: You should try to download the JAR file using the right click’s “Save link as…” menu item. This way the winzip or other archiving software doesn’t try to open up the jar package automatically. After you have downloaded the JAR file to your local disc you should follow your phone instructions how to install it on the phone. I hope that this helps.

    Daki: Great to hear that it is also working on other phones besides Nokia. Please email me some of your routes, if you can, so that I can see where my software has been used :)

    Cary Wiedemann: Thank you for your very kind words! Comments like your’s are the reason for doing this :)

  5. John Says:

    Hi Tommi,
    Excellent piece of software! Thank you so much for posting the code - very nicely written!! I was going to write something similar but I stumbled onto your site first.

    I had absolutely no trouble getting it to work on my K750i with my Garmin GPS10.

    When saving the .jar, Internet Explorer seemed to rename the file to a .zip. I just renamed it back to .jar then copied it up to my phone. Done!

    Thanks again!
    John.
    Brisbane, Australia.

  6. Tommi Laukkanen Says:

    Thanks John! It is nice to know that my code calculates the coordinates correctly within the southern hemisphere. I wasn’t able to test that in real life :)

  7. cyclopathic Says:

    Would it work with build-in phone GPS sensor? Additional .jar is needed?

  8. Tommi Laukkanen Says:

    cyclopathic: Current version doesn’t work with build-in GPS as the application uses the bluetooth API to connect to GPS device. I have thought about adding this feature as the future phones will likely include feature (like Nokia N95). But I can’t currently develop this as I don’t have such a device to test with. Any volunteers for testing or adding this feature? :)

  9. Kilian Says:

    Do you know if by any chance this could work on Samsung cell phones? I tried your application on a SGH D807, it launchs nicely, but is unable to find my BT GPS unit, which works ok otherwise. I’m not sure if Samsung fully enabled the JSR-82 profile, do you have any information on this?

  10. Tommi Laukkanen Says:

    Kilian: Does it work with something like Mobile GMaps (http://www.mgmaps.com)?

    It might be that SGH D807’s JSR-82 is not fully enabled as you say. SGH D807 is not even listed on Samsung’s developer site. But there it says that SGH D800 should have JSR-82 support. This wouldn’t be the first time when one phone acts differently as another.

  11. Kilian Says:

    Tommi: yes; it does indeed work with mgmaps. And your application seems to work fine too, the oinly thing is that it can’t detect my Bt GPS unit.

    You could find some details on the SGH D807 here: http://en.wikipedia.org/wiki/Samsung_SGH-D807

    Anyway, thanks for your answer.

  12. Kilian Says:

    Tommi: actually I cannot find my BT GPS unit with mgmpas either, so it looks like a JSR-82 problem. Would it be possible to compile a debug version of your program, to identify the issue? Thanks

  13. Tommi Laukkanen Says:

    I could try to make a small debug utility to find out the problem. What brand is your BT GPS? Does the SGH D807 have any security settings that could be blocking this as for example my Nokia N80 asks permission when Java application tries to use the JSR-82 features?

  14. Kilian Says:

    My BT GPS is an i.Trek M5 (http://www.semsons.com/im5blgpsrewa.html)
    I didn’t see any security setting preventing BT communications from Java apps, so I don’t know. It just hangs when it tries to lookup a BT device.

  15. Johan Montelius Says:

    Creat stuff, worked right out of the box with K800i and GlobalSat BT-338. I’ll use it in my course on mobile applications at KTH.

    Johan

  16. Dainius Says:

    S-E M600i and GlobalSat BT-359 works well.

  17. mgb Says:

    Does not work with blackberry pearl.

  18. Mario S. Says:

    Hi Tommi,

    it seems you had some problems with your web server and now comments from beginning of 2007 are deleted. :-(

    I asked you for implementing the additional setting for “Update interval”. I saw you already uploaded a correction for this into SVN. Thanks the quick response. Funny is, that I also implemented this feature by my own and took really the same variable names and texts.

    My next idea is a tuning issue. I wondered why TrailExplorer records same positions, means if you drive by car and stand at the traffic light for 3 minutes, there are a lot of same positions in the track. You could check current position against the last element of your track vector. And if lat and lon is equal, then ignore the new position.

    Here again my configuration which works very well: Sony Ericsson K750i + Falcom NAVI-1/XT

    Best Regards,
    Mario

  19. Tommi Laukkanen Says:

    Mario: Thanks for re-commenting on the site. My host reported that the server was “hacked” and they had to restore old backups.

    I couldn’t resist to implement your “update interval” request :) Good to know that my code is readable by others.

    The tuning idea sounds good as the memory is rather valuable in the mobile devices. I’ve had the same idea but haven’t yet implemented it. It would be rather easy to implement as you described it. Probably for the next version.

    I added your configuration to the tested devices list in the Google Code Project Wiki page:
    http://code.google.com/p/mobile-trail-explorer/wiki/TestedDevices

  20. Dave Walsh Says:

    Tommi,

    What excellent software!
    Thank you for making this available - It just worked straight off.

    I am using a Nokia 6630 phone and a BTGPS74R (GALILEO) GPS receiver.

    Dave.

  21. Juha Says:

    Hi

    Which is the latest version.
    You seem to have version 0.2 on your site.
    I’ve also seen version 1.1 ??

    Br Juha

  22. Tommi Laukkanen Says:

    Juha: Thanks for pointing that out. My host server was hacked a while ago and old backups were restored overwriting the v1.1 links. You can still download the v1.1 from Google Code’s project site: http://code.google.com/p/mobile-trail-explorer/downloads/list

    I’m currently testing the v1.2 and hopefully I’ll be releasing it within a week or so.

  23. Jluis Says:

    Tested on a Nokia E61 and BT GPS. All works fine, but in a big log file (arround 3000 records 90kb) after the file write on memory, i can’t close the trail-esplorer. I will do an other big log and tell you some news.

    Thanks for this great app.

  24. Tommi Laukkanen Says:

    Jluis: Wow! That is quite a big trail. Would be nice to see your KML file from your part of the world.

    The latest version has an option for changing recording time interval, so you could use larger interval, for example 60 seconds, for longer trips.

  25. Niklas Östh Says:

    Realy like the simplicity of this app, saving the tracks on the phone is far more reliable than sending them over the internet (like the G3 Project).

    Is it possible to get speed and distans from the KML-file from within Google Earth or should one use an extra program (any suggestions)?

  26. Tommi Laukkanen Says:

    Niklas: Thank you for your comment and glad you liked the app. Keep-it-simple works quite well for many cases.

    You are not currently able to extract speed information from KML file as it only contains list of coordinates without time information. It would be possible to add a feature that would insert a marked in the KML that would contain speed and time stamp information for example once in every minute. Would this be helpful?

  27. Mario S. Says:

    Thanks for adding my tuning idea, but I think there is a not so nice thing with your solution. If user stops for more than 5 seconds, there will be appear this message “Last refresh xx second(s) ago” on the screen. You could avoid this message, when you update the timestamp of the last position, also if the current position is equal to the last position. But for this you have to add a setter method for “date”.

    Regarding the speed: In the source I saw that you tried to parse the speed and show it on the screen, but I think you forgot one thing: The speed data from the GPS receiver is in nautic miles (knotes), so you have to multiply the value for the speed with 1.852 to get it in km/h.

    PS: Did you get my email on 19.01. ?

  28. Jluis Says:

    Hi again Tommi, my track was long on records but not in time or distance (arround 3 hours and 180Km) the reason is that i use a 5 sec’s interval because i use trail-explorer for my motorbike weekend “tours” on Mallorca (Spain) i wanted to see how acurate is the track on google earth.

  29. Mario S. Says:

    Sorry, I must pull back my comment about this appearing “Last refresh yy second(s) ago” message. There is no problem in your code.

  30. Jimmy Says:

    I’ve installed the application on my phone Sony Ericsson V600i
    and i’m using a FAC wireless GPS BT-30

    It’s working perfect. (the biggest kml file i created is about 27Kb big) (about 225 Km)

    That would be a great feature to add speed and time information for example once in every minute

    Could you also add a start icon and stop icon ? And a Speed camera icon ?
    (in google earth)

    Nice work!
    Jimmy

  31. Tommi Laukkanen Says:

    Thanks Jimmy! I have already added the feature on recording “markers” every Nth recorded position that will include the speed and time information. I could also add the start and stop icons so that user could easily see the starting and ending point from Google Earth. I’ll try to release the next version within a week.

    Nice idea to use the application to store speed cameras as waypoints :)

  32. Mario S. Says:

    I have also an additional feature idea for next releases.
    It would be great if Trail Explorer shows the current length of the track below the speed info. Because on mountain bike trips I want to know how far I have been cycling. Perhaps you could also write the total length of track in the Endpoint Placemark in a kind of info box and also the average speed and the total time for this track.

    You could calculate the distance between two recording points with these formulas:
    http://williams.best.vwh.net/avform.htm#Dist

  33. Tommi Laukkanen Says:

    I’ll add this to a upcoming feature list. I think that distance could be also shown in the trail markers for every Nth recorded position.

    Thanks for the formula link. No need to reinvent the wheel :)

  34. Dakota Reese Says:

    Wow. I love the new build. I was thinking about adding Dilution of Precision check (to eliminate extremely bad GPS guess), but was unsure on how to best add multiple sentence parsing to your code. It looks like it is a quick add with your new parser.

    Thanks again for a great program.

  35. Martin Tilma Says:

    Hi, I donwloaded version 1.3 on my Sony Ericsson W800i. After a few track points the I get: “Last refresh xx seconds” and it wont track any points.

    I user a ADAPT AD-300 Bluetooth GPS Receiver.

    What can I do?

  36. Tommi Laukkanen Says:

    Hi Martin! If you are able to record few track points then it should work. It sounds like the phone lost the connection to GPS receiver or GPS receiver lost track of satellites. Does it work with other GPS software, like GMaps?

  37. Richard Proud Says:

    Hi Martin

    The application installs fine and connects to my bluetooth GPS OK and I can start recording. However, when I stop recording I get a java error to do with file writing: java.lang.Exception: writeToFile: Open Connector: java.lang.illegalArgumentException. Any ideas? I have not specified a destination folder into the Export box under Settings as I assume it will just write the trial file locally to the application. I’m using it on a SonyEricsson V600i.

    Many thanks
    Richard

  38. Tommi Laukkanen Says:

    Hi Richard! Mobile Trail Explorer doesn’t store trails locally into MIDlet’s record store. It saves them always using the File Connection API so you should specify the destination folder for your exports. Default E:/ seems to work well with majority of phones.

  39. Martin Tilma Says:

    Hi Tommi, I tested with Gmap (for a short period, I don’t have flat fee internet) and it is working. Do you know other applications that don’t need an internet connection?

    Is there a way to let your application check if there is a good connection with the GPS device?

  40. Richard Proud Says:

    Hi Tommi

    E:/ points to a memory card I believe? The phone I’m using doesn’t have one, so how would I reference the Applications folder as the place to write the track out? Would it be C:/Applications? I’m not sure how phone disks are organised / referenced.

    I have tried it on another phone (Nokia), where file writing to E:/ is not a problem as it has a memory card. However, after about 20 seconds of recording, it seems to loose the GPS stream and goes into refresh mode. Any ideas on that issue too?

    It’s a great application and does exactly what I need, but I’m just struggling to get it setup OK on either of the phones I have.

    Many thanks
    Richard

  41. Martin Tilma Says:

    Hello Tommi, I tryied a different GPS BT device and now its working okay. But its not my own GPS device.

    My own device starts flashing the bluetooth led and then losses connection or something.

    When I stop recording and start recording the connection with my bluetooth GPS is restored (for a while)

    any thoughts?

  42. Tommi Laukkanen Says:

    Hi Richard and Martin! The path is phone specific and E:/ seems to work well with Symbian phones. Unfortunately I haven’t included a file browser into a Mobile Trail Explorer so you can’t browse for valid directory.

    But fortunately I was able to code a small browser Midlet that scans your phones root drives and displays them in a simple text box. You can use this app to determine a valid path to be used with Mobile Trail Explorer. You can download this small app here:
    http://www.substanceofcode.com/downloads/midlets/FileBrowser.jar

    I hope that this helps for your problems.

    The 20 sec problem seems to be more phone or GPS unit specific. My Nokia N80 had a firmware bug that caused long running bluetooth connections to brake down after a few minutes and only firmware update was able to fix this. If Mobile Trail Explorer is able to start the recording then it should be able to continue to do so as long as user stops it (or bluetooth connection brakes down).

    Some GPS units can have problems connecting to satellites. I’ve had a GPS device that needed reset by removing a battery before it could connect to satellites properly.

  43. Richard Proud Says:

    Thanks Tommi - much appreciated. I’ll give the utility a go.
    Richard

  44. orgoz Says:

    Hi,

    Thanks for this great utility under GPL license ! It will be useful for me to map my city (for the OpenStreetMap project).

    It works good on a Nokia N70 and an Evermore BT920 GPS receiver :-)

    Thanks again !
    Best regards

  45. Martin Tilma Says:

    Hello Tommi, I did a firmware upgrade on my phone. But doesn’t solve the problem for me. After a while (less then 2 minutes) the bluetooth connection brakes down.

    I hope there is some solution…

  46. Tommi Laukkanen Says:

    Hi Martin, I found few articles that says the problem is on the phone hardware (W800i) and can’t be fixed with the firmware update.

    Here is one comment of W800i bluetooth dropouts
    http://www.expansys.com/ft.aspx?i=125173&thread=267

    I hope this helps.

  47. Urban Öhman Says:

    Excellent work! However, after my first day out with a SE K750i and a “navibe” bluetooth GPS I find that the BT connection is broken ever so often. This means that the connection is not maintained longer than 60 seconds, 10-15 seconds is more common. Any other out there who has experienced this behaviour?

    I have a feeling that it correlates with the energy-saving scheme of the Sony-Ericsson phone (the screen goes black), but I am not sure.

    Hooked up against a Palm the navigator has no problems whatsoever.

  48. Paul Says:

    Hi Tommi,

    Thanks for this excellent app, I am using it with:

    Nokia N80 (58.01)
    V 4.0623.042
    20-09-2006
    RM-92

    Nokia LD-3W Bluetooth GPS

    I have a question, I find that the app only outputs .kml files, regardless of my choice in settings.

    When I put the .kml file generated when selecting .gpx in the menu, into Google Earth I get the following error:

    - Open of file “*.kml” failed: File has missing or bad root element. -

    Do you have any ideas?

    Many thanks, Paul

  49. Tommi Laukkanen Says:

    Hi Paul!

    Thanks for reporting the used devices. I’m using the same hardware as you although my firmware is few months older then your’s.

    The GPX extension has been fixed in the current development version. When you select GPX format the current release version writes the file content as GPX but still uses .kml file extension. Next release will use .gpx file extension.

  50. Dave H Says:

    Hello, I’m new to the forum… this interested me because I noticed the comment someone had about the Samsung D807… I have the same issue.

    I’ve had to become literate at Java MIDlet programming to write a script to help determine the problem.

    It is the line of code that asks to find local devices that “hangs” this phone. [ getlocaldevice() ] However, it might be a security issue (bug) with the firmware… I suspect the phone *should* have a pop-up asking if you OK this app to connect to the local device, but that’s not happening. I still have some toying around to do in an attempt to further figure this out… but I suspect a Firmware issue.

    Has anyone else been working on this? I like this phone, but this could be a deal breaker.

    thanks,
    dave

  51. Tommi Laukkanen Says:

    Hi Dave! I haven’t received any information that anyone would have been working on this issue. I think that all D807 owners would be happy any progress that you might have on this issue.

  52. Tommi Laukkanen Says:

    This blog entry is starting to fill up on your excellent comments but the blog page wasn’t meant to be this large ( I’ve have to pay for the traffic :) ). So now I have created an user group in the Google Groups where discussion can be continued with real discussion forum tools. Please write your future entries in the Google Group Discussion list:
    http://groups.google.com/group/mobile-trail-explorer