This object is in archive! 

Live Tracking to (user-defined) URL

hikebikemap.org shared this idea 12 years ago
Completed

Hi,


OsmAnd has recently gotten support for Live Tracking where you can give a random URL and add placeholders for lat, lon, timestamp, hdop, altitude and speed. It then pings this URL with a user-defined time interval.


This would be a nice addition for people like joeloc (in the Locus forum) who are doing long tours with live reporting.


Bonus points for having some traffic-optimizing behavior like not pinging the server if the user did not move, and also for caching the data when the server is not reachable.

Replies (78)

photo
0

bump it up ;)

photo
0

Would consider using this for pinging http://shareyouradventure.com with my location.

photo
1

"Social Hiking requires a Twitter account to login"...


is that correct?

photo
0

Yes to create an account; but Phil has a couple of options on location services - ViewRanger BuddyBeacon, InstaMapper, SPOT, and geolocated tweets. So I guess we`d need some sort of location server for this to work.

photo
0

Live tracking feature. Would you be implementing this very useful feature on the app?


This reply was created from a merged topic originally titled


<a class="notranslate" href="https://getsatisfaction.com/locus/topics/live_tracking-xr25w" rel="nofollow" target="_blank">Live tracking.</a>.

photo
0

same ideas merged into this topic

photo
0

Fine, new version is on Google Play and except common bugfixes and some GUI improvements, I would like to include any new feature. This seems to be one of "most wanted" and quite interesting. So will you help me with it? :)


I would like to discuss what settings is needed for this and how whole system should work. I personally think that it should be similar to for example "Parking feature". So some screen with settings and when you confirm this, you`ll see in notification bar that some action is running with ability to cancel it or change settings. What you think?


Second part is what settings is needed ... URL and time interval should be enough?


Last part is system for creating URL, what should contain and how it may look like ...


comment are welcome because I have no experience with this system!

photo
0

Just thinking ahead, this new feature should de designed from the beginning to integrate cleanly with any new Locus PC program, if something like that is in the future.

photo
0

can`t imagine how to ...


you mean something like sending information to your desktop application? I think that there still have to be some server between it.

photo
0

Yes of course. Private accounts on Locus server. :)

photo
0

I would certainly be interested in supporting Locus as a location source for shareyouradventure.com if this was implemented. From a user`s point of view, caching data when out of signal is probably a must. For implementation, handy settings are for `how often to ping data to url` and `how much data to ping` - this gives real flexibility for the user on whether to share occasional points or detailed legs of a route on a regular basis. Both this and caching however opens a can of worms as the amount of data to be sent starts exceeding a GET ping, and you start drifting towards POST calls - so I suppose the best fit `simple` solution is for the user to provide a url to which data is then posted in a standard format.

photo
1

My ideas


->1.:


see text in topic:


"Send a string with some placeholder"


The placeholder already exist .


In the customscreen tutorial (http://forum.asamm.cz/viewtopic.php?f... find all informations.


eg.


{lat_gps}


{lon_gps


{altitude}


{accuracy}


{time}


{speed}


...


...


The guys only have to write a looong string in the config :)


eg:


"https://myserver.com/store.php?login=...,


,{lon_gps},{altitude},{accuracy},{time},{speed}"


Helpfully would also be a "real string" check in the config.


to view the whole crap before i send a wrong string for all times.


---------


-> 2.:


Send my pos every x minutes a "DATETIME.kml" to my Dropbox, email, whatever.


---------


->3.:


My ideas for the future(!)


# Send my pos. every x minutes to the Locus Server and store it. :)


# My partner (also with with LocusPro on his mobile) can login, search for IDs and see my last pos. on the screen. Different to all tools on market: It`s possible to see the partner on custom maps. All tools on the market can do this only with google or OSM. (i think)


# Repetition rate to get the Pos can be set too.


# Retrieve different IDs per query.


# Teammate (ID) can displayed like a POI


# Different IDs - different POIs


This could make fun in a little team.


----------


-> 4.:


For the normal use (show my wife where i`m) we can use all the other apps from google play like Glympse or Latitude with Latify.

photo
0

The "how much data to ping" idea got me thinking that when you had to cache location data (say, 100 points) because there is no reception, the moment you *do* have a data connection again, you might want to start with submitting the most recent location point, then location point 50, then 25 and 75, etc., so as to gradually refining the route.


This is to give people looking at the location a rough idea where you went, even if your data connection is a mere trickle.


More intelligent algorithms would not upload point 50 but e.g. look at where the biggest gap (time-wise or distance-wise) could be filled in.

photo
0

Also think about the safety aspect. A possible rescue party will start looking for me at the last transmitted point if things go wrong. I will need to know where this point was. Locus must keep track of successfully transmitted points somewhere. I suggest a custom waypoint category for this where you add those points including date & time. Maybe limit this category to a hundred points and 24 hours or whatever and delete older stuff automagically.

photo
0

This would be really great.


At the moment I am using Big Brother GPS (opensource - http://bk.gnarf.org/creativity/bigbro... ) to do this. It would be really great to do it directly from Locus.


Data fields


name,


lat, (decimal degrees)


lon, (decimal degrees)


speed,


heading,


Time of fix (unixtime?).


For the settings.


URL


Update interval


username


Continous operation ?


GPS timeout ?


Buffer positions if no data signal (<=10?)


How about a flashing(when active) button that could be attached to the side panel to activate.


Sometimes there is a buffer (In times of no gprs - the messages are buffered and then sent when gprs is available again.) and an option to turn this off, as it can clog up the whole thing when in very poor reception areas.

photo
0

I`m not sure if someone already posted any sample site or not but this is first attempt for working GUI


but, have anyone idea, where should I test it? I don`t want to write own testing part on server, rather use some working server


also count that first solution will be only without caching. When this will work fine and GUI will be usable, I`ll start some works on caching and storing data in case of internet problems etc ...

photo
0

Hi Menion,


I setup a page that I think should be good for testing. I Can PM or email you the details if it is useful to you ?


Great stuff.

photo
0

sure it is. Whatever place useful for testing is welcome. Thanks :)

photo
0

email sent with details.

photo
0

Sputnik,


we already discuss some stuff by email, thanks for help. Anyway I have one question that should be useful for public also. You created for me web service based on Dadabik and some map framework. How complicated is to setup same system for personal usage?


Because I think that such service looks really nice and simple and mainly useful and I`m sure that not just me, but many other aren`t skilled with PHP. Is possible to setup such site without PHP knowledge simply? If so, is somewhere any "manual" for this? Thanks

photo
0

Hi Menion,


Dadabik is a frontend for a mysql database and unfortunately the mapping is not a framework.


The process is quite simple though. I would recommend a mysql database.


- First set up a mysql database with one simple table (see link at bottom). (loads of tutorials on the web and it is quite simple)


You write a script in php to accept the incoming data. Send your data to a file called something like collect.php which consists of the code below.


<?php


//DATA BASE CONNECTION DETAILS GO HERE


mysql_select_db($dbname);


/* Get the position data from the POST parameters */


$lat = $_POST["lat"];


$lon = $_POST["lon"];


$acc = $_POST["acc"];


$speed = $_POST["speed"];


$heading = $_POST["bearing"];


$user= $_POST["user"];


$alt = $_POST["alt"];


$text= $_POST["text"];


$time = $_POST["time"];


////////////// INSERT INTO DATABASE WILL LOOK SOMETHING LIKE THIS DEPENDING ON HOW YOUR TABLES/DATABASE ARE SET UP ////////////


mysql_query("INSERT INTO trackers (user, lat, lon, speed, heading, alt, Textfield, fix, type, unixtime, time_received ) VALUES(`$user`,`$lat`, `$lon`,`$speed`,`$heading`,`$alt`,`$text`,`$fix`,`$type`,`time`,`$time_received`) ")


or die(mysql_error());


////////////// CLOSE DATABASE CONNECTION ///////////////////////////////////////////


mysql_close($conn);


?>


Then you write a google map webpage in Javascript and feed the markers from another simple php script. see here :-


https://developers.google.com/maps/ar...


Finally you refresh the map manually or automatically. There are plenty of tutorials for more advanced google maps - You already now have the data feed from mysql.


Hope that makes some sense !

photo
0

May I suggest a counter that would sit on the screen somewhere and would count the number of successful messages sent. This would be very useful - It would tell you that it was working, It would remind you that tracking was switched on and it would give you an indication of your data connection strength.

photo
1

+1

photo
1

>Then you write a google map webpage in Javascript


>and feed the markers from another simple php script....


plz post an example too


thx

photo
0

Hi Gynta.


Its all in the link above. Start at the bit "Using PHP`s echo to output XML" about half way down the doc its probably the most straightforward method.

photo
1

oh... i see now :} thx


