Library code snippets
VB6 NMEA Interpreter Class for Reading GPS
By Alex Etchells, published on 22 Feb 2006
This is a Visual Basic 6 version of Jon Person's .NET NMEA Interpreter Class as referenced in
'How to Write a GPS Application'.
GPStest.zip contains the class and a simple project demonstrating implementation.
'How to Write a GPS Application'.
GPStest.zip contains the class and a simple project demonstrating implementation.
Related articles
Related discussion
-
Key_Press() event for text box
by Aquila (1 replies)
-
Regarding Visual Basic Programme
by manjunathsl2007 (0 replies)
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
Related podcasts
-
Hanselminutiae #2
Scott focuses on portable GPS units in this show, with a few other geeky nuggets tossed on top.
I have a question regarding GPS bluetooth and programming in visual basic. Where and how do I specify to my VB project the port # of my GPS port? In other words my GPS's port is 41, in VB what do I need to do in order to connect to that port and get the info out of the GPS into strings in VB??
Anyone's help is greatly appreciated..
Thanks,
R..
Thank you for the compliment. =o)
It's interesting that using Time causes an error for you.
VB6NmeaInterpreter appends 'GMT' to the time string and this is what I see when I run the software, so I can be confident that I am seeing the satellite time.
I wonder what is making things different for you.
Certainly your suggested fix would avoid the issue in the test application.
Changing
Public Event TimeChanged(ByVal Time As String)
to
Public Event TimeChanged(ByVal satTime As String)
in the VB6NmeaInterpreter class would prevent any future confusion, if using the class in another application.
regards
Alex
Very useful code.
However there is an a error which prevents displaying "Satellite time"
The following references the "time" function instead of passing a variable:
Private Sub gpsTimeChanged(ByVal Time As String)
LabelTime.Caption = Time
End Sub
Accordingly the only time displayed is the system time, not the satellite time.
Suggested simple change:
Private Sub gpsTimeChanged(ByVal CTime As String)
LabelTime.Caption = CTime
End Sub
The software in which I was using this class started throwing up the odd runtime error.
To cut a long story short the GPS unit in question was sending truncated sentences and very occasionally the last 2 characters of the truncated sentence happened to equal the checksum resulting in an incomplete sentence being treated as valid.
Here is the replacement
IsValidfunction to prevent this from happening.Alex
As I delve deeper into NMEA sentences I am improving my understanding.![Surprise [:O]](/emoticons/emotion-3.gif)
The value that is extracted from the GGA string as 'altitude' is in fact the height
above the WGS84 ellipsoid and not altitude.
Alex
This thread is for discussions of VB6 NMEA Interpreter Class for Reading GPS.