Forum: General Topics

Forums / General Topics / Upload / share position with another server

 

Subject:Upload / share position with another server 

docent

10:36
Tuesday
21-Oct-2008

Hi :)

Tmj is a great tool :) I use it when I'm hiking or on bike alone - my wife can see where I am :)

But I got one question... I'd like to change visualisation of my route.. I'd like to use google maps and draw on it my route on-the-fly, store my positions in my SQL database etc.

The only possibility I see is to download somehow every 30 seconds my position (last position or some set of latest positions) from Your server... I can do it by creating simple bot that keeps logged on this site and grabs "location" data from the "LIVE" page.

But I'm wondering if there is any much simple solution.. maybe You share those positions somehow so I would be able to download it? Or maybe there is possibility in application to send position to my webserver instead of Yours..?

thx,
docent :)
 

Stephen

11:01
Tuesday
21-Oct-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Docent,

Rather than taking the position from the Live page a LIVELINK might be a better way to access the data since you don't then need to be logged into the site. The 'RSS Text' livelink format is XML based so should be easy to parse on your server. One problem might be that the Lat/Long are formatted in degree/minutes/seconds - I could possibly create a separate XML livelink type with more computer-readable data, if this would be useful?

Cheers,
Stephen
 

docent

11:13
Tuesday
21-Oct-2008

Right - livelink works great for me :)

About format.. If It's not problem You could add one more XML tag with much "pure" position format... something like <cur_pos></curpos> or anything :)

Big thx again :)
 

Stephen

18:54
Tuesday
21-Oct-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Docent,

I've now added a new 'XML Data Source' livelink type, which provides more computer-readable data than the original RSS feeds, including altitude and speed/bearing.

I must admit I'm slightly concerned that if people are running automated servers that frequently pull this data from TMJ this could put quite a strain on the TMJ server, so I may have to review this feed in the future. I've included an <updateinterval> tag in the XML data which gives the number of seconds since the previous location update from TMJ-Mobile. Perhaps you could use this field to automatically reduce your servers requests at times when you're not transmitting from TMJ-Mobile...

Cheers,
Stephen
 

docent

19:09
Tuesday
21-Oct-2008

I won't ask Your server when not using GPS :) Today I was testing so there were many requests I suppose - but from tommorow I wouldn't be affraid of that :)

There is another solution I suppose... For example I don't need to ask Your server every 15 seconds. I'm doing this because I'd like to generate gpx file, which I upload to google maps and draw there a route. So I need as much points as possible.

But If I could get XML data with points from last 5 minutes I could ask this server every 5 minutes - not every 10 seconds :)

But as I said - today I only tested my scripts - I wrote simple daemon and made simple visualisation in google maps :) From tommorow there won't be much problems with me ;)

Thanks a lot for Your work - Tmj seems to be a great app. I have to spend some time on It to see what I can do with It (for now I'm using Trekbuddy, but there's no possibility to upload position to server, so I was looking for some other software).
 

Stephen

9:19
Friday
24-Oct-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Docent,

I've now added a second XML data type to the livelinks page which you might find useful. This allows the entire current track or collection of recent tracks to be downloaded as a single GPX/XML file, on demand.

Note that as this could place an even bigger strain on the TMJ server I've implemented a 'cache' for the livelink, which prevents it from updating more than once every every few minutes (5 minutes for the recent track - 15 minutes for tracks older than 24 hours).

Hope it helps!

Regards,
Stephen
 

docent

11:07
Friday
24-Oct-2008

Great one! Now when I just come back from work to home (about 15 minutes) then I can track myself normally with first XML data type.

But when I'm going to trip I can use that second because I really don't need updating every 10 seconds - It's ok to update every 5 or even 10 minutes - even 15 when hiking in mountains :) I use it just to show how I'm going - current pos is to be seen from LIVE page to friends / wife so no problem :)

Hmm so now - maybe I use opportunity to ask some questions about TMJ, that I couldn't find any answers.. :)

