-
Notifications
You must be signed in to change notification settings - Fork 3
/
SSTV
154 lines (124 loc) · 4.18 KB
/
SSTV
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#! /bin/tcsh
############################################################################
#
# SSTV - Rev 1.0
# Copyright (C) 2021 by Joseph B. Attili, aa2il AT arrl DOT net
#
# Script to set up SDR to listen to SSTV from either the ISS or HF
#
############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
############################################################################
set PY_SDR = "~/Python/pySDR/pySDR.py"
set FRQS = "14230"
set FRQS = "145800"
set RTL="-rtlhf"
set RTL=""
set REPLAY=0
set SATELLITE="ISS"
set START_MMSSTV = 0
set START_QSSTV = 1
set START_CLOCK = 0
set START_PAVU = 1
set KILL_OLD = 1
set START_SAT9 = 1
set USE_ROTOR = 1
############################################################################
# Kill old stuff
echo " "
echo "Cleaning up old junk ..."
if( $KILL_OLD )then
pkill pySDR
pkill wclock.py
pkill qsstv
pkill MMSSTV
pkill pavucontrol
sleep 1
endif
############################################################################
# Replay mode
if( $REPLAY )then
wine ~/.wine/drive_c/Ham/MMSSTV/MMSSTV.EXE >& /tmp/MMSSTV &
qsstv >& /tmp/QSSTV &
set OPTS="-mode NFM -rig NONE -af_bw 10 -vid_bw 45 -fsout 48"
set fname = "SatComm/ISS_SSTV/baseband_iq_20190209_184402.dat"
set fname = "SatComm/ISS_SSTV/baseband_iq_20190215_182952.dat"
set fname = "SatComm3/baseband_iq_20200101_170517.dat"
set fname = 'SatComm4/demod_20210621_143645.dat'
#pySDR.py -mode NFM -replay SatComm/iss_sstv1.dat
#pySDR.py -mode NFM -rig NONE -af_bw 10 -fsout 48 -replay SatComm/ISS_SSTV/junk.dat
$PY_SDR $OPTS -replay $fname
exit
endif
############################################################################
# Setup and start SDR
set LOOPBACK='-loopback'
set LOOPBACK=''
#start_loopback
echo Starting pySDR ...
$PY_SDR $RTL -fc $FRQS -mode NFM -fsout 48 $LOOPBACK -rig NONE -af_bw 10 -vid_bw 45 >& /tmp/SDR &
echo "Waiting for pySDR to start ..."
set id=`find_windows pySDR 20`
echo id=$id
if ( $#id == 0 ) then
echo "--- ERROR --- Never found pyKeyer after 20 tries - giving up"
exit
endif
############################################################################
# Start hamlib for rotor
if( $USE_ROTOR )then
~/Python/pyRig/rotor >& /tmp/ROTOR &
set ROTOR="-rotor HAMLIB"
else
set ROTOR=" "
sleep
endif
# Might have to use pavucontrol to redirect audio to MMSSTV
if( $START_PAVU )then
pavucontrol >& /tmp/PAVUCONTROL &
endif
#env WINEPREFIX="/home/joea/.wine"
#wine C:\\windows\\command\\start.exe /Unix /home/joea/.wine/dosdevices/c:/users/Public/Desktop/MMSSTV.lnk
if( $START_MMSSTV )then
echo Starting MMSSTV ...
wine ~/.wine/drive_c/Ham/MMSSTV/MMSSTV.EXE >& /tmp/MMSSTV &
endif
if( $START_QSSTV )then
echo " "
echo "*** For QSSTV, the following settings are recommend: ***"
echo " Auto Slant"
echo " Auto Save"
echo " High or DX Sensitity"
echo " "
echo Starting QSSTV ...
qsstv >& /tmp/QSSTV &
endif
if( $START_CLOCK )then
echo Starting WCLOCK ...
wclock.py >& /tmp//WCLOCK &
endif
if( $START_SAT9 )then
echo Starting SAT9 ...
set CMD="~/Python/predict/sat9.py -sat $SATELLITE -rig HAMLIB -port 4575 $ROTOR"
echo $CMD >& /tmp/SAT9
$CMD >>& /tmp/SAT9 &
endif
exit
############################################################################
# Replay:
~/.wine/drive_c/Ham/MMSSTV/MMSSTV.EXE >& /tmp/MMSSTV &
qsstv >& /tmp/QSSTV &
#pySDR.py -mode NFM -replay SatComm/baseband_iq_20190209_184402.dat
#pySDR.py -mode NFM -replay SatComm/iss_sstv1.dat
#pySDR.py -mode NFM -rig NONE -af_bw 10 -fsout 48 -replay SatComm/ISS_SSTV/junk.dat
pySDR.py -mode NFM -replay Satcomm3/baseband_iq_20200101_170517.dat