Hello Programmers!! Here's a perplexing project (for me), that I'm
sure an EXPERIENCED Visual Basic programmer can crank out in about 15
or 20 minutes. I've been working on a GPS tracking project in my spare
time, on and off for about 6 months now. I have recently started the
programming portion, and I am running into some problems. As my
language of choice (even though I have never programmed with it
before), I have chosen Visual Basic, therefore I need a Visual Basic
program (1 FORM), that accepts NMEA GPS sentences from a Garmin eTrex
GPS receiver (connected to the serial port), parses the data for the
current UTM time, latitude, and longitude, then displays and stores
the current UTM time, latitude, and longitude in a file!
The form should contain the following elements (I can add or delete
what isn't needed later):
1)a CONNECT and a DISCONNECT button (from the Garmin receiver). This
will obviously employ the MSComm object, but a simple
"variable=MSComm1.input" will NOT work - it has been tried by myself,
and friends dozens of times!! There is some additional
coding/formatting that is required.
2)a large TEXT BOX that displays all data (NMEA sentences) as it is
being transmitted by the receiver.
3)a TEXT BOX.... or label... that contains the CURRENT $GPGGA NMEA
sentence (this is the sentence that I am using to extract the Lat,
Lon, and UTM time.)
4)individual labels or text boxes for the current latitude & longitude
(with cardinal directions), and one for the current UTM time.
5)the program will write the current UTM time, latitude and longitude
(in that order) to a text file. Each time new UTM, Lat, Lon data
arrives, it should be written to a new line within the file. The file
should have a file name in the form of "timedate.txt"
(i.e.-10425206142003.txt - translated, this reads 10:42:52 06/14/2003)
- the TIME portion of the filename should be in 24-HOUR time, and not
12 hour time. A NEW FILE SHOULD BE WRITTEN EVERY 5 MINUTES!!! The
files can be written to the "c:\GPS" directory.
Criteria: I am not specific how you arrange anything on the form - as
long as it employs all elements. This is intended to be a somewhat
"real-time" application, so all the data should be continually
refreshed in the text-boxes and labels, until the DISCONNECT button is
clicked. The programmer who accepts this question should preferrably
HAVE either an eTrex receiver for testing purposes, or a comparable
receiver that outputs continuous NMEA sentences through a serial port.
I think that's about it. If anyone has ANY questions at all, please
don't hesitate to ask!!! Individually, the parts of this project
aren't that complicated, but since I am new at Visual Basic, perhaps
an expert could produce this in a more timely fashion than I could!!
Here is a sample of the NMEA output that the Garmin eTrex receiver
outputs.... Keep in mind, I am only interested in the $GPGGA sentence:
$GPRMC,210920,A,3341.9392,N,11155.4521,W,8.816,227.5,021000,12.3,E*5D
$GPGGA,210922,3341.9385,N,11155.4580,W,1,06,0.90,581.1,M,-26.1,M,,*4A
$GPGSV,3,1,11,20,73,241,45,22,57,092,43,01,50,322,42,28,50,158,44*77
$GPGSV,3,2,11,19,34,256,42,25,28,051,,13,21,302,39,27,11,247,32*76
$GPGSV,3,3,11,04,06,314,,11,05,201,25,03,03,137,*49
$GPRMC,210922,A,3341.9385,N,11155.4580,W,7.968,262.5,021000,12.3,E*54
$GPRMC,210924,A,3341.9375,N,11155.4629,W,8.098,248.8,021000,12.3,E*51
$GPGSA,A,3,01,28,19,20,22,11,,,,,,,1.50,0.90,1.20*0D
$GPGGA,210926,3341.9338,N,11155.4658,W,1,05,0.90,581.0,M,-26.1,M,,*4C
$GPRMC,210926,A,3341.9338,N,11155.4658,W,8.433,201.1,021000,12.3,E*5D
$GPGSV,3,1,11,20,73,241,45,22,57,092,44,01,50,322,38,28,50,158,41*78
$GPGSV,3,2,11,19,34,256,40,25,28,051,,13,21,302,23,27,11,247,*7E
etc...etc... |