1. Is that possible to remap key bindings - or to bind keys manually..?
2. Is there any possibility to create a personal view of some data..? I mean - I'd like to see only my current speed, ans average speed, and distance to next waypoint on my route and total distance I travelled from starting route - or something other data. And now when I'm on bike I have to stop and then I can make some clicks and check those data.

But it would be great to make it possible to create simple (XML?) sheet, where user can define position of those numbers, size of fonts and what numbers to show... Right now using "1" key cycle us through many screens with many data - much of them very usable, but completely unusable even on smartphone with big screen - because it's too small. It could be a great feature for users - and for You it could solve problem of grouping data and choosing how to show them - when user would be able to create his view (I took this idea from Trekbuddy - power of that soft is in this one thing that it's very customizable. For example - when I'm on trip on bike - I don't have time during ride to see on screen of my smartphone, so I created there simple view - white background, black big fonts with needed data - and that is great :) Everything I need I have on one screen and I use only 0,00001 s to take a look - so no danger during ride;) Nice graphic is no needed here - the most important is functionality :) That's why I asked about key binding - for now I have to use menu to change / choose some things. But I don't have that time to do it when on bike / car - It would be to danger. And more danger can be zooming with eyes to see those little fonts.

I will have more stupid questions when I'm much familiar with Your software :) One thing I can say for sure - it's very good piece of Your work - and with some changes it can really kick ass of Trekbuddy. For now - It has more useful options that Trekbuddy - It's a big positive :)

I'm still wondering why it's free ;) You've made a huge work on it. I'm a programmer so I can really appreciate all of this :) Donations are good, but You never don't know how much to pay.. and If it's better to pay monthly smaller sum of once bigger ;) I'll handle with it this weekend I think - after I use tmj on real track in mountains and will have good comparison to Trekbuddy :) Can't donate both softwares - wife could kill me (instead of this that this soft gives her possibility to track me... ehh women).
 

Stephen

18:05
Friday
24-Oct-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

" I'm still wondering why it's free "

I'm beginning to wonder this myself as well, especially bearing in mind the time I spend on it! ;-)

" 1. Is that possible to remap key bindings - or to bind keys manually..? "

Its depends in what way you want to map the keys - if its just to improve the compatibility with a particular phone then I can probably compile a version specific to that handset, if you can let me know the keycodes for each key - Menu/Settings/Advanced/Show Debug Info then look for the KC code after pressing each key (Note:- this is actually broken in the current release, I'll have it fixed in a few days).
However if you want to map a particular function to a specific key this is a bit more tricky as things stand. The zero-key shortcut does allow this, is it that your phone has lots of spare keys which could each work like individual 'zero-keys'?

" 2. Is there any possibility to create a personal view of some data..? "

Currently this is fixed, though I have been meaning to add the ability to customise the Page 1 screens, along with the Plan/Map overlays, will get there eventually! Part of the problem of the small fonts is that J2ME only has 3 builtin font sizes - Small, Medium and Large, but even the Large one isnt all that big (if your screen resolution is 240x320 then most of the Page 1 items are already in the Large font!). So to draw really big text each character will need to be drawn from scratch, either by copying from an embedded PNG file or via vectors - I'll probably go the vector route, so it'll look a bit like an old-style digital watch!

Good luck in the mountains at the weekend!
 

docent

20:08
Friday
24-Oct-2008

" " 1. Is that possible to remap key bindings - or to bind keys manually..? "

Its depends in what way you want to map the keys - if its just to improve the compatibility with a particular phone then I can probably compile a version specific to that handset, if you can let me know the keycodes for each key - Menu/Settings/Advanced/Show Debug Info then look for the KC code after pressing each key (Note:- this is actually broken in the current release, I'll have it fixed in a few days).
However if you want to map a particular function to a specific key this is a bit more tricky as things stand. The zero-key shortcut does allow this, is it that your phone has lots of spare keys which could each work like individual 'zero-keys'? "


I got qwerty keyboard, so I have very much of free keys :) Generally it would be very helpful to bind keys to specific functions. You can choose most important functions and then make possibility to choose keys to bind to it - so users would be able to assign keycodes to those functions. It can be helpful not only to make easier to use soft - but for people who have problems with using TMJ. For example on IBM J9 I wasn't able to use keys which opens main menu and that right menu (with functional screen options). So I had to run through Esmertec JBED. Generally I know that sometimes there are problems with keys - that can be solved with changing key bindings (with creating some config file or something...).


" " 2. Is there any possibility to create a personal view of some data..? "

Currently this is fixed, though I have been meaning to add the ability to customise the Page 1 screens, along with the Plan/Map overlays, will get there eventually! Part of the problem of the small fonts is that J2ME only has 3 builtin font sizes - Small, Medium and Large, but even the Large one isnt all that big (if your screen resolution is 240x320 then most of the Page 1 items are already in the Large font!). So to draw really big text each character will need to be drawn from scratch, either by copying from an embedded PNG file or via vectors - I'll probably go the vector route, so it'll look a bit like an old-style digital watch! "


You can always let users upload their custom fonts - or just use some prepared fonts in bitmap or png or something.



About my weekend trip - this weekend unfortunately I have to finish repairs in home, so home sweet home until next week I think... But generally I'm sure I'll use tmj from now - I didn't start Trekbuddy for last 2 days - this is very good sign - the more I know your app the more I want to use it :)

I don't know If You know that in my country (Poland) one of map producers (hiking maps etc) sells maps in... Trekbuddy format also :) For them it's good business - they have digital versions of their maps so why don't sell it for others? And I think that for Kruch (Trekbuddy author) it's good too :) You can think about it - just an idea ;) http://www.compass.krakow.pl/sklep/?p=productsMore&iProduct=154&sName=-TrekBuddy <- here You can see it. They sell map of whole country (road map), and maps of almost all mountains.

