Improve company productivity with a Business Account.Sign Up


Process GPS coordinates in real time

Posted on 2011-02-16
Medium Priority
Last Modified: 2012-05-11

I am not familiar with GPS hardware and data protocols, so please excuse my ignorance with this question.

I have a database with items which have GPS coordinates as part of their attributes. I have an application that can display the items located within a certain radius of a GPS coordinate. What I now need to do is get a GPS tracking device and the software must then take the output from the device (say) every 20 seconds, and display items in the area of the current GPS coordinate. My client wants to drive around with the GPS tracking plugged into his laptop and have the database automatically filter and display items based on his location.

I have a pretty good idea how to program the software. If I can get the GPS coordinates into a text file or something every X seconds, then I can have the software read the text file content every X seconds and do the rest automatically (filter based on the last GPS coordinates).

My Question:
1. Are there devices that can continuously update the current GPS location in a file every X seconds?
2. If this is possible - where should I start looking for more information about devices and drivers to do what I want.
3. Any other advice welcome!


Question by:Fritz41
  • 3
  • 3
LVL 24

Expert Comment

ID: 34913896
1. Any GPS device should be able to give you GPS at least in NMEA format (see e.g. here
Mobile phones may have embedded GPS receiver. Anyway, GPS receivers usually pump the data to the com port, so you need to read it and handle. If you were running on some mobile OS, you could have more convenient APIs for getting GPS coordinates - so it'll be different for Android, WinMo, iOS, S60 etc. But in your case it seems to be reading from COM port and handling NMEA - mainly I guess converting from NMEA lat/lon format to decimal

2. It all depends on your GPS receiver - but I wouldn't expect anything extra if you're gonna plug it in into the laptop (assuming running some sort of Windows, although it would work with anything)

3. I assume you already have the code to calculate distances etc etc, but you might want to look at something like this library: - it's in c#.
For coordinates conversion, if you don't already have it, just google and you''ll see a lot of examples.

Author Comment

ID: 34919089
Thanks Alexey for your useful comment. This definitely helps me a lot, especially the link to the NMEA information. I am OK with using the GPS coordinates once I have it in memory. But I am still a bit vague as to how to get the NMEA code onto my computer, and how this works in practice.

Can you tell me if I am seeing this correctly:

1. I buy a device, e.g Garmin GPS. I plug it into my windows laptop with USB port.
2. I install software that comes with the device (???)
3. MOST IMPORTANT FOR ME - I use the software to tell the device WHERE (and how often) it should write the NMEA output to, e.g. (:C:\myGPSData\). Is this correct or am I totally wrong???.
4. The NMEA data is written every x seconds to a location, from where a listener program (.Net Windows program) can read the file, parse longitude and latitude from the NMEA code, and send a query to the database. Is this correct?

If any of the above assumptions are wrong or off-track, any re-direction will be much appreciated.

LVL 24

Expert Comment

ID: 34919358
well, in my understanding, all pp1-4 are wrong :), apart fro may #2 (ie you might need to install the software or drivers). GPS receivers usually have serial interface, not USB.

If I were you and need to do it on Windows, I'd have a look at the products like GpsGate (, which hide many low-level details from you and allow redirecting GPS input to various sources.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.


Author Comment

ID: 34920117
Thanks again Alexey. I don't think my problem is with the serial vs USB port, but whether or not I can configure the device to write the coordinates to a specific file and location.

I have emailed to see if their software can do what I need. If they can, I will mark your solution with A grade. If they do not come back to me I may hold out another few days to see if someone gives me a full solution. I hope that sounds fair to you?
LVL 24

Accepted Solution

alexey_gusev earned 2000 total points
ID: 34920243
absolutely :)

but you can donwload gpsgate and evaluate it anyway from here:

I think you shoudn't stick to the idea of reading from the file as it only adds complications, like shared access, tracking the position etc etc.

Author Closing Comment

ID: 34945621
Thanks Alexey. I downloaded GPS gate and, using the simulator function, I seem to be able to do what I need. I have not been able to test it with an actual GPS device, but I guess that will not be part of this problem.

Thanks again.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator ( This article presumes a wor…
Ready to kick start your career in 2018? Add app developer skills to your resume. January’s Course of the Month features Android App Development training with hands-on learning.  Read on to learn why these skills are important.
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…

606 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