Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
_LEM_
Old
(Last edited by _LEM_; 8th June 2012 at 04:14 PM.)
#1  
_LEM_'s Avatar
Senior Member - OP
Thanks Meter 70
Posts: 2,253
Join Date: Mar 2006

 
DONATE TO ME
Default TrackMe's web development and user plugins. Developers welcome!!

As some people suggested I'm creating an specific thread for TrackMe's web development.

TrackMe is a free GPS/WiFi/Cell ID tracking tool. You can watch your tracks (saved or live) with Google Earth, Google Maps (or any tool that accepts KML or GPX files). It also includes many other options and features.
You can also watch your tracks from the web. This thread is focused on that part.

TrackMe is available for Android, Windows Mobile and Windows Phone 7. Check my signature for support for each version.

Visit TrackMe's web page


If you are interested you can contribute working on one of the existing viewers or creating one of your own.


OFFICIAL RELEASE

Authors
pammetje, mcross, jcleek and Staryon (only TrackMe client<->server communication)

Database
MySQL

Language
PHP

Download
Press here to download the latest version

Screenshots

Try my apps and games!

TrackMe GPS/CellID tracking tool that records your positions and display them in realtime (or recorded trips) on Google Earth and GM. Available for Android,WP7 and WM
Distant Galaxies Classic space shooter game. Available for WP7 and WM,Xbox,PC
CatchMe Know how far is another phone and what direction you need to follow to reach it with no internet connection. Available on WM

Please if you like my software. A good motivation for development and updates! Thanks!
The Following User Says Thank You to _LEM_ For This Useful Post: [ Click to Expand ]
 
_LEM_
Old
(Last edited by _LEM_; 2nd February 2009 at 05:27 PM.)
#2  
_LEM_'s Avatar
Senior Member - OP
Thanks Meter 70
Posts: 2,253
Join Date: Mar 2006

 
DONATE TO ME
Here is some description for the TrackMe-Server communication

Requests.xxx file
Code:
All requests
------------

Result:1 User correct, invalid password.
Result:2 User did not exist but after being created couldn't be found.
Result:3 User or password not specified.
Result:4 Unable to connect database.
Result:5 Incompatible database.


Action="delete"
---------------

Result:0 OK


Action="deletetrip"
-------------------

Result:0 OK
Result:6 Trip not specified.
Result:7 Trip not found


Action="addtrip"
----------------

Result:0 OK
Result:6 Trip not specified.


Action="renametrip"
------------------

Result:0 OK
Result:6 Trip not specified.
Result:7 New name not specified.


Action="findclosestbuddy"
-------------------------

Result:0|DISTANCE|DATEOCCURRED|USERID              
Result:6 User has no positions.
Result:7 No positions from other users found.



Action="gettriplist"
------------------

Result:0|NAME1|DATE2\nNAME2\DATE2\n ...  
Result:6 Trip not specified.
Result:7 New name not specified.



Action="geticonlist"
------------------

Result:0|ICON1|ICON2|ICON3 ...



Action="upload"
------------------

Result:0 OK
Result:6 Trip didn't exist and system was unable to create it.
Result:7|SQLERROR   Insert statement failed.


Action="sendemail"
------------------ 

Result:0 OK



Action="updateimageurl"
------------------ 

Result:0 OK


Action="findclosestpositionbytime"
----------------------------------

Result:0|POSITIONID|DATEOCCURRED
Result:6 Date not specified
Result:7 No position for user found.


Action="findclosestpositionbyposition"
--------------------------------------

Result:0|POSITIONID|DATEOCCURRED|DISTANCE
Result:6 Position not specified
Result:7 No position for user found.


Action="gettripinfo"
--------------------

Result:0|totalmiles|startdate|enddate|totaltime|totalpositions|maxspeed|avgspeed|maxaltitude|avgaltitude|minaltitude
Result:6 Trip not specified
Result:7 Trip not found


Action="gettriphighlights"
--------------------------

Result:0|Latitude1|Longitude1|ImageURL1|Comments1|IconURL1\nLatitude2|Longitude2|ImageURL2|Comments2|IconURL2\n ...
Result:6 Trip not specified
Result:7 Trip not found
I will be adding the rest of the files later...
Try my apps and games!

TrackMe GPS/CellID tracking tool that records your positions and display them in realtime (or recorded trips) on Google Earth and GM. Available for Android,WP7 and WM
Distant Galaxies Classic space shooter game. Available for WP7 and WM,Xbox,PC
CatchMe Know how far is another phone and what direction you need to follow to reach it with no internet connection. Available on WM

Please if you like my software. A good motivation for development and updates! Thanks!
 
_LEM_
Old
(Last edited by _LEM_; 22nd July 2009 at 05:35 PM.)
#3  
_LEM_'s Avatar
Senior Member - OP
Thanks Meter 70
Posts: 2,253
Join Date: Mar 2006

 
DONATE TO ME
Plugins


1. TrackMe (NMEA records) to OziExplorer (.plt) converter by tahdor

Description:
Simple perl script which takes the TrackMe (NMEA records) and put them as OziExplorer (.plt) format. Then you can open the .plf record in GpsVp to view the track.

Code:
# TrackMe.To.GpsVp.pl
#

$pll_ifname = "/Program Files/TrackMe/gpspositions.txt";
$pll_ofpath = "/Storage Card/Maps gpxVPTracks/";
#$pll_ifname = "gpspositions.txt";
#$pll_ofpath = "";

$pll_ofname = "gpspositions.plt";
$pll_ofname_date = "";
$maxtrack = 12;

sub pls_open_infile {
	local ($pll_ifname, *PLL_F_IN_FPTR) = @_;
	if (! open (PLL_F_IN_FPTR, "$pll_ifname")) {
		warn "$pll_ifname: $!\n";
		return -1;
	}
	return 0;
}

sub pls_open_outfile_overwrite {
	local ($pll_outfname, *PLL_F_OUT_FPTR) = @_;
	if (!open (PLL_F_OUT_FPTR, ">$pll_outfname")) {
		warn "$pll_outfname: $!\n";
		# die "$pll_outfname: $!\n";
		return -1;
	}
	return 0;
}


sub pls_open_outfile_append {
	local ($pll_outfname, *PLL_F_OUT_FPTR) = @_;
	if (!open (PLL_F_OUT_FPTR, ">>$pll_outfname")) {
		warn "$pll_outfname: $!\n";
		# die "$pll_outfname: $!\n";
		return -1;
	}
	return 0;
}

if (&pls_open_infile($pll_ifname, PLL_F_IN_FPTR) < 0) {
	die "couldn't open output file $pll_ifname\n";
}
if (&pls_open_outfile_overwrite($pll_ofname, PLL_F_OUT_FPTR) < 0) {
	die "couldn't open output file $pll_ofname\n";
}


sub output {
	if ("$lat_rmc" ne "0") {
		print PLL_F_OUT_FPTR sprintf ("%2.7f,%2.7f,0,%3.1f,%d,%s,%s\n", $lat_rmc,
			$long_rmc, $alt_gga * 3.2808399, 0, $date, $time_rmc);
	}
}

sub latitude {
	my ($deg, $min) = unpack "a2a*", $_[0];
	my $lat = $deg + $min / 60;
	$lat = - $lat if $_[1] =~ /[Ss]/;
	return $lat;
}

sub longitude {
	my ($deg, $min) = unpack "a3a*", $_[0];
	my $long = $deg + $min / 60;
	$long = - $long if $_[1] =~ /[Ww]/;
	return $long;
}

while ($line = <PLL_F_IN_FPTR>) {
	chomp($line);
	@field = split /[,*]/, $line;
	SWITCH: {

		# recommended minimum specific GPS/Transit data
		if ($field[0] =~ /GPRMC/) {

			# $time_rmc = join ':', unpack "a2" x 3, $field[1];
			$time_rmc = join '.', unpack "a2" x 3, $field[1];
			$ok_rmc = $field[2];
			$lat_rmc = latitude(@field[3..4]);
			$long_rmc = longitude(@field[5..6]);
			$speed = $field[7];
			$cmg = $field[8];
			#$date = join '-', unpack "a2" x 3, $field[9];
			$date = substr($field[9],4,2) .'-'. substr($field[9],2,2) .'-'. substr($field[9],0,2);
			$mvar = $field[10] . $field[11];
			# field[12] is checksum


			if ($date ne $pll_ofname_date) {
				$pll_ofname = $pll_ofpath . "Tm.$date.$time_rmc.plt";
				$pll_ofname_date = $date;
				if (&pls_open_outfile_overwrite($pll_ofname, PLL_F_OUT_FPTR) < 0) {
					die "couldn't open output file $pll_ofname\n";
				}
				print PLL_F_OUT_FPTR "OziExplorer Track Point File Version 2.1\n";
				print PLL_F_OUT_FPTR "WGS 84\n";
				print PLL_F_OUT_FPTR "Altitude is in Feet\n";
				print PLL_F_OUT_FPTR "Reserved\n";
				print PLL_F_OUT_FPTR "0,2,128,,0,0,2,0\n";
				print PLL_F_OUT_FPTR "1\n";
			}

			output();
			last SWITCH;
		}
	
		# GPS fix data
		if ($field[0] =~ /GPGGA/) {
			$time_gga = join ':', unpack "a2" x 3, $field[1];
			$lat_gga = latitude(@field[2..3]);
			$long_gga = longitude(@field[4..5]);
			$fixqual = $field[6];
			$nsat = $field[7];
			$hdop_gga = $field[8];
			$alt_gga = $field[9];
			# $field[10] is altitude units (always M)
			$gheight = $field[11];
			# $field[12] is geoid height units (always M)
			$DGPS_age = $field[13];
			$DGPS_ID = $field[14];
			# field[15] is checksum;
			last SWITCH;
		}
	}
}


2. User limitation for web viewer access by Real_Justus

Description:
Limit access to Web viewer for servers running in public mode

I was wondering how I could limit the access to my server. I wanted a group of users to be able to track all TrackMe clients via GoogleMaps.
The attached three files will enable a simple authorization for users. The server has to be installed accessable for everyone (public).
To create the authorziation, you have to edit .htaccess and htpasswd from the ZIP attached as follows:
1: Open .htaccess with the texteditor.
2: In the line "AuthUserFile" you have to add the WHOLE path to .htpasswd.
3: .htpasswd contains the users. The username is just plain text. The password is ht-encrypted. You can encrypt passwords here.
4: When both files are modifyed for your needs, upload them to the TrackMe directory on your server. If this is done correctly, a simple authorization is required for opening the webinterface for your TrackMe-server. All valid users can Track all clients.

If you don´t know the exactly path, upload phpinfo.php from the ZIP attached to the TrackMe directory on your server and open the file in your browser. (http://www.yourserver.com/TrackMe/phpinfo.php). Search for "Document_ Root" The path might be something like: /var/www/user/html/YourTrackMe/Directory. Insert the path in .htaccess

!!!Make sure to delete the phpinfo.php after use!!!

Files: Download



3. Plugin that allows you to assign multiple pictures to a single position by ElHozo

Description:
I've made a change in tod files of the server to allow view of multiple pictures in on dialog ballon. This (at least for me) is very usefull when you want to take many pictures from one place (no position change)


You have to edit to files

in request.php make this change to allow having multiples images in one single position record


Code:
if($action=="updateimageurl")
    {
    $imageurl = urldecode($_GET["imageurl"]);
    $id = urldecode($_GET["id"]);

    $iconid='null';
    $result=mysql_query("Select ID FROM icons WHERE name = 'Camera'");
    if ( $row=mysql_fetch_array($result) )
        $iconid=$row['ID'];

    /* HOZO 20/Jun/2009 : Esta es la modficacion que permite poner mas de una
     * imagen en un solo punto, pone las url una atras de otra saparadas por un
     * espacio. la linea que queda comentada es la original.
     * Ver en index.php el cambio que las muestra en el globo del dialogo */
    // BEGIN ORIGINAL CODE - MUST BE COMMENTED
    //mysql_query("update positions set imageurl='$imageurl',fk_icons_id=$iconid where id=$id");
    // END ORIGINAL CODE
    // BEGIN NEW CODE
    mysql_query("update positions set imageurl=CONCAT_WS(' ', imageurl, TRIM('".$imageurl."')), fk_icons_id='".$iconid."' where id='".$id."'");
    // END NEW CODE

    echo "Result:0";
    die();
    }
in index.php change this to show multiple images in one dialog balloon

Code:
     if($row['ImageURL'])
                        {
                           /* HOZO 20/Jul/2009 : Agregar este pedazo de codigo en reemplazo del orginal,
                           * la ultima linea que esta comentada es la orgiinal.*/
                          // BEGIN NEW CODE

                            // Por las dudas me aseguro de eliminar espacios duplicados
                            $row['ImageURL'] = eregi_replace ("  ", " ", $row['ImageURL']);
                            $row['ImageURL'] = eregi_replace ("  ", " ", $row['ImageURL']);
                            $stFotos = explode (" ", trim($row['ImageURL']));

                            // Armo la cantidad de columnas y tamaño de la imagen del globo
                            // de acuerdo a la cantidad de fotos que haya para mostrar
                            if (count ($stFotos) == 1)
                                {
                                $inFotosCols = 1;
                                $inImgWidth = 200;
                                }
                            else
                                {
                                $inFotosCols = count ($stFotos);
                                if ($inFotosCols > 16)
                                    $inFotosCols = 5;
                                else if ($inFotosCols > 9)
                                    $inFotosCols = 4;
                                else if ($inFotosCols > 3)
                                    $inFotosCols = 3;
                                $inImgWidth = ( 400 / $inFotosCols ) - 5;
                                }

                            $html .= "<tr><td>";
                            $html .= "<table>";
                            $inFotoIndex = 0;
                            while (list ($inKey, $szData) = each ($stFotos))
                                {
                                if ( ($inFotoIndex % $inFotosCols) == 0)
                                    $html .= "<tr>";
                                $inFotoIndex++;
                                $html .= "<td><a><img></a></td>";
                                if ( ($inFotoIndex % $inF";
                                }
                            $html .= "</tr>";
                            $html .= "</table>";
                            $html .= "</td>";
                            $html .= "</tr>";
                            // END NEW CODE
                            // La que sigue es la linea orignal de codigo
                            // BEGIN ORIGINAL CODE - MUST BE COMMENTED
                            //$html .= "    <tr><td><a><img></a></td></tr>";
                            // END ORIGINAL CODE
                        }
Know issues : The filed imgeurl in DB is limited to 255 chars, is better if you change this value to something bigger to fit more images urls.
I have included a ZIP with the two modified files

Files: Download
Try my apps and games!

TrackMe GPS/CellID tracking tool that records your positions and display them in realtime (or recorded trips) on Google Earth and GM. Available for Android,WP7 and WM
Distant Galaxies Classic space shooter game. Available for WP7 and WM,Xbox,PC
CatchMe Know how far is another phone and what direction you need to follow to reach it with no internet connection. Available on WM

Please if you like my software. A good motivation for development and updates! Thanks!
 
WatskeBart
Old
#4  
WatskeBart's Avatar
Senior Member
Thanks Meter 0
Posts: 191
Join Date: Apr 2007
Location: AMS-IX
Great new thread!
Let the development begin!
Think! Search Ask
 
20100v
Old
#5  
Member
Thanks Meter 1
Posts: 56
Join Date: Jan 2009
Location: Magny les Hameaux
With the advice of timoline I'm playing (and I'm trying to understand) with open-flash-chart.
Here is my first try :


When you move the mouse on the graphic, there is a sticker with the speed.
I'm trying to add the altitude on red with the Y axis right. But It doesn't works for now.

Thanks for your advice Timoline .
 
Diggen
Old
#6  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Dec 2006
Is there some sort of ocumentation about the TrackMe <-> Webserver communication? It would be nice if you can write a little about this.

I point as I browsed the source I saw that the password was transmit unencrypted maybe you can change that to md5 or somthing similar?

Btw. Trackme is a great App
 
_LEM_
Old
#7  
_LEM_'s Avatar
Senior Member - OP
Thanks Meter 70
Posts: 2,253
Join Date: Mar 2006

 
DONATE TO ME
Quote:
Originally Posted by Diggen View Post
Is there some sort of ocumentation about the TrackMe <-> Webserver communication? It would be nice if you can write a little about this.

I point as I browsed the source I saw that the password was transmit unencrypted maybe you can change that to md5 or somthing similar?

Btw. Trackme is a great App
Thanks.

Unfortunately there is not doc about the server-client communication.
However, feel free to ask any questions about that here.

Regarding the encrypted pass... yes, that's in the to-do list (actually it has been there for a long time) but there is something that I want to ask.

Let's suppose that from the client I do $encrypted = encode_md5(password)
And now that's what I send to the server.
On the server side, should I do $pass = decode_md5 ($encrypted) ?
or it's not necessary because I am going to store the pass already encrypted in the database?

And one more thing, what's really the purpose of that encoding? If somebody has access to the encrypted password, wouldn't he be able to do the same things than if it is not encrypted?
I mean if I my password is role392 and the encryped one is sadj2jkfDk43j54... what's really the difference? Both are like regular passwords.

I hope it makes sense.
Try my apps and games!

TrackMe GPS/CellID tracking tool that records your positions and display them in realtime (or recorded trips) on Google Earth and GM. Available for Android,WP7 and WM
Distant Galaxies Classic space shooter game. Available for WP7 and WM,Xbox,PC
CatchMe Know how far is another phone and what direction you need to follow to reach it with no internet connection. Available on WM

Please if you like my software. A good motivation for development and updates! Thanks!
 
Diggen
Old
#8  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Dec 2006
It makes more or less sense
Normal a webapp stores the password 'encrypted' with md5 in its Database. From the Login it gets clearly send per Post and the server will 'encrypt' it. Then it verfy it against the md5 hash in the db. You will be still able to sniff it but if the DB gets hacked you will only have the md5 values which can't be decoded. Also because of the Post-Method the Pass is not clearly visible in the URL.

Thats not much secruity but a little more. Maybe you can XOR the md5 with the actuall hour/minute at the client side and send it. At server-side you will do the same with the saved md5 an look if they are the same. This is a little more secure but not much.
I hope you understand me and my 'broken' Englisch


For the Docs I will have a look at the code when there is Time because I'am on a tenancy changeover(?).
 
WatskeBart
Old
(Last edited by WatskeBart; 7th February 2009 at 01:25 PM.)
#9  
WatskeBart's Avatar
Senior Member
Thanks Meter 0
Posts: 191
Join Date: Apr 2007
Location: AMS-IX
Smile Language Update

I've updated the dutch part in the language.php from jcleek's web viewer.

See attachment:
Attached Files
File Type: zip language.zip - [Click for QR Code] (6.0 KB, 94 views)
Think! Search Ask
 
Go3Team
Old
(Last edited by Go3Team; 1st February 2009 at 10:20 PM.)
#10  
Junior Member
Thanks Meter 0
Posts: 12
Join Date: Dec 2008
I've been working on my own server development, at the moment I have:

1. Weather at the persons current or last postion.
2. Address of the persons current or last position (I think US only)
3. Geofence option that texts whoever the user wants to text when the user has entered a predefined area.
4. Ability to place markers on the map for whatever purpose the user chooses, business, personal or otherwise.
5. The server stores the mileage driven in each state or country if the user chooses for fuel tax or other reasons.
6. Server is not just limited to Trackme, it can also be an alturl for Mologogo, and a custom server for GPSGate. Server still retains all Trackme functionality.

http://fleettracking.fleettrack.net/maps.php

The frontend is still a little "raw", as I am concentrating on the back end for the moment.

 
Post Reply+
Tags
cell id, gps, tracking
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...