And on other thing (the last one ;) ). I was looking for gps soft for my windows mobile phone for really long time. Believe me - I can use google very well and I know how to search. I tried about 30 different softwares (which in most didn't start on my phone). But I still don't know why I didn't found tmj. I knew about it on... Trekbuddy forum :) I tried with 'gps tracking' and 'windows mobile', java, j2me, gps mobile software etc - much of different keyphrases. Generally I started writing my own soft last month - but didn't have time yet to work on it to much because of this *&*^& repairs in my home and plenty of work in company where I work.. so tmj is like gift from heavens - I really didn't want to spend lots of hours on implementing soft that I was sure must exists somethere :) (but I was writing in C# for WM - don't like java for some reason... maybe weird because C# is very close to java).

Thanks a lot once again - I won't torture You with such large posts any more ;) It's my nature - sorry :)
 
 

Stephen

21:47
Sunday
26-Oct-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

" For example on IBM J9 I wasn't able to use keys which opens main menu and that right menu (with functional screen options)... "

Actually there is already a way to edit the JAD file if you want to specify different key mappings for the existing functions (eg UP, DOWN, LEFT, RIGHT, SELECT1, SELECT2, etc). You need to manually add a new line to the file before transferring/installing it to the phone. Some of the existing builds already have this line, though the 'Generic' ones wont have. It needs to start with the text "TMJ-Keycodes:" followed by a comma-separated list of keycodes. eg, this is the line from the SE JP8 file:

TMJ-Keycodes: 48,49,50,51,52,53,54,55,56,57,42,35,-1,-2,-3,-4,-5,-6,-7,-8,-8

The items should be listed in this order:
ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, STAR, HASH, UP, DOWN, LEFT, RIGHT, FIRE, SELECT1, SELECT2, BACK, CLEAR


Once I've released the update with the Keycode display fix noted in my previous message you can use the Show Debug Info option to find the keycode for the keys that you'd prefer to use...

" You can always let users upload their custom fonts - or just use some prepared fonts in bitmap or png or something. "

I've been experimenting with larger fonts today - I don't really want to go down the PNG route since it just adds to the JAR size (probably not such an issue for Windows Mobile phones but other phones have very limited resources!). Anyhow, my vector 'calculator-style' text seems to be working quite well. Its only for displaying numerals, but it should be fine as a large speedometer, etc. Will be in a forthcoming version...

Cheers,
Stephen
 

(You must be logged in to post a reply to this thread)