GPS connection

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
psiubestAsked:
Who is Participating?
 
viliaConnect With a Mentor Commented:
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
 
imarshadCommented:
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
 
viliaCommented:
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
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
psiubestAuthor Commented:
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
 
imarshadCommented:
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
 
psiubestAuthor Commented:
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
 
viliaCommented:
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
 
psiubestAuthor Commented:
The problem is that i dont know how to interpretate the NMEA protocol!
0
 
viliaCommented:
> 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
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.

All Courses

From novice to tech pro — start learning today.