Hello people,
I'm working with a opensource GPS device (a tracker for security purpose). The system works very well standalone, but now i wanna integrate the GPS coords with a video security system. I can merge any kind of text info on the videos, so now the next step is to merge the GPS coords on the video.
The current problem: I cannot acquire the info from the GPS module automatically. I can connect to the device via serial port through minicom or putty and ask for the coords, but i couldn't find a way to do this automatically.
Can i treat the serial port like a console to send the command automatically and grab the answer?
The GPS works with 9600 8N1 no flow control and that's all the info i have for now
EDIT: I'm bumping into many google hits, but I'm kinda lost my way on this mess...the stty command let me configure some serial port parameters right? If i establish the correct setup, can I simply send a command using
echo "something" > /dev/ttyS0
and listen with
cat /dev/ttyS0
EDIT2: I figured the syntax of the stty and now i got the GPS answer on a log file. Problem now is the answer...its a string with a bunch of info
it's like this...
Quote:
|
>RGP220800000621-3463425-05862602000053300FD0002<
|
and all i want is this...the latitude and longitude coords...
Quote:
|
>RGP220800000621-3463425-05862602000053300FD0002<
|
Can somebody give me a hand to cut these values and separate by spaces?