通过gm862-gps进行操作 - 如何从dddmm.mmmm转换为真实? [英] trcking by gm862-gps-how to convert from dddmm.mmmm to real?

查看:227
本文介绍了通过gm862-gps进行操作 - 如何从dddmm.mmmm转换为真实?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如我在标题中总结的那样,我用vb.net,mysql开发了一个地理定位应用程序,通过使用$ GPSACP命令通过GM862-GPS模块完成跟踪,得到纬度/经度发送包含utc时间的短信:hh:mm:ss.sss,纬度大小[B] DDMM.MMMM [/ B] N / S,经度大小[B] dddmm.mmmm [/ B] E / W ..........

我创建了一个Windows窗体界面,将其分成两个拆分容器:第一个是输入搜索关键字(city,street或lat / long),第二个显示谷歌地图作为对纬度和经度研究的回应,这就是我发现自己的问题并问我的问题:

我为lat和aconvert按钮定义了两个文本框,两个文本框for long和一个转换按钮,用于转换实数中的数据值GM862-gps DDMM.MMMM,然后单击搜索以查找作为lat和long查询结果的地图:如果我输入dddmm.mmmm格式没有转换,映射doe不工作,但如果我插入真正的价值,它的工作原理,那么我该如何将这种格式转换为实数?提前谢谢:)

解决方案

GPSACP命令,它给出lat / long结果,以hh:mm:ss.sss,纬度发送包含utc时间的短信尺寸[B] DDMM.MMMM [/ B] N / S,经度[B] dddmm.mmmm [/ B] E / W ..........

我创建了一个Windows窗体界面,将其分为两个拆分容器:第一个是输入搜索关键字(城市,街道或纬度/经度),第二个显示谷歌地图作为对纬度和经度研究的响应,这就是我发现自己的问题并问我的问题:

我为lat和aconvert按钮定义了两个文本框,两个长文本框和一个转换按钮来转换数据值GM862-gps实数中的DDMM.MMMM并单击搜索以查找作为lat和long查询的结果的地图:如果我输入dddmm.mmmm格式而不进行转换,则映射不起作用,但如果我插入实数值它可以工作那么我该如何转换这个佛rmat到实数?提前谢谢:)


这只是非常基本的算法:

  Dim  rawValue,degrees,minutes  as   Double  
rawValue = Val( dddmm.mmmm' 使用此处的实际数字字符串
degrees = Int(rawValue / 100 0
分钟= rawValue - (度* 100 0
度=度+(分钟/ 60 0



当然,你可以通过拆开字符串并分别解析度数和分钟来实现...


thx again maatt

然后解释我更多plz如何定义通过按钮转换功能:

 私人  Sub  buttonconvert_Click( ByVal  sender  As  System。 Object  ByVal  e  As  System.EventArgs) Handles  buttonconvert.Click 

结束 Sub







我想通过这个按钮链接两个文本区域,第一个我将插入gm862结果,并通过单击按钮,在第二个文本框上将显示将成为地图上搜索条件的实际值

as I summed up in the title I developed a geolocation application with vb.net, mysql, on which, the tracking is done via the GM862-GPS module by the use of the $ GPSACP command which gives the lat/long result to send an sms containing utc time in hh: mm: ss.sss, the latitude in size [B] DDMM.MMMM [/ B] N / S, longitude in size [B] dddmm.mmmm [/ B] E / W ..........
I created a windows form interface by dividing it into two split containers: the first one is to enter search keywords (city, street or lat/long), and the second that shows the google map as a response to research by latitude and longitude, and this is where I find my self bloqued and ask my question:
I defined two text boxes for lat and aconvert button, two text boxes for long and a convert button to convert the data value GM862-gps DDMM.MMMM in a real number and click search to find the map as a result to the lat and long queries: if I input the dddmm.mmmm format without conversion, the mapping doesen't work, but if i insert real values it works, then how should I do to convert this format to a real number? thank you in advance:)

解决方案

GPSACP command which gives the lat/long result to send an sms containing utc time in hh: mm: ss.sss, the latitude in size [B] DDMM.MMMM [/ B] N / S, longitude in size [B] dddmm.mmmm [/ B] E / W ..........
I created a windows form interface by dividing it into two split containers: the first one is to enter search keywords (city, street or lat/long), and the second that shows the google map as a response to research by latitude and longitude, and this is where I find my self bloqued and ask my question:
I defined two text boxes for lat and aconvert button, two text boxes for long and a convert button to convert the data value GM862-gps DDMM.MMMM in a real number and click search to find the map as a result to the lat and long queries: if I input the dddmm.mmmm format without conversion, the mapping doesen't work, but if i insert real values it works, then how should I do to convert this format to a real number? thank you in advance:)


This is just pretty basic arithmetic:

Dim rawValue, degrees, minutes as Double
rawValue = Val("dddmm.mmmm")      ' Use the actual number string here
degrees = Int(rawValue / 100.0)
minutes = rawValue - (degrees * 100.0)
degrees = degrees + (minutes / 60.0) 


Of course, you could do it by taking the string apart and parsing the degrees and minutes separately...


thx again maatt
then explain me more plz how to define the conversion function through a button:

Private Sub buttonconvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonconvert.Click

    End Sub




i'd like through this button to link the two text zones, the first one in which i'll insert gm862 result, and by clicking on the button, on the second textbox will appear the real value that will be the search criteria on the map


这篇关于通过gm862-gps进行操作 - 如何从dddmm.mmmm转换为真实?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