Skip to content
This repository has been archived by the owner. It is now read-only.
Obsolete. Simple program to log data from legacy GPSD into MySQL database
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
COPYING
ChangeLog
Makefile.am
Makefile.in
README
aclocal.m4
config.h.in
configure
configure.ac
depcomp
geohist.init.gentoo
geohist.init.ubuntu
geohist.sql
install-sh
missing

README

geoHist v0.2 - (C)2007-2008 Dustin Spicuzza
================================================================================

This software is released under a modified BSD-style license agreement. Please
refer to COPYING for more information.

The latest version of geoHist can be obtained from 

	http://www.virtualroadside.com/geoHist/

This is a simple program I wrote to log GPS data retrieved from GPSD into a 
mysql database. It is designed to meet the following requirements: 

	* Standalone
	* Run from system startup to shutdown
	* Small/fast, non-intrusive
	* Robust
	* Log data to an SQL database
	* Export to GPX

Description
============

geoHist will poll GPSD every 10 seconds and then send that data to a 
preconfigured MySQL database. It will attempt to detect if you are standing 
still, and if you are then it will NOT log the data. It decides this using a 
simple drift factor. It will always log position to the database at least 
once if there is a satellite fix.

There is a program, geohistdump that can be used to export the GPS data from 
the MySQL database into a GPX formatted file. By default, it will export a GPX
1.0 file (because there is more information that can be output), but you can 
export to GPX 1.1 with the -v 1.1 option. 

I designed geoHist to be used with my linux-based car computer. It is designed
to be configured once, and (ideally) never touched again (except to export 
data).

System Requirements
====================
	
	* GPSD (http://gpsd.berlios.de)
	* A GPS device that works with GPSD
	* MySQL (http://www.mysql.com)

Installation
=============

This is your typical autotools-based install... 

	tar -xjf geoHist-XXX.tar.bz2
	./configure
	make && make install

Then, you need to create the table for geoHist to log stuff to. 

	mysql -u root -p < geoHist.sql

You will need to add geoHist to your system startup scripts somehow. I have
included a sample gentoo rcscript called geohist.init.gentoo, which should be 
copied to /etc/init.d/geohist. You can then run rc-update add geohist default
and it should start at bootup. There is an ubuntu/debian init script also,
called "geohist.init.ubuntu"

At the moment, there are no configuration files because I personally don't 
feel the need to do so at the moment. If you want to change something, then 
you must modify src/geohist.h, change the appropriate variables, and 
recompile. Feel free to send me a patch to fix that.

If you are having issues or to verify proper configuration, then you can run 
./configure using the option --enable-debug . Then you can run geoHist and 
it will print messages out to the console and tell you what its doing at 
the moment.

Export database to GPX Format
=====================

There is now a way to dump the data to a GPX file. You can
now use the geohistdump program to do this. 

Usage: geohistdump -adeflnrv [-t tracklist] [output filename or - for stdout]

  -l    list tracks
  -r    delete tracks (requires -t)
  -f    force delete tracks

GPX Output Options

  -n    File name/title
  -a    Author name
  -d    Description
  -e    Email address of author
  -v    GPX output format (1.0 [default] or 1.1)

Note that when you specify multiple tracks, they are actually written
to the GPX file as track segments, as part of one big track.

If you are interested in validating the resulting XML file, you can use
xmllint (from libxml2-utils in ubuntu) to do it: 

GPX 1.0 (default geoHist output)
xmllint --noout --schema http://www.topografix.com/GPX/1/0/gpx.xsd testfile.gpx

GPX 1.1
xmllint --noout --schema http://www.topografix.com/GPX/1/1/gpx.xsd testfile.gpx

Comments/Questions
===================

Feel free to drop me a line if you have any questions. If you have changes,
improvements, bugfixes, or whatever -- send me a patch. :)

Dustin Spicuzza <dustin@virtualroadside.com>


You can’t perform that action at this time.