Solved

Process GPS coordinates in real time

Posted on 2011-02-16
6
1,493 Views
Last Modified: 2012-05-11
Hi

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!

Thanks!


0
Comment
Question by:Fritz41
  • 3
  • 3
6 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
Comment Utility
1. Any GPS device should be able to give you GPS at least in NMEA format (see e.g. here http://www.gpsinformation.org/dale/nmea.htm).
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: http://www.gavaghan.org/blog/free-source-code/geodesy-library-vincentys-formula/ - it's in c#.
For coordinates conversion, if you don't already have it, just google and you''ll see a lot of examples.
0
 

Author Comment

by:Fritz41
Comment Utility
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.


0
 
LVL 24

Expert Comment

by:alexey_gusev
Comment Utility
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 (http://gpsgate.com/), which hide many low-level details from you and allow redirecting GPS input to various sources.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:Fritz41
Comment Utility
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 gpsgate.com 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?
0
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
Comment Utility
absolutely :)

but you can donwload gpsgate and evaluate it anyway from here: http://gpsgate.com/products/gpsgate_client

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.
0
 

Author Closing Comment

by:Fritz41
Comment Utility
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.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running. Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detec…
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now