We help IT Professionals succeed at work.

VB5 GPS and serial data

dragabyte asked
Medium Priority
Last Modified: 2010-05-03
To All

I am starting a project that use GPS data through a serial port. I don't know what type of GPS unit will be used yet so I thought it may be possible to emulate this with a second computer linked through the serial ports. The remote computer could put out a stream of data through its port and the other will read. At the moment I only an need X,Y coordinate for the emulation. Any ideas?
Watch Question

I think you could use the communication OCX from Microsoft on both part.

But for the moment, the better solution should writing a class for communication with serial port, and first of all, simulate it with some kind of files.

Do you need help in transferring data via serial port or processing the data once it recieve from the port? Can you give a little more information?


I will using data coming into the serial port to drive a GIS program - that is - with the X,Y data I will draw a symbol on a Microstation drawing in global coords. All the drawing stuff is fine. I have a HP Palmtop that I could use as the simulated GPS unit or a Laptop, whatever. I am not quite sure what form the data will be streaming from the GPS but as a start I thought I would do the above while looking for info on the GPS data. There maybe a VB5 program already out there but I would need the code.

So you are looking for the data transfer via serial port.
Generally, you need to know the something about the way external device (GPS, in your case) is send data: is it binary or Ascii, what baudrate, databits, stopbit, parity, starting/ending characters....
In your VB program, you just need to drop a MSCOmm control, set the port, and set itsetting match that of the device, and then you can go read the data using
Dim lIndata as String
lIndata = Com1.Input

I have example code to read/send data through the comport, but you need to know the format of the incoming data and then put in the form for you to do the graphics.

I would be happy to help you further, if you can provide me with infor about want would be the format of incoming data and the format it need to be in.  The transfer part is not difficult..



I have a bit more detail now. The GPS unit will most probably be a Garmin. The data protocol is NMEA 0183, 4800 baud,8 bits,no parity,1 stop bit.

Unlock this solution and get a sample of our free trial.
(No credit card required)


Thanks that worked well
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.