论坛风格切换切换到宽版
  • 3662阅读
  • 1回复

Google Earth中实时显示GPS输出的数据,计算显示轨迹 [复制链接]

上一主题 下一主题
离线BG4JPL
 
发帖
83
只看楼主 倒序阅读 0楼 发表于: 2009-05-09
跟大家分享,vb6开发的,让google earth和gps连接

下载后,请修改config.ini文件中的 gps\port 的值,(这里是支持标准nmea 数据流)

原理:google earth提供两个接口对象

public kh as keyholelib.khinterface

public view as keyholelib.khviewinfo

set kh = new keyholelib.khinterface

set view = kh.currentview(0) '(获取google earth 当前位置)

view.longitude = mylongitude '(经度)

view.latitude = mylatitude '(纬度)

view.range = initeyehigh '(鹰眼高度,即从多高向下看,实际是放大、缩小地图比例尺)



if bnorth then
  view.azimuth = 0 '(北向上)

else
  view.azimuth = myazimuth '(车头向上)

end if
         

if b3d then
  view.tilt = 60 '(3维显示)

else
  view.tilt = 0   '(2维显示)

end if

kh.setview view, 1, 100   ' (google earth 显示自定义位置)
附件: GE&GPS2.rar (0 K) 下载次数:123
离线bg6qbv
发帖
5838
只看该作者 1楼 发表于: 2009-05-09
顶!!!!!!!!