December 3, 2009 Archives

Assuming that you have an Android emulator running, and listening at the default port (5554). First, you need a script called getGeo.sh that gets the GPGGA line from gpsd running at its usual port. gpspipe attaches to gpsd and we get the line we want, put it in a file:

#!/bin/bash
# get nmea from device

FOO="geo nmea `gpspipe -r -n 10 | grep "GPGGA" | tail -n 1`"
echo ${FOO}
echo ${FOO} > ${HOME}/geo.nmea

Then, second code calls telnet and sends it the contents of the file with the "geo nmea " line:

#!/bin/bash
# simulate sending gps info to android emulator

${HOME}/bin/getGeo.sh
exec telnet 127.0.0.1 5554 < ${HOME}/geo.nmea > /dev/null &> /dev/null

You could loop it to make refresh the positioning as you walk around with your GPS.

About this Archive

This page is an archive of entries from December 2009 listed from newest to oldest.

November 8, 2009 is the previous archive.

December 31, 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.