How to start?
<-- Back to the GPS DLL Main Page
The best way is to take a look at the Visual Basic sample source. You
will notice there are just a few lines of code needed to get all the
important information from the DLL.
Choose the easy way. Simply copy and paste the code you need from the
Visual Basic sample projects into you own applications. Or, if you wish
work from a sample application and add you own code.
A Basic example:
The GPS DLL ( called: GPSV77K.DLL ) must always be located in the Windows
directory! In this case, the installation already has taken care of
this.
Renaming the DLL is possible.
Before you are able to get info from the DLL
you should first trigger the following functions:
(you need to do this only once)
Call serial&(1, 4800, 1, 8, 0,1)
Call receivebuffer%(600)
Call sentencetype%(1)
|
Now we can get, for example, the Latitude and
longitude
* It's a good idea to put the code below in a "timer" *
If gpslatitudeindication%(0) = 1 Then Lat_string = "N"
Else: Lat_string = "S"
If gpslongitudeindication%(0) = 1 Then Long_string = "E"
Else: Long_string = "W"
Label1.Caption
= gpslatitudedegrees!(0) & " ° " & gpslatitudeminutes!(0)
& " ' " & " " & Lat_string
Label2.Caption = gpslongitudedegrees!(0) & " °
" & gpslongitudeminutes!(0) & " ' " &
" " & Long_string
|
That's all...
For a description in more detail, please take a look at the source of
the Visual Basic sample programs.