Results 1 to 10 of 10

Thread: Personal GPS tracking?

  1. #1
    Variable Bitrate
    Join Date
    Feb 2006
    Posts
    393

    Personal GPS tracking?

    - delete this - I found what I was looking for.
    Internet dection


    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.

  2. #2
    Raw Wave justintime's Avatar
    Join Date
    Apr 2005
    Posts
    2,695
    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!
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


    Download the NEXUS Skin for Centrafuse
    ...or even Listen to my music

  3. #3
    Variable Bitrate
    Join Date
    Feb 2003
    Location
    SE, PA
    Posts
    305
    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
    G945GLCF2 | 512MB RAM | 160GB HD | Holux GPS w/ Routis | XMPCR w/ TOSLINK mod | Audigy 2 NX | | Xenarc 700TSV |Opus 150W PSU.

  4. #4
    Low Bitrate
    Join Date
    May 2007
    Posts
    97
    Quote Originally Posted by blazinlow View Post
    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

  5. #5
    Variable Bitrate
    Join Date
    Feb 2003
    Location
    SE, PA
    Posts
    305
    Quote Originally Posted by Toxic0n View Post
    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&amp;v=2&amp;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>
    G945GLCF2 | 512MB RAM | 160GB HD | Holux GPS w/ Routis | XMPCR w/ TOSLINK mod | Audigy 2 NX | | Xenarc 700TSV |Opus 150W PSU.

  6. #6
    Variable Bitrate
    Join Date
    Feb 2003
    Location
    SE, PA
    Posts
    305
    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
    G945GLCF2 | 512MB RAM | 160GB HD | Holux GPS w/ Routis | XMPCR w/ TOSLINK mod | Audigy 2 NX | | Xenarc 700TSV |Opus 150W PSU.

  7. #7
    Low Bitrate
    Join Date
    May 2007
    Posts
    97
    That looks great, thanks!

  8. #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..

  9. #9
    Low Bitrate
    Join Date
    Jan 2008
    Location
    MD, USA
    Posts
    104
    Going to give this a try also. Thanks.
    CarPC: Mini-MAC Coming Soon!

  10. #10
    Raw Wave justintime's Avatar
    Join Date
    Apr 2005
    Posts
    2,695
    GoopS does the tracking, and it does it PERFECTLY. Well worth the $15 I paid!
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


    Download the NEXUS Skin for Centrafuse
    ...or even Listen to my music

Similar Threads

  1. tracking police gps
    By geoff897 in forum GPS
    Replies: 39
    Last Post: 09-10-2010, 11:43 PM
  2. Track my vehicle REAL TIME GPS
    By L33TZOR in forum Wireless Communications
    Replies: 12
    Last Post: 11-07-2007, 04:38 PM
  3. Open source GPS tracking (for your car)
    By omehegan in forum GPS
    Replies: 6
    Last Post: 11-11-2005, 12:24 PM
  4. GPS Tracking
    By OriginalNick2 in forum Centrafuse
    Replies: 28
    Last Post: 01-21-2005, 04:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •