博文

可能是德文的解码GPS数据流的VB文章(2005-09-30 13:32:00)

摘要:' #Mandix Repository#***************************************************
' * Programmer Name  : David Auche
' * Web Site         : http://www.d2dsources.com
' * E-Mail           :
' * Date             : 09/27/2004
' **********************************************************************
' * Comments         : Decoder un code NMEA envoyer par un GPS (a l'aide mscomm - rs232)
' *
' * Ce code permet de decoder les phrases recues par le GPS. Les
' * phrases sont sous forme de code NMEA (faut programmer votre GPS
' * sur mode NMEA).  On utilise le composant Mscomm de Microsoft
' * qui nous permet d'acquise les informations du GPS par le port RS232.
' *
' ********************************************************************** Private Sub Form_Load()
&......

阅读全文(2496) | 评论:0

用于视频监视的云台镜头系统串行通信的实现(2005-09-30 13:26:00)

摘要: 用于视频监视的云台镜头系统串行通信的实现[*] 董延军 金蕾 司维 周恕义 (北京工业大学现代教育技术中心,zsy@bjut.edu.cn)   摘 要:本文介绍了如何运用VB6.0的通信控件Mscomm来实现云台镜头的串行通信,内容包括云台镜头系统介绍、设计原理和软件设计部分介绍等。 关键词:云台镜头 串行通信 视频 VB6.0 Mscomm控件   在实时监控、在线直播、公安、教育等许多领域都需要用到计算机控制云台动作及CCD摄像头的焦距、光圈。云台镜头控制系统是通过计算机串口/并口发送控制指令到解码器,再由解码器控制相应的继电器达到各个电源并关的闭合,从而实现摄像头在垂直方向的运动、水平方向的摆动以及电子镜头的聚焦、光圈和变倍。VisualBasic6.0是在Windows平台下开发串行通信程序的高效编程语言工具,一方面我们可以利用VB本身提供的ActiveX控件,另一方面可通过调用由C++开发的动态链接库(DLL)来控制硬件操作。本文将介绍利用VB6.0通信控件Mscomm来实现云台镜头控制系统的串行通信。   1 云台镜头控制系统介绍 图1 云台控制系统设备布局和连线示意图    云台、镜头控制系统由计算机、解码器、云台和CCD摄像头等组成。一台计算主机可通过解码器阵列控制多个云台,控制系统的布局和连线示意如图1所示。在本系统中,用户可以通过计算机串口发出控制指令,解码器解析指令,获知操作对象(具体哪个云台)、操作动作(俯仰、左右摆动等)后,通过继电器接通/断开相应的线路,从而使相应电机运转或停止。除此之外,云台一般还有自动开关控制。如果自动开关打开,云台可自动进行左右摆动,当一个方向摆动到尽头时,会触发一个限位行程开关而转向方向。关闭自动,则停止摆动。   2 设计原理   在云台镜头控制系统中,解码器起着核心的地位。设计云台镜头控制系统主要解决的问题是将各项操作进行编码,这样解码器收到指令后,才能够正确解析并控制继电器的断开闭合。解码器是用来与计算机进行通信的一种设备,它封装了底层硬件程序的编写,因此我们只需要利用解码器开发商提供的有关协议,通过RS232或者RS485串行接口对解码器发出指令即可[3]。 本系统中我们采用常用的RS-232......

阅读全文(4373) | 评论:1

单片机与PC机串行通讯之VB篇(2)(2005-09-30 13:23:00)

摘要:
单片机与PC机串行通讯之VB篇(2)
Ryan 发表于 2005-6-7 14:38:16 下面是单片机里面的汇编程序:              
         ORG 0000H
         AJMP MAIN
         ORG 0023H                       ;串行中断入口地址
        JMP COM_INT                     ;串行中断服务程序 ;***********  主程序开始    *******************
         ORG 0030H
  MAIN:   MOV SP,#30H            ;设置堆栈
          CALL REST&......

阅读全文(2565) | 评论:0

单片机与PC机串行通讯之VB篇(1) (2005-09-30 13:20:00)

摘要:
单片机与PC机串行通讯之VB篇(1)
Ryan 发表于 2005-6-7 14:35:32 网上有很多关于PC机与单片机串行通讯的文章和程序,但有些不太适合初学者。我最近把网上搜集的程序消化并修改了一下,并在试验板上进行了一些简单的调试。希望对大家有用。   PC机上的程序是用VB编的,VB可以说是最容易上手的语言了,也很容易读懂。下面是VB的源程序: Private Sub Form_Load()     MSComm1.CommPort = 1 '使用串行口1     MSComm1.Settings = "4800,N,8,1" '波特率4800,无校验,8个数据位,1个停止位。     MSComm1.InputLen = 1 '当使用MSComm1.Input时,每次从接收缓冲区取一个字节。     TestTimer.Interval = 20 '定时器的中断间隔为20ms,用于更新显示时间。
   
End Sub Private Sub Command1_Click()     Dim echoch% '命令变量
   
    Dim ch$     On Error Resume Next '简单的错误处理     Label1.Caption = MSComm1.Settings '显示串行口的设置。
   
    TestTimer.Enabled = True     If Command1.Caption = "通信" Then '若当前命令按扭的提示为“通信”则开始发送和         Command1.Caption = "停止" '接受数据,......

阅读全文(3108) | 评论:0

GPS - NMEA sentence information-3(2005-09-30 13:12:00)

摘要: $GPSTN Multiple Data ID. This sentence is transmitted before each individual sentence where there is a need for the Listener to determine the exact source of data in the system. Examples might include dual-frequency depthsounding equipment or equipment that integrates data from a number of sources and produces a single output. $--STN,xx
xx = Talker ID number, 00 to 99 $GPVBW Dual Ground / Water Speed Water referenced and ground referenced speed data. $--VBW,x.x,x.x,A,x.x,x.x,A
x.x = Longitudinal water speed, knots
x.x = Transverse water speed, knots
A = Status: Water speed, A = Data valid
x.x = Longitudinal ground speed, knots
x.x = Transverse ground speed, knots
A = Status: Ground speed, A = Data valid $GPVTG Track Made Good and Ground Speed. eg1. $GPVTG,360.0,T,348.7,M,000.0,N,000.0,K*43 eg2. $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K*41
054.7,T True course made good over ground, degrees 034.4,M ......

阅读全文(3022) | 评论:0

GPS - NMEA sentence information-2(2005-09-30 13:11:00)

摘要: $GPGST GPS Pseudorange Noise Statistics Example: $GPGST,024603.00,3.2,6.6,4.7,47.3,5.8,5.6,22.0*58 Field Example Comments Sentence ID $GPGST   UTC Time 024603.00 UTC time of associated GGA fix RMS deviation 3.2 Total RMS standard deviation of ranges inputs to the navigation solution Semi-major deviation 6.6 Standard deviation (meters) of semi-major axis of error ellipse Semi-minor deviation 4.7 Standard deviation (meters) of semi-minor axis of error ellipse Semi-major orientation 47.3 Orientation of semi-major axis of error ellipse (true north degrees) Latitude error deviation 5.8 Standard deviation (meters) of latitude error Longitude error deviation 5.6 Standard deviation (meters) of longitude error Altitude error deviation 22.0 Standard deviation (meters) of latitude error Checksum *58     $GPGSV GPS Satellites in view eg. $GPGSV,3,1,11,03,03,111,00,04,15,270,00,06,01,010,00,13,06,292,00*7......

阅读全文(3804) | 评论:0

GPS - NMEA sentence information-1(2005-09-30 13:06:00)

摘要:  Glenn Baddeley - GPS - NMEA sentence information Contents All $GPxxx sentence codes and short descriptions 26 interpreted sentences transmitted by GPS unit 12 interpreted Garmin proprietary sentences transmitted by GPS unit 8 interpreted Garmin proprietary sentences received by GPS unit Format of latitudes and longitudes References [ Top ] [Glenn's GPS Contents Page] All $GPxxx sentence codes and short descriptions $GPAAM - Waypoint Arrival Alarm $GPALM - GPS Almanac Data $GPAPA - Autopilot format "A" $GPAPB - Autopilot format "B" $GPASD - Autopilot System Data $GPBEC - Bearing & Distance to Waypoint, Dead Reckoning $GPBOD - Bearing, Origin to Destination $GPBWC - Bearing & Distance to Waypoint, Great Circle $GPBWR - Bearing & Distance to Waypoint, Rhumb Line $GPBWW - Bearing, Waypoint to Waypoint $GPDBT - Depth Below Transducer $GPDCN - Decca Position $GPDPT - Depth $GPFSI - Frequency Set Information $GPGGA - Global Positioning ......

阅读全文(3680) | 评论:0

NMEA 0183 and GPS(2005-09-30 13:00:00)

摘要: NMEA 0183 and GPS: Decoding the NMEA 0183 standard in your GPS Software Project As GPS units become more common and less expensive, a whole new set of location-aware applications and services are popping up to take advantage of its capabilities. If you are one of the thousands of software developers tasked with adding GPS capability to an application, you have probably come across the NMEA 0183 standard, the protocol by which GPS units communicate with other devices. Since decoding the NMEA 0183 standard is the key to integrating GPS data in your VB, C# or C++ project, let's examine some strategies for handling NMEA 0183 output. The Big Picture Before we dive into the guts of the NMEA 0183 standard, let's take a step back and examine how the NMEA 0183 data stream fits into the larger structure of our application. There are three hurdles that we must first overcome before we can begin decoding the NMEA 0183 stream and using the data in our application: 1) Getting the hardware conn......

阅读全文(3625) | 评论:0

NMEA-0183报文格式(2005-09-30 12:57:00)

摘要:NMEA-0183报文格式

字符串(ASCII字符)格式如下:
$XXXX,XX,XX,XX,……*hh<CR><LF>
$:串头
XXXX: 串头
XX:数据字段,字母或数字
XX:数据字段,字母或数字
XX:数据字段,字母或数字
,:逗号
……
*:星号,串尾
hh:$与*之间所有字符代码的校验和,(注意:校验和h为半Byte校验,*后第1个h表示高4位校验和,第2个h表示低4位校验和。得到校验值后,再转换成ASCII字符。)
<CR>:0DH,回车控制符
<LF>:0AH,换行控制符
......

阅读全文(4642) | 评论:0

利用VB 实现短消息收发(2005-09-29 20:21:00)

摘要:利用VB 实现短消息收发
摘要:近来,笔者用VB 开发了一套PC 机上的短消息收发软件,本文根据笔者的实际开发经
验整理而得。文中介绍了在计算机上实现短消息收发的模式,重点描述了PDU 模式,包括
PDU 模式下的UCS2 编码、解码原理,以及发送与接收PDU 串的编制方式,在此基础上介绍
了利用VB 中的MSCOMM 控件,实现短消息收发的核心程序。
关键字:短消息收发、PDU 模式、UCS2 编解码、UNICODE 码、AT 指令、MSCOMM 控件
正文:
现在,短消息收发软件得到越发广泛的应用,从政府机关、学校到广大的传媒机构,
直至诸多的企事业单位,颇受使用者欢迎。首先,手机用户的普及为这类软件的出现提供了
可能,而使用这类软件,与人们传统惯用的打电话、发电子邮件等通讯方式相比,有独到的
优点,它能将信息及时送达对方,不会像查收信件(或电邮)存在时间上的延误,也不存在
类似于打电话占线或无人接听之类的烦恼;短消息收发软件可以实现消息收发双方的实时交
互,用它还可以实现消息的群体发送或定时发送等。最近,笔者尝试用VB 来开发一套实现
短消息收发功能的信息系统。至提笔之时,整套系统已经开发完毕。鉴于篇幅的原因,笔者
不可能将整个系统一一尽数,而只能将开发过程中与短消息收发功能相关的一些技术要点和
心得体验与众读者进行分享。
一、短消息收发的实现模式
目前,计算机串口上连接GSM MODEM,用它向手机发送短消息,是比较适合于小型项目
开发的一种实现模式。这种方法要求对AT 指令集和串口编程比较熟悉。在开发过程中笔者
使用的是索尼爱立信公司的GM29 模块。
这种方法收发短消息又分三种模式:BLOCK 模式、TEXT 模式和PDU 模式。BLOCK 模式已
是昔日黄花,现在用的很少了; TEXT 模式则只能发送ASCII 码,它不能发送中文的UNICODE
码——确切地讲,从技术上来说是可以用于发送中文短消息的,但是国内的手机基本上不支
持;而PDU 模式开发起来则较为复杂,它需要编写专门的函数来将文本转换为PDU 格式,但
PDU 模式被所有手机支持,可以使用任何字符集,它也是手机默认的编码方式。笔者在开发
中正......

阅读全文(5269) | 评论:0