在VB.Net中与USB GPS交谈 [英] Talking with USB GPS in VB.Net

查看:77
本文介绍了在VB.Net中与USB GPS交谈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在VB.Net和Garmin之间进行''对话'

USB GPS,有人知道工作吗?


我有一个etrex Vista Cx(USB线连接器),我想制作一个程序

获取当前GPS位置,但我不明白如何发送命令

或接收此端口的数据。


提前感谢您的帮助,我很失落。


Freddy Coal

Hi, I would like know how make the ''conversation'' between VB.Net and Garmin
USB GPS, someone know work that?.

I have a etrex Vista Cx (USB cable connector), I would like make a program
for get the current GPS position, but I don′t understand how send commands
or receive data for this port.

Thanks in advance for any help, I′m very lost.

Freddy Coal

推荐答案




有一个标准 GPS协议,NMEA-0183。这个串行协议很容易使用。
。但是,如果您从我的主页下载

DecodeGPS,则会更容易。 DecodeGPS .NET dll是免费的,我包含了

示例代码。 dll的源代码在我的书中(见下文),以及

及其他信息。 IMO,你应该确保你的GPS

接收器使用这个协议输出数据(命令也可以使用NMEA-0183向接收器发出
,尽管很少有应用需要那个

GPS接收器可以编程。


Garmin也有一个专有的二进制协议。它可以用来代替

NMEA-0183。同样,很少有应用程序需要使用这种二进制协议,并且使用它比使用ASCII

(NMEA-0183)协议要困难得多。我怀疑你的实际接收器默认使用NMEA

协议(它甚至可能不支持二进制协议,因此可能

甚至不成问题。) br />

迪克


-

Richard Grier,MVP

Hard&软件

Visual Basic程序员串行通信指南的作者,第四版

版,

ISBN 1-890422-28-2( 391页,包括CD-ROM)。 2004年7月,修订3月

2006.

www.hardandsoftware.net 了解详情和联系方式。
Hi,

There is one "standard" GPS protocol, NMEA-0183. This serial protocol is
fairly easy to work with. However, it is even easier if you download
DecodeGPS from my homepage. The DecodeGPS .NET dll is free, and I include
example code. The source code for the dll is in my book (see below), along
with additional information. IMO, you should make sure that your GPS
receiver outputs data using this protocol (commands also may be issued to
the receiver using NMEA-0183, though very few applications require that the
GPS receiver be programmed).

Garmin also has a proprietary binary protocol. It can be used instead of
NMEA-0183. Again, there are very few applications that would require use of
this binary protocol, and it is much more difficult to use than the ASCII
(NMEA-0183) protocol. I suspect that your actual receiver uses the NMEA
protocol by default (and it may not even support the binary one, so that may
not even be an issue).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer''s Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.


谢谢迪克,非常有趣的DLL;我知道NMEA协议,但我不知道如何使用USB端口进行通信。


我下载了GPS Decoder示例代码,但是他发错了,因为我没有
有MapPoint。你的DLL使用USB或仅使用串口?


提前致谢。


弗雷迪煤炭


" Dick Grier" < dick_grierNOSPAM @ .msn.comwrote in message

news:uE ************** @ TK2MSFTNGP05.phx.gbl ...
Thanks Dick, very interesting DLL; I know the NMEA protocol, but I don''t
understand how make the communitaction with the USB port.

I download the GPS Decoder example code, but he send errors, because I don′t
have the MapPoint. Your DLL work with USB or only with serial port?.

Thanks in advance.

Freddy Coal

"Dick Grier" <dick_grierNOSPAM@.msn.comwrote in message
news:uE**************@TK2MSFTNGP05.phx.gbl...




有一个标准 GPS协议,NMEA-0183。这个串行协议很容易使用。
。但是,如果您从我的主页下载

DecodeGPS,则会更容易。 DecodeGPS .NET dll是免费的,我包含了

示例代码。 dll的源代码在我的书中(见下文),

以及其他信息。 IMO,你应该确保你的

GPS接收器使用这个协议输出数据(命令也可以使用NMEA-0183向接收器发出

,尽管很少有应用需要那个

GPS接收器被编程了。


Garmin也有专有的二进制协议。它可以用来代替

NMEA-0183。同样,很少有应用程序需要使用这个二进制协议的
,并且它比

ASCII(NMEA-0183)协议使用起来要困难得多。我怀疑你的实际接收器默认使用

NMEA协议(它甚至可能不支持二进制协议,所以

甚至可能不是问题)。


迪克


-

Richard Grier,MVP

Hard&软件

Visual Basic程序员串行通信指南的作者,第四版

版,

ISBN 1-890422-28-2( 391页,包括CD-ROM)。 2004年7月,修订3月

2006.

www.hardandsoftware.net 了解详情和联系信息。
Hi,

There is one "standard" GPS protocol, NMEA-0183. This serial protocol is
fairly easy to work with. However, it is even easier if you download
DecodeGPS from my homepage. The DecodeGPS .NET dll is free, and I include
example code. The source code for the dll is in my book (see below),
along with additional information. IMO, you should make sure that your
GPS receiver outputs data using this protocol (commands also may be issued
to the receiver using NMEA-0183, though very few applications require that
the GPS receiver be programmed).

Garmin also has a proprietary binary protocol. It can be used instead of
NMEA-0183. Again, there are very few applications that would require use
of this binary protocol, and it is much more difficult to use than the
ASCII (NMEA-0183) protocol. I suspect that your actual receiver uses the
NMEA protocol by default (and it may not even support the binary one, so
that may not even be an issue).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer''s Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.



您好,


如果您需要,您可以获得MapPoint Europe的演示版。


我明天会创建一个简单的演示,只需将位置

(lat / lon)放在文本框中。我会告诉你什么时候可用。


你使用的是什么版本的Visual Studio?实际的串口代码

取决于此(如果VS 2005,你可以使用内置的串口控制,如果使用2003,则需要
,然后从下载DesktopSerialIO.dll我的主页)。


迪克


-

Richard Grier,MVP

硬&软件

Visual Basic程序员串行通信指南的作者,第四版

版,

ISBN 1-890422-28-2( 391页,包括CD-ROM)。 2004年7月,修订3月

2006.

www.hardandsoftware.net 了解详情和联系信息。
Hi,

You can get a demo version of MapPoint Europe, if you want.

I will create a simpler demo tomorrow that simply places the location
(lat/lon) in a textbox. I will let you know when it is available.

What version of Visual Studio are you using? The actual serial port code
depends on this (if VS 2005, you can use the built-in serial port control,
if using 2003, then download DesktopSerialIO.dll from my homepage).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer''s Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.


这篇关于在VB.Net中与USB GPS交谈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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