UKHAS Wiki

UK High Altitude Society

User Tools

Site Tools


projects:tracker

This is an old revision of the document!


AJAX Tracker

Description

AJAX tracker to track payloads. Locations can be submitted to the tracker via email or via HTTP GET. Google Earth is also supported.

Screenshot

Download

Installation

  • Run the following SQL command on your database which creates the positions table:
 
  CREATE TABLE IF NOT EXISTS `positions` (
  `position_id` int(11) NOT NULL auto_increment,
  `mission_id` int(11) NOT NULL default '0',
  `vehicle` varchar(32) NOT NULL default '',
  `server_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `gps_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `gps_lat` double NOT NULL default '0',
  `gps_lon` double NOT NULL default '0',
  `gps_alt` double NOT NULL default '0',
  `gps_heading` double NOT NULL default '0',
  `gps_speed` double NOT NULL default '0',
  PRIMARY KEY  (`position_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
  • Copy all files to a folder on your server.
  • Edit config.php and track.kml
  • Google maps requires an API Key for each domain, sign up for one at http://code.google.com/apis/maps/signup.html and replace the key in index.php

Usage

Updates via Email

Send email to track@domain.com of the format:

N:firefly,T:233720,Lat:5142.8844N,Lon:00007.1758W,Alt:123.9,H:40,S:20.5km/h,P:yourpass

It's also possible to omit “km/h” and/or use decimal lat/lon:

N:halo,T:233720,Lat:51.71474,Lon:0.119596,Alt:123.9,H:40,S:20.5,P:yourpass

Note: Altitude is in meters, heading is in degrees, speed is in km/h, time format is hhmmss.

Updates via HTTP GET

To send an update via HTTP, send a GET request to http://domain.com/tracker/track.php with following variables (or any other variables supported by the tracker):

vehicle=halo
time=233720
lat=5142.8844N
lon=00007.1758W
alt=123.9
heading=40
speed=20.5
pass=yourpass

For example, you can do that by simply opening this URL:

http://domain.com/tracker/track.php?vehicle=halo&time=233720&lat=5142.8844N&lon=00007.1758W&alt=123.9&heading=40&speed=20.5&pass=yourpass

The best way is to use curl instead.

Note: Altitude is in meters, heading is in degrees, speed is in km/h, time format is hhmmss. Decimal lat/lon can be used, because the tracker auto-recognizes the format.

Live Pictures

1. Upload picture using curl:

curl -F userfile=@picture.jpg -F password=yourpass -F MAX_FILE_SIZE=1000000 http://domain.com/tracker/upload.php

2. Send HTTP GET request as above but with additional picture variable:

picture=picture.jpg

For example:

http://domain.com/tracker/track.php?vehicle=halo&time=233720&lat=5142.8844N&lon=00007.1758W&alt=123.9&heading=40&speed=20.5&pass=yourpass&picture=picture.jpg

Note that this is used as “meta data” for the picture only and is ignored as a location for the tracking map.

projects/tracker.1219886474.txt.gz · Last modified: 2008/08/28 01:21 by natrium42

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki