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
-
Run-time error '91'
by converter2009 (1 replies)
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
Related podcasts
-
Hanselminutiae #2
Scott focuses on portable GPS units in this show, with a few other geeky nuggets tossed on top.
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.