?
Solved

GPS Tracking Project

Posted on 2005-05-12
3
Medium Priority
?
1,410 Views
Last Modified: 2007-12-19
I am putting together my hobby project where I am planing to install in car GPS Tracking devices which can record all GPS data ,in some source of flash memory card, while I am driving around.  My objective is just to be able to come back and load all GPS data and getting information about where I was, how far I went from the orgin, how many stops I did, and how long I spend at each stop (time).  Also, It would be nice if i can lay over my travel route on some kind of maps.

So my questions are?
1.) what would be the best and inexpensive hardware device I can do for this project.
2.) Can anyone guide me for the directions in writing the program to read NMEA protocal which recorded from the hardware in question (1) and getting all kind of data I mentioned above.  For example, distance travels, number of stops, times per each stop and average speed traveling.
3.) How could I transfer the NMEA data and get my routing lay on the base map.  It can be either trasfered to some source of shapefile OR if anyone have better ideas.

Really appreciate for your help
kim
0
Comment
Question by:natachaiw
3 Comments
 
LVL 12

Accepted Solution

by:
fulscher earned 2000 total points
ID: 13986229
1 - any decent GPS device can track the path. So, solution (A) is to buy something like the Garmin Geko (available for ~ 100$) and configure it to use trackpoints. However, there is no standard for downloading the trackpoints; every manufacturer uses their own protocol. -- If you want to record data in NMEA format, you'd go for solution (B) and buy some recording device in addition to the GPS. You still could use some low-cost GPS like the Geko combined with some handheld PC, like the HP iPAQ. This solution is probably much more expensive. Solution (C) would be to add a low-cost portable PC in the car which continuously downloads the data (I use this solution). Most flexible but certainly the most expensive way.

2.1 - If you go for solution (A), download the data using some open source utility which converts into some more readable format. Check out, for example, http://pdos.csail.mit.edu/~decouto/garble/. For solutions B and C, you'd probably need some utility which captures the NMEA data on the fly and removes all sentences you don't need; otherwise, your log is growing full too quickly. I don't have a recommendation for a software, but there's probably lots's around.

2.2 - Decoding the data might prove an interesting exercise. Basically, there's always an error in the GPS data and the coordinates reported vary - even if you're standing still. So, to determine a stop, you must apply some filtering - if, for example, the position hasn't changed for more than 20 metres in more than 1 minute, this could be considered a stop. Remember though that in certain circumstances, the error in the reported position might be quite large (hundreds of metres if reception is poor).  -- If you want mapping, you could use one of many software packages - from low-cost to quite expensive - which can load track files and display them. I use Fugawi (http://www.fugawi.com/ ), but I'm not sure I'd recommend it. Fugawi and many others, like the one you can buy from Garmin (MapSource), can download and process track files directly.

2.3. - I'm not sure whether writing such a beast is a good idea; it might need a lot of work. Remember that NMEA and track logs are just a set of points indicating a recorded position at a point of time. If you'd want to work with vectors, you'd get basically a set of vectors connecting each tracked point to the next - not very useful. So, you'd need some clever processing of the data first (filtering and cleaning) to simplify the data. It certainly can be done, but I'd assume a couple of thousand lines of code for such a beast.

HTH, J.
0
 
LVL 13

Expert Comment

by:imarshad
ID: 13993451
>>1.) what would be the best and inexpensive hardware device I can do for this project.
I think the most inexpensive way of doing it is to use any low cost standard GPS module and make your own GPS Data logger hardware. It will include any low cost Microcontroller like ATMEL 89C51 or its variants (which we are using) or any low cost PIC Controller. There will be ROM for data storage (128kB is more then enough for your requirements). Then finally the circuit PCB or on a Vero Board etc. Putting it in simple words You will need to develop a circuit that will include Microcontroller, ROM and a GPS module. Your application build in the Microcontroller will read NMEA data from the GPS receiver and then parse it and store only specific info that you require.....
Note: This solution is only if you have experience with uControllers and electronics etc.

>>2.) Can anyone guide me for the directions in writing the program to read NMEA protocal which recorded from the hardware in question (1) and getting all kind of
>>data I mentioned above.  For example, distance travels, number of stops, times per each stop and average speed traveling.

If you will be using your own data logger then you can define your own protocol. i.e rather then storing full NMEA data you should store only pecific data in the logger.
Here is a Typical format that I used in one of my earlier projects.....

Time,Date,Latitude,Longitude,Altitude,Speed
hh:mm,dd/mm/yy,dd.dddd,dd.dddd,integer,float
You will see that you only require ~40 bytes to store one position record. With a 128 kB ROM you can store upto 3200 positions i.e if you log every minute then you can log roughly 54 hours of driving..... (All the calculations and requirements that you are talking of can be done with this data) Also note that you can reduce the size of a record by removing the altitude and year filed from date. Also simple changes like storing Speed as Integer can also increase the no. of records that you can save. In one of my latest projects we are able to compress the data in such a way that we can almost pack 3 months of data in the same 128 kB ROM.... But it is copyrighted so I cant give it to you......

Now suppose you have downloaded this data onto your computer then you will need to add this data into a database. After it has been added to a database the rest of caclulations is really easy. You can calculate your Average Speed, Maximum Speed, Distance Travelled, Stoppage locations, Stoppage Intervals etc. etc. with this data.

>>3.) How could I transfer the NMEA data and get my routing lay on the base map.  It can be either trasfered to some source of shapefile OR if anyone have better
>>ideas.

Since you are looking at low cost solution so I will suggest you to make an interface so that the data can be downloaded by attaching a serial port to the hardware. You can either give a connector for a  Serial Port in your car where you can plug a Laptop and fetch all the data or alternatively you can make your device pluggable and when you need to get the data simply unplug it from the Car and attach it to your computer...... Making Shape file from this data....... I will respond to this query later......

Please Note that this project requires quite a good knowledge of electronics and also much spare time as well as resources. Since I had all the resources at my workplace so I was able to complete the project in roughly 1 month.

Imran Arshad
0
 

Author Comment

by:natachaiw
ID: 14001844
Thank you both of you but how come I could not give you both a grade A for my appreciation really applogize for that though
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question