Link to home
Start Free TrialLog in
Avatar of dragabyte
dragabyte

asked on

VB5 GPS and serial data

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?
Avatar of waty
waty
Flag of Belgium image

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.
Avatar of Dalin
Dalin

dragabyte,
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?
Regards
Dalin
Avatar of dragabyte

ASKER

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..

Regards
Dalin
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.

ASKER CERTIFIED SOLUTION
Avatar of Dalin
Dalin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks that worked well