php, java and mysql service are already active on my webserver.


Well, so i will create my own website, maybe on next weekend :)

photo
0

I guess most people who have a website have access to php + mysql.(or should) and its fun to learn. For those that don`t, I think there are some free web hosts that offer mySQL and PHP.

photo
0

sounds would be nice as well... like a configurable beep for a successful transmission and another configurable beep for an error. and the successfully transmitted points should be stored in a special waypoint category as suggested above. i want to KNOW which positions were sent.

photo
0

for now, I`m marking this as completed because main requested part is done.


In next Locus version (probably during weekend) will be "Live URL tracking" feature without notifications and without any buffer so when there will be for example some internet troubles, data will be lost. After some testing, base on interest, I`ll gladly improve this feature

photo
0

I have been using hardware and software tracking for the last five years. This works better than any. Well done Menion.

photo
0

Tested this feature on a small moutainbiketrip this weekend. Works pretty good.


Wrote a small php for receiving the data and storing them in a text file and another one for displaying the points on an openlayers layer.


Next step for me: integrating in my opengts setup


Thanks for the feature!

photo
0

Hi guys, shall we continue? If there aren`t any problems with this service, we should improve it a little because I`m sure it`s still not perfect ...


so


1. have anyone any nice site that can use this feature? For testing and also to let other users know on what is this feature good


2. Joe wrote "Also think about the safety aspect. A possible rescue party will start looking for me at the last transmitted point if things go wrong. I will need to know where this point was. Locus must keep track of successfully transmitted points somewhere. I suggest a custom waypoint category for this where you add those points including date & time. Maybe limit this category to a hundred points and 24 hours or whatever and delete older stuff automagically. "


- I`m think about it ... is anyone also interested in this feature? Idea should be store all send data into CSV file on card, one day - one file in directory named by your Live tracking session, possible?


3. you want sound notifications? Something like on other places in application (beep or selection of sound and maybe just vibration)?


4. last this I have in mind is buffer. Here I have no clear idea how to work with it ...


so discussion is welcome

photo
1

1. Yes (URL will follow, when the time comes)


2. its done.


Locus currently send my Pos every 5 Minutes.


# A script stores all my Points in a DB.


# On my Site i see this "last Pos" Marker named "2012-50-10 17:15:25"


on the googlemaps - centered with my "last Pos".


# I can create a kml file with all my points to view a track in Google Earh


# I can delete all Markers.


# I can list all Markers.


# ...


3. Yes. Sound notification if "x" pakets can not be sent.


plz not "every 20 Seconds" - sometimes i have no data connect 2 hours.


4. YES plz! we need a buffer.


5 Status can look like:


"connect to (name) " | "number of packets sent" | "NOT sent (but buffered - sending later) eg. mypage | 45 | 12

photo
0

Hi Menion,


1. You might be interested in http://opengts.sourceforge.net/ It`s Java based I believe and accepts http protocol.


3. I would be much more interested in a counter in the notification area. (rather than sound) I think it would give a much better indication of throughput.


4. I have found buffers to be troublesome. When you have no data coverage the buffer fills up, then when you come back in to a slow connection area the device never gets a chance to empty the buffer, which clogs up the whole system.


I think it would be better to cache the positions when out of coverage, but always send the latest position first. Then maybe have a button where you could Fill in the missing data manually when in 3g or WiFi range or when you get home.


When you are being tracked it doesn`t really mater where you were, its much more important to know where you are !

photo
1

@4.


This needs tests before we can talk over there.


The packets are very very tiny - so i think that`s not a big problem for normal.


A tracking function without data connect is useless.


So we are talking about temporary outages.

photo
0

On a side note: in another topic guys want a more sofisticated GPS on/off protocol switcher because of battery problems/endurance.


And here we talk about live tracking with continous data connection? 4 or 5 hours max, I say. So is this for a handful of diehards that use an external power source or carry extra accu`s?

photo
0

or for these poor people who drive in a car.


yesterday i rode an 8hour tour on my mtb (with livetracking every 120 seconds) and still had power left in my mobile...

photo
0

Yes, I suppose it depends how the data is sent. If it`s individual http requests it can be quite cumbersome. My experience with this is from hardware trackers - I often need to switch off the feature.

photo
0

