Created
March 2, 2015 22:55
-
-
Save xorrbit/d23e882c0366de0a8fb5 to your computer and use it in GitHub Desktop.
Shell script to calculate the average power of a GSM base station using my fork of kalibrate-hackrf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file=`mktemp` | |
echo "Average power of channel $1:" | |
for i in {1..10}; | |
do kalibrate-hackrf/src/kal -s GSM850 -c $1 2>&1 | sed -n 's/.*power: \([0-9.]*\)/\1/p' >> $file; | |
done | |
awk '{ total += $1; count++ } END { print total/count }' $file | |
rm $file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment