Re: read from gps device
Puppet_Sock wrote:
On Jan 3, 7:50 pm, misiek303 <maugustyniak...@gazeta.pl> wrote:
do you have any experience with gps programming with c++, I need to
read the data from device.
[snip]
You are going to want to search around for a developer's kit for
the specific brand of device you are interested in. It's going
to require custom specific libraries that are made for the
device, and these are not standard C++, so you can't get help
on those libraries here.
Actually, this can be done with standard C++ functionality on many systems.
It's as easy as reading text from a serial port line by line, and serial
ports are typically accessed just like regular files, though the name
differs between operating systems.
Only port settings like baud rate might need special functionality if you
don't want to do those with an external program before starting your own
one.
The protocol is called NMEA and is quite easy to parse. The complete NMEA
specification costs a lot of money, but isn't really needed. Searching the
www for that term using your favorite search engine will provide enough
information to read all the data sent by the device.
Basically, NMEA is split into 'sentences', which are simply lines of text.
Each sentence consists of comma separated values containing the actual data.
So nothing you couldn't handle with a bit of parsing using std::getline().