B4J Question parsing GPS sentence

Discussion in 'B4J Questions' started by suciwulans, Jul 10, 2016.

  1. suciwulans

    suciwulans Member Licensed User

    how to parsing GPS sentence $GPRMC to get data longitude and latitude? any example code to parsing GPS sentence?
  2. Erel

    Erel Administrator Staff Member Licensed User

    Dim s As String = "$GPRMC,092750.000,A,5321.6802,N,00630.3372,W,0.02,31.66,280511,,,A*43"
    Dim parsed() As String = Regex.Split(",", s)
    If parsed(0) = "$GPRMC" Then
    Log($"Lat: ${parsed(3)}${parsed(4)}"$)
    Log($"Long: ${parsed(5)}${parsed(6)}"$)
    End If
  3. suciwulans

    suciwulans Member Licensed User

    i got lat and long in DMS (degree, minute,second) do you have example code to convert to decimal degree?
  4. eurojam

    eurojam Well-Known Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice