Skip to content

Instantly share code, notes, and snippets.

@msis
Last active March 7, 2018 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msis/55b2ad9126c3c051b648203d6f104db3 to your computer and use it in GitHub Desktop.
Save msis/55b2ad9126c3c051b648203d6f104db3 to your computer and use it in GitHub Desktop.
[Record gpsd data at startup]
# things
gpsd -G -n /dev/ttyUSB0
gpspipe -d -r -t -o /home/user/`date -Iminutes`.nmea
# rest of the things
# always end with `exit 0`
# things
# this is optional if gpsd service is running
#gpsd -G -n /dev/ttyUSB0
# end optional
FILENAME=/home/user/ais/`date -Iminutes`.nmea
gpspipe -d -r -t -o $FILENAME
# push data to AIShub
AISDISPATCHER=/home/user/aishub/aisdispatcher_arm_glibc/aisdispatcher
tail -f $FILENAME | awk -F" " '{print $3}' | $AISDISPATCHER -i -G -g -H data.aishub.net:XXXX &
# rest of the things
# always end with `exit 0`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment