当前位置: 网学 > 编程文档 > VB > 正文

vb接收GPS数据源码全

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
;         Print #1, val
            End If
            last_lat = lat_deg
            last_lon = lon_deg
         End If
      End If
   End If
End Function

Function nmeadegrees2decimal(degrees_nmea As Double, direction As String) As Double
   '''' convert from ddmm.mmmm to decimal
   Dim val As Double
   If direction = "N" Or direction = "S" Then
      dd = Mid(degrees_nmea, 1, 2)
      mm_mmmm = Mid(degrees_nmea, 3)
   Else
      If degrees_nmea < 10000 Then
         dd = Mid(degrees_nmea, 1, 2)
          mm_mmmm = Mid(degrees_nmea, 3)
      Else
         dd = Mid(degrees_nmea, 1, 3)
          mm_mmmm = Mid(degrees_nmea, 4)
      End If
   End If
   val = dd + mm_mmmm / 60
   
   If direction = "S" Or direction = "W" Then
      val = val * -1
   End If
   nmeadegrees2decimal = val
End Function





Function GetToken(ByVal strVal As String, intIndex As Integer, strDelimiter As String) As String
''''-------------------------------------------------------
'''' Author  : Troy DeMonbreun (vb@8x.com)
'''' source  : http://www.freevbcode.com/ShowCode.asp?ID=161
'''' Revised : 12/22/1998
''''-------------------------------------------------------
   Dim strSubString() As String
   Dim intIndex2 As Integer
   Dim i As Integer
   Dim intDelimitLen As Integer
   
   intIndex2 = 1
   i = 0
   intDelimitLen = Len(strDelimiter)
   
   Do While intIndex2 > 0
      ReDim Preserve strSubString(i + 1)
      intIndex2 = InStr(1, strVal, strDelimiter)
      If intIndex2 > 0 Then
         strSubString(i) = Mid(strVal, 1, (intIndex2 - 1))
         strVal = Mid(strVal, (intIndex2 + intDelimitLen), Len(strVal))
      Else
         strSubString(i) = strVal
      End If
      i = i + 1
  • 下一篇资讯: 在vb中实现鼠标手势
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号