Home > Software engineering >  Using vb to make PC to improve accuracy
Using vb to make PC to improve accuracy

Time:09-20

 Private Sub Winsock1_DataArrival (ByVal bytesTotal As Long) 
Dim buffer, SSJ As String
Dim length % 'access to the data length
Dim I %, j %
Winsock1. GetData buffer, vbString 'access to data from the network
Rec=Rec & amp; Buffer & amp; VbCrLf
Length=InStr (Rec, "OK") 'for the length of the
I=0
J=0
For I=1 To length
If Mid (buffer, I, 1)=", "Then" read into a comma
J=j + 1
End the If
If j=2 And Mid (buffer, I + 1, 1)="A" Then read the second comma, Then, is next to A
Latitude=Format $(Val (Mid (buffer, I + 3, 2)) + Val (Mid (buffer, I + 5, 7))/60, "0.00000")
Longitude=Format $(Val (Mid (buffer, the I + 15, 3)) + Val (Mid (buffer, I + 18, 7))/60, "0.00000")
WebBrowser1. Document. ParentWindow. ExecScript labellong="" "" & amp; Val (Longitude) & amp; "" "", "javascript
"WebBrowser1. Document. ParentWindow. ExecScript labellat="" "" & amp; Val (Latitude) & amp; "" "", "javascript
"WebBrowser1. Document. ParentWindow. ExecScript radioname="" "" & amp; "I'm here" & amp; "" "", "javascript
"WebBrowser1. Document. ParentWindow. ExecScript theLocation "()", "javascript
"End the If

How to improve the accuracy of the latitude and longitude, I display the error of 1.2 km
  • Related