crappy script to sample noise
parent
eb53ea2b72
commit
e049fbb30c
|
@ -0,0 +1,83 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# noise-sampler
|
||||||
|
# Detect noise in the environment of the satellite ground station.
|
||||||
|
# Maybe.
|
||||||
|
# GPLv3+
|
||||||
|
# Copyright (C) 2022, Jeff Moe
|
||||||
|
#
|
||||||
|
# Pi = has satnogs-client, rotator controller, SDR, etc.
|
||||||
|
# Workstation = Your local workstation.
|
||||||
|
#
|
||||||
|
# Set up the Pi to use soapyremote.
|
||||||
|
# On Pi, stop satnogs-client and start soapyremote.
|
||||||
|
# On workstation, run CubicSDR and connect remotely
|
||||||
|
# to "soapyremote" device (not rtlsdr) and the IP address of the Pi.
|
||||||
|
#
|
||||||
|
# This script needs CubicSDR running, as it takes screenshots from it.
|
||||||
|
# Yes, this is very crufty. :)
|
||||||
|
# Then it moves the rotator, lets things settle, takes another shot,
|
||||||
|
# rinse, repeat.
|
||||||
|
#
|
||||||
|
# Reqires gnome-screenshot.
|
||||||
|
#
|
||||||
|
# So run this script on your worklstation, then make CubicSDR
|
||||||
|
# the main active window # on the workstation, and let the script run.
|
||||||
|
#
|
||||||
|
# You will also want ssh key access set up from workstation to Pi.
|
||||||
|
# The script sends commands using rotctl via ssh...
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# Rotator model number
|
||||||
|
MODEL=603
|
||||||
|
# Rotator device
|
||||||
|
DEVICE=/dev/ttyUSB0
|
||||||
|
# Serial port speed
|
||||||
|
BAUD=9600
|
||||||
|
# Hostname or IP address of Pi
|
||||||
|
PIHOST="cruftpi6"
|
||||||
|
# Output directory of PNGs
|
||||||
|
OUTDIR=~/Pictures
|
||||||
|
# Timestamp
|
||||||
|
NOW=`date +%Y%m%d%H%M`
|
||||||
|
|
||||||
|
mkdir -p $OUTDIR
|
||||||
|
|
||||||
|
echo "Ok, minimize this window and make CubiSDR active window"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 0 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-0-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 45 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-45-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 90 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-90-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 135 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-135-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 180 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-180-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 225 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-225-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 270 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-270-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 315 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-315-45.png"
|
||||||
|
|
||||||
|
ssh $PIHOST echo "P 360 45 | rotctl --model=\"${MODEL}\" --serial-speed=\"${BAUD}\" --rot-file=\"${DEVICE}\""
|
||||||
|
sleep 60
|
||||||
|
gnome-screenshot -w --file="$OUTDIR/noise-$NOW-360-45.png"
|
||||||
|
|
Loading…
Reference in New Issue