How about incorporating Michaels idea. For groups, clubs, teams to be able to see each other live in Locus would be great. The data is already generated/stored on the server side, Locus just needs to download it again as a KML,JSON,XML or GPX or whatever.


URL and update frequency perhaps. (you specify the structure of the data)


https://getsatisfaction.com/locus/top...

photo
0

yes I have very similar opinion as Sputnik. If it depend just on me, I`ll do storing all data to CSV table and no buffering. So if you`ll really need all data later, you can fill them from text file. Problem is also as Sputnik wrote, every "point" is send as separate HTTP request. Also feature is "live tracking" not "where you were before an hour" ...

photo
1

The buffer idea (csv,txt.log what ever) implemented a


"Auto(!) send buffer when you have a data connection"-function.


On my side, i dont need a "backup" system.


I dont need this data later at home. if i want this -> i recording a track.


The visitor of the website(!) would like to see which route I`m gone, to arrive at position x.


What ever, you are right. important is: where am I now?


but this currently works...


btw.


i like to know/see in the status: how many packets were sent / not sent.

photo
0

So first today improvements


- add sound & vibrate notifications (just GUI now)


- better design


what to do next:


- settings into notification part: "notify every X not send packets"


- create counter for send/not-send packets


- improve information in notification area


hope you agree with progress and also with design :)


photo
0

The new notifications are great, Thanks.

photo
0

fine. Again, after some testing, I can still make some improvements if there will be interest

photo
1

Works for me with the new "name | sec | y / n" status. so its done.


But if u want something to improve, look at landscape mode.


This works only fine with tablets. With a normal phone its senseless to use it.


The usable landscape screen is "smaller" than in portrait mode:


photo
0

hmm you`re correct, thanks. I`ll try to reduce left panel or maybe allow this dual screen only on tablets

photo
1

of course i`m correct :)


(I`ve already told you in http://forum.asamm.cz/viewtopic.php?f...) but you are not listening to me - like my wife. hehehe

photo
0

heya.


I thought I would try out the live tracking feature, its close to something i was working on using tasker.


However I am having problems passing the string on Locus.


post.php?appid=locus&lat={1}&lon={2}


using brackets, percentages or any other string identifier seem to crash locus. Not sure what i am doing incorrectly.

photo
0

similar syntax was in one of first versions ...


now you only have to set "Base URL" - in your case only "post.php?appid=locus" and method below GET/POST


all parameters will be automatically added to request based on selected method


and thanks for unwanted report about crashes. Locus should notify that URL is not correct but not crash, I`ll look at it

photo
0

we have success lol. its now recording. silly me.

photo
0

what time parameter must i set to be compatible with osmands [2] value? please enlighten me :).


also... does locus send local time or gmt straight from gps? an option might be handy here.

photo
0

ps, transferred points are not yet stored in waypoint database are they? or am i simply too blind to see it?


if the database thing is too much work, at least the very last successfully transmitted point should be visible on the map.

photo
1

visible on the map? for what? i open my eyes and i see where i am ;)

photo
1

Locus send "phone time".

photo
0

i explained it in this thread about a month ago iirc. it is important for security/rescue reasons to always know exactly which position was last transmitted.

photo
1

hm yes i know this post.


but its not important for me to see the last succesfull transmitted point in Locus.


This successful transmitted point is visible on your website.


Otherwise, the point would not be successfully transferred. :-}

photo
0

Hi Menion. I love this feature but the best usage for me and my teammates (while on airsoft "mission") would be if we can see each other ́s live (last) position in Locus so I support Michael and Sputnik in this wish...


Would be great to see when the team member was at that position (not when uploaded by him or downloaded by me) and if each team member (poi) could have it ́s own icon (selected by me in options) it would be the best!


Anyway thanks for the great job you have been doing here...

photo
1

it`s possible:


eg:


your mates start locus livetracker run in background.


member "mike" send http://domain.com/script.php?UID=mike....


member "carl" send http://domain.com/script.php?UID=carl....


member "jo" send http://domain.com/script.php?UID=jo&l....


all members open the normal browser: http://domain.com/whereareyou.htm


all members see three "last position markers" ("mike", "carl", "jo")


Everything you need:


a skilled "webmaster"


2 scripts and a mysql database.

photo
0

hehe, nice solution. But not just me, prefer direct integration in Locus. For this, suggest to support this idea https://getsatisfaction.com/locus/top... which allow some automatic fetching of data from external server (don`t have yet idea in which way but because of only 6 votes, it`s not so important now)

photo
1

Menion>"...support this idea https://getsati....


Dont need :)


My private service runs for me now.


And as Sputnik wrote: "...most people who have a website, have access to php + mysql.(or should) and its fun to learn..."

photo
0

guys, I just created description how to use Google Docs as a backend for Live tracking. Method is really simple and really works, nice ... suggest to try or at least look at it, mainly in case you`re not simple capable of creating own server side solution


