rrlp-ephemeris: Add script to get test data from UBX receiver

Simple script illustrating how data.ubx (the test sample) is
generated.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2010-01-02 23:57:15 +01:00 committed by Harald Welte
parent 9c3ae67f8b
commit a4f954f6c6
1 changed files with 17 additions and 0 deletions

17
get-test-data.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
DEV=$1
OUTF=$2
# Change mode
echo -en "\$PUBX,41,1,0001,0001,9600,0*14\r\n" > ${DEV}
# Wait a little
sleep 2
# Start dump
echo -en "\xb5\x62\x01\x02\x00\x00\x03\x0a" | \
socat -t5 ${DEV},b9600,raw,clocal=1,echo=0 - > ${OUTF}
echo -en "\xb5\x62\x0b\x10\x00\x00\x1b\x5c" | \
socat -t10 ${DEV},b9600,raw,clocal=1,echo=0 - >> ${OUTF}