If you need NMEA sentences then have you looked at my GPSDriverNMEA library http://www.b4x.com/forum/additional-libraries/3319-gpsdrivernmea-library.html which will return NMEA sentences from the Intermediate Driver.Is there an easier way to convert these things?
Sub ToDegMins(DecLatLon)
Return Int(DecLatLon) & Format((DecLatLon - Int(DecLatLon)) * 60, "N2")
End Sub
Sub ToDegMins(DecLatLon)
Return Int(DecLatLon) & Format((DecLatLon - Int(DecLatLon)) * 60, "N2")
End Sub
:signOops: Try this refinementWhat do I have to do, to get the right LatLon for my NMEA-protocoll?
Return Format(Int(DecLatLon),"00") & Format((DecLatLon - Int(DecLatLon)) * 60, "00.00")
You I'm afraid, you are not getting the device data. Also that Do loop is a bad idea, it will eat processor cycles and battery life. You should use a timer with a period of about one second or longer. There is no point in checking the GPS more often than that as the data only comes in slowly so won't change very quickly.what is wrong? Me, the code or the GPS
Sub Displaycheck
Label52.Width = 1
n = 1
Label51.Visible = True
Label52.Visible = True
gpsint.GetGpsData(6000)
[COLOR="Red"]gpsint.GetDeviceData[/COLOR]
Label51.Text = gpsint.DeviceState & " " & gpsint.ServiceState
Do While (Not(gpsint.DeviceState = "On" ) OR (gpsint.SatelliteUsedCount < 4))
gpsint.GetGpsData(6000)
[COLOR="Red"]gpsint.GetDeviceData[/COLOR]
Label51.Text = gpsint.DeviceState & CRLF & SatelliteUsedCount & " (" & SatellitesInViewCount & ")" & CRLF & "zu wenig Sats " & SatelliteUsedCount &
Label52.Width = n/100
DoEvents
n = n + 1
If n > 8000 Then
Timerint.Enabled = False
gpsint.close
Return
End If
Loop
I realised that it might also need a leading zero on "Int(DecLatLon)" depending upon whether a fixed length string is expected. Note my "clean" solution above using a custom number formatting string.The problem is the leading zero
Return Format(Int(DecLatLon),"00") & Format((DecLatLon - Int(DecLatLon)) * 60, "00.00")
I assume this is using the GPSDriver dll. What does the Error Message say and can you log the input values that cause the error so we can reproduce it?I get an Error Message
To be clear. These values were returned by the GPSDriver library as latitude, longitude and altitude?.12.55438,522.4029766666667,148
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?