http://docs.locusmap.eu/doku.php/manu...

photo
0

Cool !


Would there be a way of extracting this data back to Locus. And use this as a data format/template/standard for https://getsatisfaction.com/locus/top...

photo
0

Ok, works perfekt! Good instructions manual too!


Two minor points:


1. Could not find the "stop live tracking" button at first, only after tapping the profile name, the stop button shows up on top right.


2. Like with recording, maybe ad choice for track only whilst moving (speed > 0)


But otherwise impressive as always.

photo
0

Hi,


works great, using the manual I could log the data and show it on the map on my pc.


But: Using a smartphone (Android 2.1 or 4.0.3) I was not able to see the map when calling the google spreadsheet-link in various browsers (Opera, Miren, `on-board`-browser. Does anyone have an idea how to solve that?


Thanx


Lars

photo
0

Hi,


live tracking plays nice with freemap.sk location services (early beta for long time)

photo
0

hmm guys, if there will be any working online solutions, maybe we can create something like "Recommended"? List of known working solutions where tapping on it, will add completely filled page into "Live tracking" servers list ...

photo
0

I used to use gpsgate.com Buddytracker service. It`s no longer available, but I believe you can use the full server software for up to 5 users for free. It`s very good.


I used to send it positions via HTTP so it should be suitable. A good support forum too.


http://gpsgate.com/download

photo
0

Yeah, I see. Took me some time to find out.


In Google Drive, open your document and under "File"` select "Publish on the internet". In the popup you see a link. Use that link to open the sheet and map in your browser. It has "pub" in it and &output=html at the end.


Works for me on Android 2.1.


This is the link you would share with your friends.

photo
1

looks nice - I can`t say exactly - can`t read it :}


maybe you have a short description to test it. thx

photo
1

Menion: "hmm guys, if there will be any working online solutions, maybe we can create something like "Recommended"? List of known working solutions where tapping on it, will add completely filled page into "Live tracking" servers list ... "


---


I created a test service today. read more:


http://forum.asamm.cz/viewtopic.php?f...

photo
0

When will this live tracking feature be available for the "dumb" masses, like I make part of? For the people that have no idea about servers or MySQL, PHP and Java map programming skills?


I`m eager to use Live tracking but have no idea what server to use if any. Or where i can find it/them. And i don`t really unedrstand much of what you guys are saying above...


So please, a 3 or more step, little tutorial on setting up the Live tracking would be highly appreciated!


No. 1 Locus Lover, Lori ;)

photo
0

Hello Marosi,


most easier possibility for setting own server is here http://docs.locusmap.eu/doku.php/manu...


anyway plans for very simply usage within Locus are planned, it`s just matter of time ... (by own Locus server)

photo
0

@marosi: a bit higher up in this topic is described the Google Docs method. I am NOT a programmer but I could easy use that method, so try it.


Edit: aah, I did not follow Menions link!! Says the same, so no need for in-locus tricks :)

photo
0

it`s for sure similar to one I created on wiki ...

photo
1

Precisely for this case, I created a test page.


#Read this thread in the Locusforum: http://forum.asamm.cz/viewtopic.php?f...


# Apply for a free account.


# Setup Locus as described here: http://locus.oldboys.at/help.htm


and then your friends can see where you are...


if you have troubles - let me know!


post your problem also on http://forum.asamm.cz/viewtopic.php?f...

photo
0

ah damn, sure! I completely forget on this new nice project! Sorry Gynta :)

photo
0

shareyouradventure.com is in the testing phase of supporting this function. Based on this thread it looks like a buffer was never implemented, is that right? It`s too bad as when hiking, signal coverage can be spotty. Having the path get more accurate when it`s able to send the data would be ideal. Any thoughts on implementing this in the future?

photo
1

We already discussed about.


The result:


LIVE tracking should be LIVE tracking.


This function shouldn`t show you the past.

Replies have been locked on this page!