nmea data is not in lat and long anyway. its in decimal. i have it.. for some reason i don't think it works in the EU.. but i'll give you an example of my code
So pretty much the section is in degrees and minutes.. the first chunk is free and the second is minutes and you just do the math. endpos will be the latitude
Code:Private Function getCurrentLat(ByVal curstr As String) As String ' first we break the string apart into degrees and minutes degree = Mid(curstr, 1, 2) minutes = Mid(curstr, 3, 100) ' now we do the nmea to latitude conversion endpos = (degree + (minutes / 60)) ' setting the label on the form also doing some formating lblLat = "Lat: " & Format(endpos, "00.0000") ' returning the value ' destroying vars degree = "" minutes = "" getCurrentLat = endpos End Function
longitude is the pretty much the same but
degree = Mid(curstr, 1, 3)
minutes = Mid(curstr, 4, 100)
that
EDIT: i am not a vb programmer.. in fact i HATE VB so the code sucks i'm sure but the concepts are there



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks