Solved

GPS connection

Posted on 2004-10-13
9
740 Views
Last Modified: 2008-03-10
Hi people, i really need some help!
I am a portuguese student, and i am making a final project which is about personal services for GPS.

Basicly i want to connect a Garmin eTrex GPS unit to my laptop. I use a proper cable to do that and the software that i am using is the OziExplorer
which allow me to extract some info from the GPS like (waypoints, tracks or routes). The problem is to send that information (the one from the GPS)
to a database in my laptop (Mysql). In other words, which do you think is the best way to make this connection?
1 - Make a program that could read the data from the GPS unit and that could send that data to my database (filling the tables and fields in DB)
2 - or, like i am doing now, using a software like the Oziexplorer and collect trought that software the wanted information to put in the database,
but how can i make that connection (software -> database) and which software should i use ?? Oziexplorer ??

Can anyone help me with that connection
 
Kind Regards

                           Psiu
0
Comment
Question by:psiubest
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 13

Expert Comment

by:imarshad
ID: 12306197
I will suggest you using the first approach i.e making a program of your own that will read GPS values from the GPS and then will add them to a database.....If you are using VB or any other progam as the frontend then it might not take more then 2-3 hrs to develop such a program......

Imran
0
 
LVL 5

Expert Comment

by:vilia
ID: 12308332
eTrex has 2 output modes: NMEA and a proprietary Garmin communication mode.

The easiest way is to copy GPS data from a COM port to a file. I use following batch file:

=== file cp2file.bat start =======================
mode com2 baud=4800 parity=n data=8 stop=1
if  "%1" == ""   goto toScreen
      type com2 > %1
goto end

:toScreen
      type com2
goto end

:end
=== file cp2file.bat end =======================

From command prompt:
      cp2file myLogFile.txt
or
      cp2file    (it will copy GPS output to the screen)


As the output file is in TXT format you can use whatever language/tools you know/prefer to load data into mySql.

(You need to specify GPS output format on eTrex: menu screen -> setup -> interface -> NMEA)

Note:
(1) Some times the very first &last lines of the log file are incomplete so you need to erase them manually.
(2) the example is for COM 2. If you use a different port change: com2 to comX.







0
 

Author Comment

by:psiubest
ID: 12308547
Thanks for the anwsers, but i am trying to find a program in Java, VB or PHP which can read the information from the GPS and add it to my DB (Mysql). Can anyone help me ?? Thanks
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Expert Comment

by:imarshad
ID: 12316249
Since this is your Final project so it is better if you write the program yourself......believe me it is very simple to write such a program once you know the development environment......

Imran
0
 
LVL 5

Accepted Solution

by:
vilia earned 500 total points
ID: 12319935
VB solution:

(A) GPS – PC communication

http://www.rentron.com/PicBasic/VB_PIC_TEMP.htm
      (look for: “The VB Code”)

If GPS in NMEA mode you need to change:
      MSComm1.Settings = "1200,N,8,1" 'Set baud rate
to
      MSComm1.Settings = "4800,N,8,1" 'Set baud rate



(B) data to mySql

http://www.vbmysql.com/samplecode/blob_dot_net.html

This is an ADO example (do not forget to install an ODBC driver)
0
 

Author Comment

by:psiubest
ID: 12321367
Vilia thanks for your anwser!

       The VB code seems nice but i think that it is for another type of aplication, the main routine of the program is for a temperature.
0
 
LVL 5

Expert Comment

by:vilia
ID: 12321770
Yes the communication portion IS for temperature. I have posted the link, as the one is a good example how to setup a COM port communication and read from the one.

I cannot see why it is a problem to write additional 10 lines of code to have the program you need?!
0
 

Author Comment

by:psiubest
ID: 12321819
The problem is that i dont know how to interpretate the NMEA protocol!
0
 
LVL 5

Expert Comment

by:vilia
ID: 12321957
> The problem is that i dont know how to interpretate the NMEA protocol!

The NMEA 0183 standard calls for data communication in the form of coded "sentences." Each sentence begins with the character "$" and ends with a carriage return and line feed.

Have a look at:
      http://home.mira.net/~gnb/gps/nmea.html
(there is a small communication program there. But I doubt the one is going to work on a newer Win platform.

For some NMEA sentence information:
      http://home.mira.net/~gnb/gps/nmea.html

To be in sync on the beginning of the communication look for CRLF and drop everything up to that point. After that read data – “sentences” (GPS is going to send them each second) find what they are ($….. CRLF) and store them as you want/need in mySql.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Embed kml in MS Access form 3 1,536
How to map property lines 6 572
MySQL and Geo based Data 2 706
Google Maps - differences between Android and PC versions? 10 327
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…
Suggested Courses

734 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