Sub ArdGpsHandleSpeedLine(L As String)
Dim P As Int = L.IndexOf("=")
If P <> -1 Then
Dim NumberString As String = L.SubString(P + 1).Trim
If IsNumber(NumberString) Then
Dim Speed As Float = NumberString 'could be merged into next line, but separate casting feels safer
ArdGpsHandleSpeed(Speed)
End If
End If
End Sub
Sub ArdGpsHandleSpeed(S As Float)
Log("Speed = " & NumberFormat2(S * 1000000 / 60, 1, 1, 1, False) & " mm/m")
End Sub
Sub ArdGpsHandlePositionLine(L As String)
Log(L) 'have left the fun bit for you ;-)
End Sub