|
 |
03-09-2007, 04:47 PM
|
#1
|
|
Variable Bitrate
Join Date: Feb 2006
Posts: 345
|
Personal GPS tracking?
- delete this - I found what I was looking for.
http://www.mp3car.com/vbulletin/show...p+car+tracking
Given that this is down for a while and I don’t need anything fancy, has anyone done any work around a personal tracker?
What I am thinking of is just a simple utility that will grab open hotspots and connect when it can. If connected it would try an upload a text file with your current Lat/Long to a personal FTP space.
Has anyone ever built anything like that? I don't want to re-invent the wheel if it is already done.
Last edited by EricE; 03-09-2007 at 04:51 PM.
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
07-09-2007, 12:47 AM
|
#2
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
EricE:
I found that cool utility too... but how exactly are you using it to send out Lat/Long info? Are you FTP'ing the data to your server ? Where are you taking the Text file from?
Thanks!
|
|
|
07-09-2007, 03:06 AM
|
#3
|
|
Variable Bitrate
Join Date: Feb 2003
Location: SE, PA
Posts: 258
|
I have created my own GPS app. I dont use it anymore (no more wireless card) but it worked like this
1. A small program I wrote in VB takes the data coming into the COM port from the GPS receiver.
2. It parses the latitude/longitude from the NMEA string
3. Uploads via to my home computer via mySQL, putting the coordinates into a database every x seconds
4. Wrote a webpage using Google Maps to display my location, AJAX updates the page every few seconds with an updated map.
But again, there are already sites that do the same thing. i was just bored one day
__________________
Epia MII12000 | 512MB RAM | ATI TV Card | 60GB HD | Holux GPS w/ Routis | XMPCR w/ TOSLINK mod | Audigy 2 NX | WinALDL hookup | 10.4 Datalux LMV10R | Opus 150W PSU.
|
|
|
11-16-2007, 07:38 PM
|
#4
|
|
Low Bitrate
Join Date: May 2007
Posts: 88
|
Quote: Originally Posted by blazinlow 
I have created my own GPS app. I dont use it anymore (no more wireless card) but it worked like this
1. A small program I wrote in VB takes the data coming into the COM port from the GPS receiver.
2. It parses the latitude/longitude from the NMEA string
3. Uploads via to my home computer via mySQL, putting the coordinates into a database every x seconds
4. Wrote a webpage using Google Maps to display my location, AJAX updates the page every few seconds with an updated map.
But again, there are already sites that do the same thing. i was just bored one day 
Care to share the source code? This is exactly what I'm looking for
|
|
|
11-17-2007, 02:09 AM
|
#5
|
|
Variable Bitrate
Join Date: Feb 2003
Location: SE, PA
Posts: 258
|
Quote: Originally Posted by Toxic0n 
Care to share the source code? This is exactly what I'm looking for
Sure, I have to find the source files for the VB program, but here's the php code for the web page
Im not a professional coder, so Im sure my programming could be better, but it works - and sorry, I have a bad habit of not documenting my code
main index page (display's the animated map)
Code:
<?php
mysql_connect($hostname,$username,'$password');
mysql_select_db($dbname);
// Get last record from Database
$sql = "SELECT * from coords";
$result = mysql_query($sql);
$r = (mysql_num_rows($result)-1);
$sql2 = "select * from coords limit ".$r.",1";
$result2 = mysql_query($sql2);
while ($row=mysql_fetch_array($result2)) {
//Parse NMEA string into seperate longitude and latitude
$coords = explode(",", $row[0]);
$lat1 = substr($coords[3],0,2);
$lat2 = substr($coords[3],-7)/60;
$lat3 = $lat1+$lat2;
$long1 = substr($coords[5],0,3);
$long2 = substr($coords[5],-7)/60;
$long3 = $long1+$long2;
if ($coords[6] == 'W') {
$long3 = $long3*-1;
}
}
function str_split($str,$length = 1) {
if ($length < 1) return false;
$strlen = strlen($str);
$ret = array();
for ($i = 0; $i < $strlen; $i += $length) {
$ret[] = substr($str,$i,$length);
}
return $ret;
}
$time = str_split($coords[1], 2);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAqBZX38XlcwV2y-uXhUJ8LxTtF6vd6avXdzWhMPo0xyC3DWmL5BSoa6LanAhLDdQtPZeVzWiCzFTWLg"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(<?php echo $lat3 ?>, <?php echo $long3 ?>), 20);
var icon = new GIcon();
// image location is a png file used to display the vehicle, in my case I used a pic of my truck
icon.image = "$image location";
icon.iconSize = new GSize(24, 40);
icon.iconAnchor = new GPoint(12, 40);
icon.infoWindowAnchor = new GPoint(5, 1);
var point = new GLatLng(<?php echo $lat3 ?>, <?php echo $long3 ?>);
map.addOverlay(new GMarker(point, icon));
}
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 500px; height: 300px"></div>
<font face = "Arial" size = "2"><b>Map Last Updated <?php echo $time[0].':'.$time[1].':'.$time[2] ?></font>
</body>
</html>
__________________
Epia MII12000 | 512MB RAM | ATI TV Card | 60GB HD | Holux GPS w/ Routis | XMPCR w/ TOSLINK mod | Audigy 2 NX | WinALDL hookup | 10.4 Datalux LMV10R | Opus 150W PSU.
Last edited by blazinlow; 11-17-2007 at 02:12 AM.
|
|
|
11-17-2007, 02:51 AM
|
#6
|
|
Variable Bitrate
Join Date: Feb 2003
Location: SE, PA
Posts: 258
|
and here's the actual VB form that runs on the carputer, compile it to an .exe and you're all set...you gotta mess around with MSCOMM32.OCX - to be honest I forget, but google has tons of info - shouldnt be too hard.
http://www.filecrunch.com/file/~cmkvfo
I dont have the structure for the gps table, but it looks for a database called gps
the table is coords
you can figure it out in the code
__________________
Epia MII12000 | 512MB RAM | ATI TV Card | 60GB HD | Holux GPS w/ Routis | XMPCR w/ TOSLINK mod | Audigy 2 NX | WinALDL hookup | 10.4 Datalux LMV10R | Opus 150W PSU.
Last edited by blazinlow; 11-17-2007 at 02:56 AM.
|
|
|
11-18-2007, 03:22 PM
|
#7
|
|
Low Bitrate
Join Date: May 2007
Posts: 88
|
That looks great, thanks!
|
|
|
01-10-2008, 05:13 PM
|
#8
|
|
Variable Bitrate
Join Date: May 2003
Posts: 317
|
this is old, i know. But blazinlow, thanks for the code above. This is what im looking for...maybe i can try and expand on what you've done so far and upload more than just coordinates....perhaps speed, time...etc as well. Thanks again. Gonna test this out now..
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
01-31-2008, 04:11 PM
|
#9
|
|
Low Bitrate
Join Date: Jan 2008
Location: MD, USA
Posts: 84
|
Going to give this a try also. Thanks.
|
|
|
01-31-2008, 04:59 PM
|
#10
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
GoopS does the tracking, and it does it PERFECTLY. Well worth the $15 I paid!
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:29 AM.
| |