diff --git a/891.km4ack.config b/891.km4ack.config
new file mode 100644
index 0000000..c411a52
--- /dev/null
+++ b/891.km4ack.config
@@ -0,0 +1,16 @@
+#Config file for Pat Menu
+#20200429 KM4ACK
+MYCALLSIGN=KM4ACK
+MAP=usa
+RIGCONTROL=yes
+ARDOP="/home/pi/ardop/./piardopc 8515 plughw:1,0 plughw:1,0"
+ARDOPGUI="/home/pi/ardop/./piARDOP_GUI"
+DIREWOLF="direwolf -p"
+KISS="sudo /usr/sbin/kissattach /tmp/kisstnc"
+AXP=wl2k
+RIG="/usr/local/bin/rigctl -m 4"
+MODEHF=PKTUSB
+MODE2M=FM
+PORT=5050
+LOG=/home/pi/Documents/mylog.txt
+AMRRON=no
diff --git a/FA-functions b/FA-functions
new file mode 100644
index 0000000..ff54edb
--- /dev/null
+++ b/FA-functions
@@ -0,0 +1,273 @@
+#functions file for find ardop
+#20200425 km4ack
+
+MYPATH=$HOME/patmenu2
+MAIN=$MYPATH/./find2
+CONFIG=$HOME/.wl2k/config.json
+TEMP=$HOME/patmenu2/tempconfig.txt
+TODAY=$(date +%Y%m%d-%R)
+WHO=$(whoami)
+LASTDL=$(cat $MYPATH/ardop-list/ardoplist.txt | head -1)
+LOGO=$MYPATH/pmlogo.png
+
+source $MYPATH/config
+
+
+
+#--------------------------------
+# MANUAL Download List
+#--------------------------------
+DOWNLIST(){
+$MYPATH/getardoplist
+$MAIN &
+exit
+}
+
+
+#--------------------------------
+# AUTO Download List
+#--------------------------------
+AUTODOWN(){
+FILE=/run/user/1000/cronbkup.txt
+crontab -l > $FILE
+HOURS=00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23
+MINS=00,15,30,45
+
+TEST=$(yad --center --wrap --width=350 --title="Auto Download" --text-align=center \
+--text="Please choose the time you would like to download the gateway list everyday" \
+--image $LOGO --window-icon=$LOGO --image-on-top \
+--button="Update:2" \
+--button="Cancel:1" \
+--form --separator="," --item-separator="," \
+--field="Choose the hour":CB $HOURS \
+--field="Choose the minutes":CB $MINS \
+)
+
+rc=$?
+if [[ $rc -eq 2 ]]; then
+echo "Updating Cron"
+HOUR=$(echo $TEST | awk -F ',' '{print $1}')
+MIN=$(echo $TEST | awk -F ',' '{print $2}')
+sed -i '/getardoplist/d' $FILE
+echo $MIN" "$HOUR" * * * $MYPATH/.getardoplist-cron" >> $FILE
+crontab $FILE
+echo
+echo "Your crontab has been updated. The gateway list"
+echo "will be downloaded daily at "$HOUR":"$MIN" hours"
+yad --center --timeout=3 --timeout-indicator=top --no-buttons --text="Auto Download set for $HOUR:$MIN daily" \
+--image $LOGO --window-icon=$LOGO --image-on-top
+$MAIN &
+rm $FILE
+exit
+elif [[ $rc -eq 1 ]]; then
+echo "BYE"
+$MAIN &
+exit
+fi
+}
+
+#--------------------------------
+# GRID SEARCH
+#--------------------------------
+GRIDSEARCH(){
+OUTFILE=/run/user/1000/tempardoplist.txt
+CONFIG=$HOME/.wl2k/config.json
+TEMP=/run/user/1000/tempconfig.txt
+ARDOPLIST=$MYPATH/ardop-list
+WHO=$(whoami)
+source $MYPATH/config #patmenu config file
+#check to make sure user has downloaded
+if [ ! -d "$MYPATH/ardop-list/" ]; then
+yad --title="No List" --width=400 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
+ --center --form --text="\r\rGateway list has NOT been downloaded.\rPlease download now\rRecommend setting auto download time" \
+ --button="Download":2
+BUT=$?
+ if [ $BUT = 2 ]; then
+ $MYPATH/getardoplist
+ $MAIN &
+ exit
+ elif [ $BUT = 252 ]; then
+ exit
+ fi
+fi
+SEARCHMENU(){
+#MENU
+BANDS="20|30|40|80|2M-70CM"
+SEARCH=$(yad --form --width=400 --text="Find ARDOP by KM4ACK" --text-align=center --center --title="Find ARDOP" --text-align=center \
+--separator="|" --item-separator="|" \
+--image=$LOGO --window-icon=$LOGO --image-on-top \
+--field="Grid to Search" "EM" \
+--field="Band to Search":CB "$BANDS" \
+--button="Search Packet":3 \
+--button="Search ARDOP":2 \
+--button="Cancel":1)
+QUIT=$?
+GRID=$(echo $SEARCH | awk -F "|" '{print $1}')
+GRID=$(echo "${GRID^^}")
+BAND=$(echo $SEARCH | awk -F "|" '{print $2}')
+
+if [ $QUIT = 1 ]; then
+$MAIN &
+exit
+elif [ $QUIT = 252 ]; then
+exit
+fi
+
+##############PACKET SEARCH######################
+if [ $QUIT = 3 ]; then
+FILE=$MYPATH/ardop-list/packet.txt
+TEMP=/run/user/1000/temppacket.txt
+TEMP1=/run/user/1000/templist.txt
+TEMP2=/run/user/1000/tempalias.txt
+cat $FILE | tail -n +5 | grep '[^[:blank:]]' > $TEMP
+MAX=200
+rm $TEMP1
+echo "Search Packet"
+while read LINE
+ do DISTANCE=$(echo $LINE | awk '{ print $3 }')
+ CALL=$(echo $LINE | awk '{ print $1 }')
+ #echo $DISTANCE
+ if [ $DISTANCE -lt "$MAX" ]
+ then
+ echo $LINE | sed 's/packet:/ax25:/' >> $TEMP1
+ fi
+done < $TEMP | yad --center --progress --pulsate --auto-close --no-buttons --text-align=center \
+--text="Please wait while the list is searched.\rThis takes about 30 seconds.\rDON'T CLOSE THIS WINDOW"
+INFO=$(PARSER='OFS="\n" {print $1, $2, $3, $4, $5, $6, $7, $9, $11}'
+
+tail -50 $TEMP1 | awk "$PARSER" | \
+yad --title="Search Results" --width=1100 --height=500 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --list --text="Search Results" \
+ --column Call --column Grid --column Dist \
+ --column Azm --column Mode --column Speed \
+ --column Dial-Freq \
+ --column Center-Freq --column Shortcut \
+ --button=gtk-close \
+ --button="Add Alias":2)
+BUT=$?
+if [ $BUT = 0 ]; then
+$MAIN &
+exit
+elif [ "$BUT" = 2 ];then
+CALL=$(echo $INFO | awk -F "|" '{print $1}')
+SC=$(echo $INFO | awk -F "|" '{print $9}')
+FREQ=$(echo $SC | sed 's/.*=//')
+ if [ $RIGCONTROL = 'no' ]; then
+ SC=$(echo $SC | sed 's/[?].*$//')
+ fi
+ #check something was selected
+ if [ -z "$CALL" ]; then
+ yad --title="No Selection" --width=300 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --form --text="No station was selected\r Please try again" \
+ --button=gtk-ok
+ $MAIN &
+ exit
+ fi
+jq '.connect_aliases += {'\""$CALL-$FREQ"\"' : '\"$SC\"'}' $CONFIG > $TEMP
+cp $TEMP $CONFIG
+rm $TEMP
+sudo killall pat
+sudo systemctl start pat@$WHO
+yad --title="ADDED" --width=300 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --form --text="$CALL-$FREQ added to Pat Winlink\rRefresh Pat Mailbox Window\rto view changes" \
+ --button=gtk-ok
+SEARCHMENU
+fi
+exit
+fi
+
+#############ARDOP SEARCH####################
+
+OUTFILE2=/run/user/1000/tempardop2.txt
+
+if [ $BAND = 20 ];then
+FILE=$ARDOPLIST/20mardoplist.txt
+cat $FILE | egrep -i $GRID[[:digit:]]{2} | tee "$OUTFILE" > /dev/null 2>&1
+#cat $OUTFILE | tr -s '[:space:]' | sed 's/ /|/g'| sed 's/[A-Za-z]*$/|/g' > $OUTFILE2
+elif [ $BAND = 30 ];then
+FILE=$ARDOPLIST/30mardoplist.txt
+cat $FILE | egrep -i $GRID[[:digit:]]{2} | tee "$OUTFILE" > /dev/null 2>&1
+elif [ $BAND = 40 ];then
+FILE=$ARDOPLIST/40mardoplist.txt
+cat $FILE | egrep -i $GRID[[:digit:]]{2} | tee "$OUTFILE" > /dev/null 2>&1
+elif [ $BAND = 80 ];then
+FILE=$ARDOPLIST/80mardoplist.txt
+cat $FILE | egrep -i $GRID[[:digit:]]{2} | tee "$OUTFILE" > /dev/null 2>&1
+echo "80 done"
+fi
+
+INFO=$(PARSER='OFS="\n" {print $1, $2, $3, $4, $5, $6, $7, $9, $11}'
+
+tail -50 $OUTFILE | awk "$PARSER" | \
+yad --title="Search Results" --width=1100 --height=500 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --list --text="Search Results" \
+ --column Call --column Grid --column Dist \
+ --column Azm --column Mode --column Speed \
+ --column Dial-Freq \
+ --column Center-Freq --column Shortcut \
+ --button=gtk-close \
+ --button="Add Alias":2)
+BUT=$?
+
+if [ "$BUT" = 2 ];then
+CALL=$(echo $INFO | awk -F "|" '{print $1}')
+SC=$(echo $INFO | awk -F "|" '{print $9}')
+FREQ=$(echo $SC | sed 's/.*=//')
+ if [ $RIGCONTROL = 'no' ]; then
+ SC=$(echo $SC | sed 's/[?].*$//')
+ fi
+
+ #check something was selected
+ if [ -z "$CALL" ]; then
+ yad --title="No Selection" --width=300 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --form --text="No station was selected\r Please try again" \
+ --button=gtk-ok
+ $MAIN &
+ exit
+ fi
+jq '.connect_aliases += {'\""$CALL-$BAND"M"-$FREQ"\"' : '\"$SC\"'}' $CONFIG > $TEMP
+cp $TEMP $CONFIG
+rm $TEMP
+sudo killall pat
+sudo systemctl start pat@$WHO
+yad --title="ADDED" --width=300 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --form --text="Alias added to Pat Winlink\rRefresh Pat Mailbox Window\rto view changes" \
+ --button=gtk-ok
+SEARCHMENU
+fi
+
+SEARCHMENU
+}
+SEARCHMENU
+}
+#--------------------------------
+# Open Map
+#--------------------------------
+MAP(){
+
+if [ "$MAP" = "usa" ]; then
+MAP=$MYPATH/grid-map.pdf
+elif [ "$MAP" = "world" ]; then
+MAP=$MYPATH/worldgridmap.pdf
+fi
+xdg-open $MAP
+}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/auto-download b/auto-download
new file mode 100755
index 0000000..1f73c0e
--- /dev/null
+++ b/auto-download
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+#update cron to download ardop list
+#20191126 km4ack
+
+MYPATH=$HOME/patmenu2
+FILE=/run/user/1000/cronbkup.txt
+
+crontab -l > $FILE
+
+HOURS=00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23
+MINS=00,15,30,45
+
+TEST=$(yad --center --wrap --width=250 --title="ARDOP Auto Download Setup" \
+--text="Please choose the time you would like to download the gateway list everyday" \
+--button="UPDATE:2" \
+--button="Exit:1" \
+--form --separator="," --item-separator="," \
+--field="Choose the hour":CB $HOURS \
+--field="Choose the minutes":CB $MINS \
+)
+
+rc=$?
+if [[ $rc -eq 2 ]]; then
+echo "Updating Cron"
+HOUR=$(echo $TEST | awk -F ',' '{print $1}')
+MIN=$(echo $TEST | awk -F ',' '{print $2}')
+sed -i '/getardoplist/d' $FILE
+echo $MIN" "$HOUR" * * * $MYPATH/getardoplist" >> $FILE
+crontab $FILE
+echo
+echo "Your crontab has been updated. The gateway list"
+echo "will be downloaded daily at "$HOUR":"$MIN" hours"
+sleep 5
+rm $FILE
+elif [[ $rc -eq 1 ]]; then
+echo "BYE"
+exit 0
+fi
+
+
+
diff --git a/autopat b/autopat
new file mode 100755
index 0000000..bf2390a
--- /dev/null
+++ b/autopat
@@ -0,0 +1,262 @@
+#!/bin/bash
+
+#script to perform auto connects to gateways
+#using pat winlink
+#20191015 KM4ACK
+
+MYPATH=$HOME/patmenu2
+LOGO=$MYPATH/pmlogo.png
+MAIN=$MYPATH/patmenu
+
+source $MYPATH/config
+
+if [ $RIGCONTROL == 'no' ]
+then
+
+yad --title="NO RIG CONTROL" --width=400 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
+ --center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \
+ --button=gtk-ok
+
+exit
+fi
+
+#Check if FLRIG is running if user has it set in config file
+if [ "$RIGCONTROL" = 'yes' ]; then
+echo "rig control is on"
+FLRIG=$(echo $RIG | grep "\-m 4")
+ if [ -z "$FLRIG" ]; then
+ echo
+ else
+ FLRIG=$(pidof flrig)
+ if [ -z "$FLRIG" ]; then
+ yad --title="FAILED" --width=400 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
+ --center --form --text="Please start FLRIG and try again" \
+ --button=gtk-ok
+ exit
+ fi
+ fi
+fi
+
+
+
+if [ $AMRRON = "no" ]
+then
+
+DIRE=$(pidof direwolf)
+if [ -z "$DIRE" ]
+then
+echo
+else
+sudo killall direwolf kissattach
+fi
+
+PIARDOPC=$(pidof piardopc)
+if [ -z "$PIARDOPC" ]
+then
+echo
+else
+sudo killall piardopc ardop-GUI
+fi
+
+fi
+
+#clear any temp files from previous runs that might exist
+rm -rf $HOME/tempardop > /dev/null
+
+ARDOPLIST=$MYPATH/ardop-list/
+
+touch $LOG
+
+DATE=$(date)
+
+STARTRIG () {
+#start rigctld if not already
+PIDCTL=$(pidof rigctld)
+WHO=$(whoami)
+ if [ -z "$PIDCTL" ]
+ then
+ CONTROL=$(echo $RIG | sed 's/rigctl/rigctld/')
+ $CONTROL &
+ sudo systemctl restart pat@$WHO
+ fi
+}
+
+STARTRIG
+
+if [ -z "$PIDCTL" ]
+then
+STARTRIG
+fi
+
+SETRIG () {
+
+#Set USB Mode
+RIGUSB=$RIG" M $MODEHF 0"
+
+#check rig is in USB
+MODE=$($RIG m | grep $MODEHF)
+
+sleep 1
+
+ MODECHECK() {
+ #check rig is in correct mode
+ MODE=$($RIG m | grep $MODEHF)
+ }
+
+sleep 1
+
+ if [ -z $MODE ]
+ then
+ $RIGUSB
+ MODECHECK
+ fi
+
+}
+
+SETRIG
+
+#Directions Function
+directions () {
+echo "The script needs two arguments to run."
+echo "It needs the distance that you want to try to connect"
+echo "and it needs the band you wish to use"
+echo "Bands available are 20, 30, 40, & 80"
+echo "The first argument is the distance"
+echo "and the second is the band. So to try all 40M"
+echo "stations in a 300km radius, you would enter"
+echo "autopat 300 40"
+exit 0
+}
+
+#check if distance is empty and give direction
+if [ -z "$1" ]
+then
+directions
+fi
+
+#check if band is empty and give direction
+if [ -z "$2" ]
+then
+directions
+fi
+
+#Check for min distance
+if [ -z "$3" ]
+then
+MIN=0
+else
+MIN=$3
+fi
+
+#take $2 as band to use
+if [ $2 = "20" ]
+then
+FILE=$ARDOPLIST"20mardoplist.txt"
+elif [ $2 = "30" ]
+then
+FILE=$ARDOPLIST"30mardoplist.txt"
+elif [ $2 = "40" ]
+then
+FILE=$ARDOPLIST"40mardoplist.txt"
+elif [ $2 = "80" ]
+then
+FILE=$ARDOPLIST"80mardoplist.txt"
+fi
+
+#Verify we have a list to work with
+test -f $FILE
+FILERESULT=$(echo $?)
+if [ $FILERESULT = "1" ]
+then
+echo "FILE DOESN'T EXIST."
+yad --title="NO LIST" --width=400 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
+ --center --form --text="\r\r\rNo list has been downloaded. Auto Pat has no data to work with. Please download the gateway list \
+ and try again" \
+ --button="Download List":2 \
+ --button="Cancel":1
+BUT=$?
+ if [ $BUT = 1 ]; then
+ exit
+ elif [ $BUT = 2 ]; then
+ $MYPATH/getardoplist
+ $MAIN &
+ exit
+ fi
+fi
+
+if [ $AMRRON = "no" ]
+then
+#start ardop-gui & piardopc
+$ARDOPGUI &
+$ARDOP &
+sleep 10
+fi
+
+#Pat Connection Function
+connect () {
+pat connect $CALL
+#Check if connection was successful
+RESULTS=$(echo $?)
+if [ $RESULTS = "0" ]
+then
+echo "A connection was made"
+echo $DATE" "$CALL" Success with autopat" >> $LOG
+
+yad --title="SUCCESS" --width=300 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --form --text="Successfully connected with $CALL" \
+ --button=gtk-ok
+
+if [ $AMRRON = "no" ]
+then
+sudo killall piardopc piARDOP_GUI
+fi
+exit 0
+fi
+}
+
+#create temp dir & manipulate file
+mkdir -p $HOME/tempardop/
+#cat file, remove first few lines, remove blanks > NEWFILE NAME
+cat $FILE | tail -n +5 | grep '[^[:blank:]]' > $HOME/tempardop/tempardop.txt
+
+#pad with zeros
+while read LINE
+ do DISTANCE=$(echo $LINE | awk '{ print $3 }' | sed -e :a -e 's/^.\{1,4\}$/0&/;ta')
+ CALL=$(echo $LINE | awk '{ print $11 }')
+ echo $DISTANCE" "$CALL >> $HOME/tempardop/tempardop1.txt
+done < $HOME/tempardop/tempardop.txt
+
+cat $HOME/tempardop/tempardop1.txt | sort >> $HOME/tempardop/sorted.txt
+
+echo "Will Attempt to Connect to This Station"
+#loop through file and find needed station info
+while read LINE
+ do DISTANCE=$(echo $LINE | awk '{ print $1 }')
+ CALL=$(echo $LINE | awk '{ print $2 }')
+ if [ $DISTANCE -lt "$1" ] && [ $DISTANCE -gt "$MIN" ]
+ then
+ echo "Distance="$DISTANCE " Call="$CALL
+ #call the connect funtion
+ connect
+ fi
+done < $HOME/tempardop/sorted.txt
+
+
+#remove temp directory & files
+rm -rf $HOME/tempardop
+
+if [ $AMRRON = "no" ]
+then
+#Stop ARDOP modem and gui
+sudo killall piardopc piARDOP_GUI
+fi
+
+yad --title="NO Connection" --width=400 --height=100 \
+ --image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
+ --center --form --text="\r\r\r\rNo Winlink connection was made using the criteria you entered." \
+ --button=gtk-ok
+
diff --git a/cat-functions b/cat-functions
new file mode 100644
index 0000000..199f1d8
--- /dev/null
+++ b/cat-functions
@@ -0,0 +1,389 @@
+#function file for patmenu 2 catalog
+#20200430 km4ack
+
+
+MYPATH=$HOME/patmenu2
+LOGO=$MYPATH/pmlogo.png
+MAIN=$MYPATH/./catalog
+
+#get callsign from pat config file
+CALLSIGN=$(cat $HOME/.wl2k/config.json | grep -m 1 mycall | sed 's/\"mycall\": \"//' | sed 's/\",//' | sed -e 's/^\s*//' | tr '[:lower:]' '[:upper:]')
+
+
+#COMPOSE EMAIL Function
+COMPOSE () {
+
+#Count body characters
+BODYCOUNT=${#BODY}
+NEWCOUNT=$(expr $BODYCOUNT + 1)
+
+#set date
+TODAY=$(date '+%Y/%m/%d %H:%M')
+TODAY1=$(date)
+
+#generate 12 random number
+NEW_UUID=$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 12 | head -n 1)
+
+#add .b2f to end of random number for new file name
+NEW_FILE=$HOME/.wl2k/mailbox/$CALLSIGN/out/$NEW_UUID".b2f"
+
+#create new file
+touch $NEW_FILE
+
+#add file contents
+echo "Mid: "$NEW_UUID >> $NEW_FILE
+echo "Body: "$NEWCOUNT >> $NEW_FILE
+echo "Content-Transfer-Encoding: 8bit" >> $NEW_FILE
+echo "Content-Type: text/plain; charset=ISO-8859-1" >> $NEW_FILE
+echo "Date: "$TODAY >> $NEW_FILE
+echo "From: "$CALLSIGN >> $NEW_FILE
+echo "Mbo: "$CALLSIGN >> $NEW_FILE
+echo "Subject: "$SUBJECT >> $NEW_FILE
+echo "To: "$TO >> $NEW_FILE
+echo "Type: Private" >> $NEW_FILE
+echo "" >> $NEW_FILE
+echo $BODY >> $NEW_FILE
+#give user some feedback
+echo "Your request has been posted to the outbox of Pat Winlink"
+echo "Please go to Pat and initiate a connection to send the request"
+yad --no-buttons --timeout=5 --center --timeout-indicator=top --title="POSTED" --text-align=center --width="300" height="300" \
+--text="Message Posted\rTo Outbox\r\rPlease go to Winlink and\rmake a connection\rto complete the\rrequest."
+$MAIN
+exit
+}
+
+
+
+GATEWAY(){
+GATE=$(yad --form --width=420 --text-align=center --center --title="Pat Catalog" --text-align=center \
+--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
+--text="Pat Catalog by KM4ACK" \
+--field="Gateway List":CB "ARDOP|PACKET")
+BUT=$?
+
+if [ $BUT = 252 ]; then
+exit
+fi
+
+GATE=$(echo $GATE | awk -F "|" '{print $1}')
+
+if [ -z $GATE ]; then
+$MAIN &
+exit
+fi
+
+if [ "$GATE" = ARDOP ]; then
+echo ARDOP
+ TO="INQUIRY"
+ SUBJECT="REQUEST"
+ BODY="PUB_ARDOP"
+ COMPOSE
+elif [ "$GATE" = PACKET ]; then
+echo PACKET
+ TO="INQUIRY"
+ SUBJECT="REQUEST"
+ BODY="PUB_PACKET"
+ COMPOSE
+fi
+}
+
+WEATHER(){
+WEATHER=$(yad --form --width=420 --text-align=center --center --title="Pat Catalog" --text-align=center \
+--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
+--text="Pat Catalog by KM4ACK" \
+--field="Weather Report":CB "GPS Weather|City Weather|GRIB Files")
+BUT=$?
+if [ $BUT = 252 ]; then
+exit
+fi
+
+WEATHER=$(echo $WEATHER | awk -F "|" '{print $1}')
+
+if [ -z "$WEATHER" ]; then
+$MAIN &
+exit
+fi
+
+if [ "$WEATHER" = 'GPS Weather' ]; then
+echo "Need GPS weather"
+ GPSDATA=$(gpspipe -r -n 10 | grep G\.GGA) #Thanks K4KDR!
+ LAT=$(echo $GPSDATA | awk -F"," '{ print $3 }'| sed 's/\.//' | sed 's/./&./2')
+ LON=$(echo $GPSDATA | awk -F"," '{ print $5 }'| sed 's/\.//' | sed 's/./&./3')
+ TO="SMTP:query@saildocs.com"
+ SUBJECT=""
+ BODY="https://forecast.weather.gov/MapClick.php?lat="$LAT"&lon=-"$LON"&unit=0&lg=english&FcstType=text&TextType=1"
+ COMPOSE
+elif [ "$WEATHER" = 'City Weather' ]; then
+FILE=$MYPATH/weather.txt
+
+
+PARSER='OFS="\n" {print $1, $2, $3}'
+
+CITY=$(tail -76 $FILE | awk "$PARSER" | \
+yad --title="Search Results" --width=500 --height=500 \
+ --image $LOGO --window-icon=$LOGO --image-on-top \
+ --center --checklist --list \
+ --column Pick --column ID --column Area \
+ --button="Choose":2)
+
+CITY=$(echo $CITY | awk -F "|" '{print $2}')
+
+if [ -z "$CITY" ]
+then
+$MAIN &
+exit
+fi
+
+TO="INQUIRY"
+SUBJECT="REQUEST"
+BODY=$CITY
+COMPOSE
+elif [ "$WEATHER" = 'GRIB Files' ]; then
+echo "Need GRIB Files"
+
+FILE=/run/user/1000
+QUESTION () {
+
+DEGREE=$(yad --center --wrap --width=350 --title="Auto Download" --text-align=center \
+--text="How many degrees would you like" \
+--form --separator="|" --item-separator="|" \
+--image $LOGO --window-icon=$LOGO --image-on-top \
+--field="Degrees":CB "2|6|10" \
+--button="Cancel:1" \
+--button="Continue:2")
+BUT=$?
+if [ $BUT = 1 ] || [ -z "$BUT" ]; then
+$MAIN &
+exit
+elif [ $BUT = 252 ]; then
+exit
+fi
+
+ANS=$(echo $DEGREE | awk -F "|" '{print $1}')
+echo $ANS
+
+if [ $ANS = "10" ]
+then
+AREA=5
+echo "aree=5"
+elif [ $ANS = "6" ]
+then
+AREA=3
+elif [ $ANS = "2" ]
+then
+AREA=1
+fi
+
+GPS=$(gpspipe -r -n 10 | grep G\.GGA)
+
+LAT=$(echo $GPS | awk -F "," '{printf "%.0f \n", $3 }' | cut -c1-2)
+LATD=$(echo $GPS | awk -F "," '{print $4}')
+LON=$(echo $GPS | awk -F "," '{printf "%.0f \n", $5 }' | cut -c1-2)
+LOND=$(echo $GPS | awk -F "," '{print $6}')
+
+#do some math
+let NEWLATADD=$LAT+$AREA
+let NEWLONADD=$LON+$AREA
+let NEWLATSUB=$LAT-$AREA
+let NEWLONSUB=$LON-$AREA
+
+GRIBFILE=$FILE/gribtemp
+GRIBDATA () {
+yad --height=600 --width=400 --center --list --checklist --column=Request --column=Product --separator="," \
+--text "Select the data to request." --title="GRIB DATA REQUEST" \
+--button="Exit:1" --button="Request Selected:2" < $MYPATH/griblist > $GRIBFILE
+
+BUTTON=$?
+
+if [ $BUTTON = "252" ]
+then
+exit
+elif [ $BUTTON = "1" ]
+then
+$MAIN &
+exit
+fi
+
+#echo "button = "$BUTTON
+
+};export -f GRIBDATA
+
+GRIBDATA
+
+sed -i 's/TRUE,//' $GRIBFILE
+
+var=$(cat $GRIBFILE)
+var1=$(echo $var | sed 's/ //g' | sed 's/,*$//')
+rm $GRIBFILE
+
+#example of correct format
+# send gfs:40N,60N,140W,120W|2,2|24,48,72|PRESS,WIND
+
+TO=query@saildocs.com
+SUBJECT=REQUEST
+BODY=$(echo "send gfs:"$NEWLATSUB$LATD","$NEWLATADD$LATD","$NEWLONADD$LOND","$NEWLONSUB$LOND"|2,2|24,48,72|"$var1)
+COMPOSE
+}
+QUESTION
+
+exit
+fi
+exit
+}
+
+
+
+
+
+POSITION(){
+POST=$(yad --form --width=420 --text-align=center --center --title="Position" --text-align=center \
+--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
+--text="Position Reports by KM4ACK" \
+--field="Choose":CB "Post Position|Single Station Request|All Nearby Stations" \
+--field="Enter Call Below ONLY for Single Station Requests":LBL \
+--field="Call Sign-SSID" \
+--field="Comment for Post Position" \
+--button="Main Menu":1 \
+--button="Continue":2)
+
+QUIT=$?
+
+if [ $QUIT = 1 ]; then
+$MAIN &
+exit
+elif [ $QUIT = 252 ]; then
+exit
+fi
+
+REPORT=$(echo $POST | awk -F "|" '{print $1}')
+
+if [ "$REPORT" = "Post Position" ]; then
+echo "posting position"
+COMMENT=$(echo $POST | awk -F "|" '{print $4}')
+pat position -c "$COMMENT" | yad --center --pulsate --progress --auto-close --text="Getting GPS Data" --no-buttons &
+yad --center --timeout=3 --timeout-indicator=top --no-buttons \
+--text="Position posted to\rPat Winlink Outbox"
+$MAIN &
+exit
+elif [ "$REPORT" = "Single Station Request" ]; then
+CALL=$(echo $POST | awk -F "|" '{print $3}')
+ TO="QTH"
+ SUBJECT="POSITION REQUEST"
+ BODY=$CALL
+ COMPOSE
+elif [ "$REPORT" = "All Nearby Stations" ]; then
+ TO="INQUIRY"
+ SUBJECT="REQUEST"
+ BODY="WL2K_NEARBY"
+ COMPOSE
+fi
+
+
+}
+
+PROPAGATION(){
+PROP=$(yad --form --width=420 --text-align=center --center --title="Propagation" --text-align=center \
+--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
+--text="Propagation Reports by KM4ACK" \
+--field="Choose Report":CB "3 Day Propagation Report|Daily WWV Report" \
+--button="Main Menu":1 \
+--button="Continue":2)
+QUIT=$?
+REPORT=$(echo $PROP | awk -F "|" '{print $1}')
+
+if [ $QUIT = 1 ]; then
+$MAIN &
+exit
+elif [ $QUIT = 252 ]; then
+exit
+fi
+
+if [ "$REPORT" = "3 Day Propagation Report" ]; then
+ TO="INQUIRY"
+ SUBJECT="REQUEST"
+ BODY="PROP_3DAY"
+ COMPOSE
+elif [ "$REPORT" = "Daily WWV Report" ]; then
+ TO="INQUIRY"
+ SUBJECT="REQUEST"
+ BODY="PROP_WWV"
+ COMPOSE
+fi
+}
+
+
+NEWS(){
+NEWS=$(yad --form --width=420 --text-align=center --center --title="News Reports" --text-align=center \
+--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
+--text="News Reports by KM4ACK\r\rNews reports provided by Reuters" \
+--field="Choose News Report":CB "Daily|Market|Money|US News" \
+--button="Main Menu":1 \
+--button="Continue":2)
+QUIT=$?
+NEWS=$(echo $NEWS | awk -F "|" '{print $1}')
+
+if [ $QUIT = 1 ]; then
+$MAIN &
+exit
+elif [ $QUIT = 252 ]; then
+exit
+fi
+
+if [ "$NEWS" = "Daily" ]; then
+ TO="SMTP:query@saildocs.com"
+ SUBJECT="subject"
+ BODY="send Reuters-Daily-News"
+ COMPOSE
+elif [ "$NEWS" = "Market" ]; then
+ TO="SMTP:query@saildocs.com"
+ SUBJECT="subject"
+ BODY="send Reuters-Market"
+ COMPOSE
+elif [ "$NEWS" = "Money" ]; then
+ TO="SMTP:query@saildocs.com"
+ SUBJECT="subject"
+ BODY="send Reuters-Money"
+ COMPOSE
+elif [ "$NEWS" = "US News" ]; then
+ TO="SMTP:query@saildocs.com"
+ SUBJECT="subject"
+ BODY="send Reuters-US-News"
+ COMPOSE
+fi
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/catalog b/catalog
new file mode 100755
index 0000000..bf7631f
--- /dev/null
+++ b/catalog
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+#Pat Catalog
+#20200427 KM4ACK
+#side note: written during covid-19 outbreak of 2020
+
+#######DEV NOTES#############
+#############################
+
+
+#############################
+
+MYPATH=$HOME/patmenu2
+LOGO=$MYPATH/pmlogo.png
+MAIN=$MYPATH/./patmenu
+
+
+yad --form --width=420 --text-align=center --center --title="Pat Catalog" --text-align=center \
+--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
+--text="Pat Catalog by KM4ACK" \
+--field="Gateway List":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/cat-functions; GATEWAY"' \
+--field="Weather Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/cat-functions; WEATHER"' \
+--field="Position Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/cat-functions; POSITION"' \
+--field="Propagation Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/cat-functions; PROPAGATION"' \
+--field="News Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/cat-functions; NEWS"' \
+--button="Main Menu":1
+
+QUIT=$?
+
+if [ $QUIT = 1 ]; then
+$MAIN &
+exit
+elif [ $QUIT = 252 ]; then
+exit
+fi
\ No newline at end of file
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..839df57
--- /dev/null
+++ b/changelog
@@ -0,0 +1,188 @@
+
+
+release=0.74
+
+
+Changelog
+ add FLRIG check to auto pat
+0.74 add option to install ruby if needed
+ add gps grid update to manage pat winlink section
+ bump version #
+0.73 attempt to fix success notice for auto pat
+ update path in main menu for new changelog file name
+ rename release to changelog
+ add alert if auto pat has no data to work with
+ disallow starting modems multiple times
+ check if FLRIG is running when starting modems
+ bump version #
+0.72 kill all modems on exit from main menu
+ add notice to auto connect if no connections were successful
+ bump version number
+0.71 COMPLETE RE WRITE TO INCLUDE YAD INTERFACE
+ bump version #
+0.70 add version number to main menu
+ create backup of start-pat2m
+ fix issue 24 https://github.com/km4ack/patmenu/issues/24
+ bum version #
+0.69 fix issue 33 https://github.com/km4ack/patmenu/issues/33
+ bump version #
+0.68 remove bug warning from README.md
+ reorder release file so latest revs at top
+ fix release display in update script
+ update config.default to match config
+ fix typo in auto pat (Thanks Drudge!)
+ bump version #
+0.67 write email backup/restore scripts
+ add email backup/restore to pat manage
+ fix issue 25 https://github.com/km4ack/patmenu/issues/25
+ move GRIB files to weather section https://github.com/km4ack/patmenu/issues/26
+ add email-bkup & email-restore +x to setup file
+ bump version #
+0.66 stop modem starts from puking errors if var not found
+ add extra check before trimode is run
+ add pulseaudio/pavucontrol install check to trimode
+ bump version #
+0.65 add grib request to catalog
+ bump version #
+0.64 add amrron/trimode check to both modem start scripts
+ bump version #
+0.63 fix catalog typo that caused crash
+ bump version #
+0.62 add post position to catalog
+ prevent stopping modems in autopat for amrron ops
+ add trimode script for amrron operators
+ revise trimode in config
+ bump version #
+0.61 update FLRIG rigctl in config (existing users will not see this)
+ add trimode variable to config (existing users will not see this)
+ bump version #
+0.60 revert start-pat2m due to critical flaw
+ bump version number
+0.59 improve how direwolf starts on buster
+ add slight delay after starting ardop mode
+ bump version #
+0.58 add callsign to config file (existing users will not see this)
+ add config check when menu starts. exit if config not modded
+ rig control set to no by default in config file
+ bump version #
+0.57 fix bug in add packet script
+ bump version #
+0.56 add min < max check in auto pat
+ add answer check at beginning of auto pat
+ rewrite patauto function in patmenu-new
+ check running modems & stop if needed when running autopat
+ add grid square check to getardoplist and warn if not set
+ fix symlink in setup script
+ add exit to restore config script
+ convert callsign to upper case in catalog script
+ bump version #
+0.55 add exit option to changeconf script
+ add symlink to setup for patmenu in /usr/local/bin
+ open pat inbox in browser when starting packet or ardop modems
+ change map viewer in findardop to variable
+ fix map viewer error from showing in pat menu
+ update main menu with new manage pat menu feature
+ check autopat to make sure 20,30,40,80 is entered
+ provide exit from autopat
+ bump version #
+0.54 update gpsdata var in catalog. Thanks K4KDR!
+ create changeconf script to deal with multiple config files
+ add menu-mange script for pat menu management
+ update setup script to +x changeconf & menu-manage
+ bump version #
+0.53 add buster check to start-pat2m
+ bump version #
+0.52 Fix missing file in alias-add-packet
+ revert to old style symlink until issue is resolved with new style
+ move kissattach to variable in config file
+ update restore-config file
+ bump version #
+0.51 Fix variable in autopat
+ add packet list download to getardoplist
+ add script alias-add-packet
+ add script restore-config
+ update pat-manage menu
+ update setup script
+ bump version #
+0.50 add way to exit alias-del
+ make desktop shortcut executable
+ add rigcontrol check to alias-add for right shortcut
+ complete re write of findardop that includes add alias shortcuts
+ bump version #
+0.49 fix bug and add alias-del
+ update pat-manage
+ add band/freq to new alias when added from pat manage
+ bump version #
+0.48 remove alias-del until major bug can be resolved
+ bump version #
+0.47 add alias-add script
+ add alias-del script
+ add check/install jq to setup script (needed for new alias scripts)
+ add new pat manage menu script
+ update main menu to include pat manage script
+ bump version #
+0.46 add last DL to findardop
+ add log file entry to getardoplist
+ update readme file
+ bump version #
+0.45 sort getardoplist by distance
+ new style desktop link to setup script
+ bump version #
+0.44 add set-auto-update to findardop script
+ add new script auto-download called from findardop
+ add YAD install to setup script
+0.43 start modems in backgound
+ verify other modem not running before starting a new modem
+ stop ardop_gui when stopping modems
+ fix issue #17-choose correct text editor based on version
+0.42 give user info on change log before update
+ add rig control check to auto-pat
+0.41 add start ARDOP-GUI to start ardop
+ add start ARDOP-GUI to autopat
+ remove temp files at start of autopat
+0.40 change rigctld start in autopat
+ add backup for config
+0.39 add rigctld check & start to autopat
+0.38 close if/then statement in start-pat2m
+0.37 add rigctld check & start if needed to start-pat2m
+0.36 add rigctld check & start if needed to start-pat-ardop
+0.35 move log file variable to config file
+0.34 update uninstall
+0.33 add mode to config file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config b/config
new file mode 100644
index 0000000..c411a52
--- /dev/null
+++ b/config
@@ -0,0 +1,16 @@
+#Config file for Pat Menu
+#20200429 KM4ACK
+MYCALLSIGN=KM4ACK
+MAP=usa
+RIGCONTROL=yes
+ARDOP="/home/pi/ardop/./piardopc 8515 plughw:1,0 plughw:1,0"
+ARDOPGUI="/home/pi/ardop/./piARDOP_GUI"
+DIREWOLF="direwolf -p"
+KISS="sudo /usr/sbin/kissattach /tmp/kisstnc"
+AXP=wl2k
+RIG="/usr/local/bin/rigctl -m 4"
+MODEHF=PKTUSB
+MODE2M=FM
+PORT=5050
+LOG=/home/pi/Documents/mylog.txt
+AMRRON=no
diff --git a/default.config b/default.config
new file mode 100644
index 0000000..1c8cf2d
--- /dev/null
+++ b/default.config
@@ -0,0 +1,80 @@
+#20191230 KM4ACK
+
+#This setup is designed to work with a VOX soundcard (ie Signalink)
+#If using a VOX soundcard or radio with a VOX soundcard built in
+#simply edit the call sign below to yours and change
+#RIGCONTROL=no to RIGCONTROL=yes below.
+#Now test the setup. Be sure you have FLRIG open
+#and configured for your radio.
+#AMRRON operators see bottom of this file for trimode.
+
+
+#change next line to your call sign
+MYCALLSIGN=N0CALL
+
+#enter your piardopc command on the line below
+#Be sure to not delete the quotation marks.
+ARDOP="$HOME/ardop/./piardopc 8515 plughw:1,0 plughw:1,0"
+
+#Path to ardop-gui if installed
+ARDOPGUI=$HOME/ardop/./piARDOP_GUI
+
+#command to start direwolf
+DIREWOLF="direwolf -p"
+
+#Kiss attach command
+KISS="sudo /usr/sbin/kissattach /tmp/kisstnc"
+
+#axport name for kissattach
+AXP=wl2k
+
+#Set map to use with findardop
+MAP=usa
+#MAP=world
+
+#Use rig control? yes or no
+#NOTE: autopat will not work without rig control
+RIGCONTROL=no
+
+#enter your rig control command below. DO NOT enter mode
+#or frequency commands as these are handled by the script
+#Be sure to not delete the quotation marks. DO NOT use
+#"rigctld" here. Use "rigctl"
+#example for Yaesu 857D
+#RIG="/usr/local/bin/rigctl -m 122 -r /dev/ttyUSB0 -s 4800"
+
+#Pass rig control commands through FLRIG (default)
+RIG="/usr/local/bin/rigctl -m 4"
+
+#Mode used for HF digital comms on your radio
+MODEHF=USB
+
+#Mode used for packet digital comms on your radio
+MODE2M=FM
+
+#port number used by pat html service
+#pat default is 8080. I prefer 5000
+PORT=8080
+
+#Path to log file
+LOG=$HOME/Documents/mylog.txt
+
+#Below this line is only useful to AMRRON operators. Others shouldn't edit below this line.
+#NOTE:The amrron portion of this script is still experimental.
+
+#set next line to yes for tri-mode setup
+AMRRON=no
+
+#amrron operaters should save/exit this config file after setting above to yes and then run
+# bash ~/patmenu/trimode
+#to enable trimode ops
+
+
+
+
+
+
+
+
+
+
diff --git a/find2 b/find2
new file mode 100755
index 0000000..8dba1a0
--- /dev/null
+++ b/find2
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+#FIND-ARDOP
+#20200425 KM4ACK
+#side note: written during covid-19 outbreak of 2020
+
+#######DEV NOTES#############
+#############################
+
+
+#############################
+
+MYPATH=$HOME/patmenu2
+PATMENU=$MYPATH/patmenu
+LOGO=$MYPATH/pmlogo.png
+CURRENT=$(crontab -l | grep getardoplist | awk '{print $2":"$1}')
+
+source $MYPATH/FA-functions
+
+yad --form --width=420 --text="Find Gateways by KM4ACK" --text-align=center --center --title="Find Gateways" --text-align=center \
+--image $LOGO --window-icon=$LOGO --image-on-top \
+--text="Find Gateways by KM4ACK" \
+--field="Search for Gateway":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/FA-functions; GRIDSEARCH"' \
+--field="View Grid Map":fbtn 'bash -c "source /home/pi/patmenu2/FA-functions; MAP"' \
+--field="Download Gateway List":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/FA-functions; DOWNLIST"' \
+--field="Auto List Download $CURRENT":fbtn 'bash -c "kill -USR1 $YAD_PID; source /home/pi/patmenu2/FA-functions; AUTODOWN"' \
+--field="$LASTDL":LBL \
+--button="Main Menu":1
+
+QUIT=$?
+
+if [ $QUIT = 1 ]; then
+$PATMENU &
+exit
+elif [ $QUIT = 252 ]; then
+exit
+fi
\ No newline at end of file
diff --git a/getardoplist b/getardoplist
new file mode 100755
index 0000000..45879b0
--- /dev/null
+++ b/getardoplist
@@ -0,0 +1,125 @@
+#!/bin/bash
+
+#This script will download the ardop list to the path set below
+#It is intended to be run by cron daily
+#to keep the list current. km4ack 20181214
+#Hint: create a cron job that reads
+#30 23 * * * /usr/local/bin/getardoplist
+#This script is provided AS IS
+#Feel free to mod for your use
+
+#Two versions of this script exist. One for manual downloads and
+#one for cron downloads. The one for cron has no YAD interface.
+#Cron wouldn't run correctly with YAD in the code. The other file
+#is .getardoplist-cron
+
+TODAY=$(date)
+
+#path where files are located
+#must match path in findardop script
+MYPATH=$HOME/patmenu2/ardop-list/
+
+#my log file
+LOG=$HOME/Documents/mylog.txt
+
+GRIDCK=$(jq .locator $HOME/.wl2k/config.json)
+if [ ${#GRIDCK} -lt 3 ]
+then
+echo "Grid square not set in Pat Configure" | tee -a $LOG
+echo "Distances/Bearings will not be accurate"
+yad --center \
+--text="Grid square not set in Pat Configure File.\r Run \'pat configure\' to fix"
+exit
+fi
+
+#make directory if it doesn't exist
+mkdir -p $MYPATH
+
+#set variables for each list
+FILE=$MYPATH'ardoplist.txt'
+EIGHTY=$MYPATH'80mardoplist.txt'
+FORTY=$MYPATH'40mardoplist.txt'
+TWENTY=$MYPATH'20mardoplist.txt'
+THIRTY=$MYPATH'30mardoplist.txt'
+PACKET=$MYPATH'packet.txt'
+
+#check internet connection
+echo "Please wait while we check your internet connection"
+echo "This may take up to a minute"
+#yad --center --timeout=3 --timeout-indicator=top --no-buttons \
+#--text="Please wait while we check your connection \rThis can take up to 30 seconds" &
+wget -q --tries=5 --timeout=10 --spider http://google.com | yad --center --progress --pulsate --timeout-indicator=top --auto-close --no-buttons --text="Checking internet connection"
+if [[ $? -eq 0 ]]; then
+ echo
+#yad --center --timeout=2 --timeout-indicator=top --no-buttons --text="Connection Detected" &
+ echo
+ echo "Please wait while files are download"
+ echo "This may take several minutes"
+ echo "Depending on your internet speed"
+else
+yad --center --timeout=2 --timeout-indicator=top --no-buttons --text="You are not connected to the internet" &
+ exit
+fi
+#remove old files before downloading new ones
+if [ -f $THIRTY ]; then
+ rm $THIRTY
+fi
+
+if [ -f $FILE ]; then
+ rm $FILE
+fi
+
+if [ -f $EIGHTY ]; then
+ rm $EIGHTY
+fi
+
+if [ -f $FORTY ]; then
+ rm $FORTY
+fi
+
+if [ -f $TWENTY ]; then
+ rm $TWENTY
+fi
+
+if [ -f $PACKET ]; then
+ rm $PACKET
+fi
+
+#put date on top line of each file
+echo "List Last Downloaded $(date)" >> $FILE
+echo "List Last Downloaded $(date)" >> $FORTY
+echo "List Last Downloaded $(date)" >> $EIGHTY
+echo "List Last Downloaded $(date)" >> $TWENTY
+echo "List Last Downloaded $(date)" >> $THIRTY
+echo "List Last Downloaded $(date)" >> $PACKET
+
+#yad --center --progress --pulsate --timeout-indicator=top --auto-close --no-buttons --text="Start Download"
+
+#download list to individual files.
+DL(){
+pat rmslist -s --mode ardop --force-download >> $FILE
+pat rmslist -s --band 80m --mode ardop --force-download >> $EIGHTY
+pat rmslist -s --band 40m --mode ardop --force-download >> $FORTY
+pat rmslist -s --band 20m --mode ardop --force-download >> $TWENTY
+pat rmslist -s --band 30m --mode ardop --force-download >> $THIRTY
+pat rmslist -s --mode packet --force-download >> $PACKET
+yad --center --timeout=2 --timeout-indicator=top --no-buttons --text="Downloads Done" &
+}
+DL | yad --center --progress --pulsate --auto-close --no-buttons --text-align=center \
+--text="Downloading....This takes ~30 seconds\rDO NOT CLOSE THIS WINDOW\rDoing so will abort the download."
+if [ -f "$FILE" ]
+then
+echo $TODAY" RMS Gateway list download Success" >> $LOG
+echo;echo "RMS gateway list download success"
+else
+echo $TODAY" RMS Gateway list download FAIL" >> $LOG
+echo;echo "RMS gateway list failed to download"
+fi
+
+
+
+
+
+
+
+
diff --git a/getgrid b/getgrid
new file mode 100755
index 0000000..0779733
--- /dev/null
+++ b/getgrid
@@ -0,0 +1,25 @@
+#!/usr/bin/env ruby
+
+require 'gpsd_client'
+require 'maidenhead'
+require 'socket'
+require 'json'
+
+ft8call_port = 2237
+
+gpsd = GpsdClient::Gpsd.new()
+gpsd.start()
+apicmd = {}
+
+#print come info to the scree
+#puts "Your location is being update"
+
+# get maidenhead if gps is ready
+if gpsd.started?
+ pos = gpsd.get_position
+ maid = Maidenhead.to_maidenhead(pos[:lat], pos[:lon], precision = 5)
+# puts "lat = #{pos[:lat]}, lon = #{pos[:lon]}, grid = #{maid}"
+ puts "#{maid}"
+ apicmd = {:type => "STATION.SET_GRID", :value => maid}
+end
+
diff --git a/griblist b/griblist
new file mode 100644
index 0000000..f9261e9
--- /dev/null
+++ b/griblist
@@ -0,0 +1,22 @@
+false
+WIND
+false
+PRESS
+false
+WAVES
+false
+APCP
+false
+PRMSL
+false
+HGT500
+false
+SFCTMP
+false
+TMP500
+false
+LFTX
+false
+CAPE
+
+
diff --git a/grid-map.pdf b/grid-map.pdf
new file mode 100644
index 0000000..e12313a
--- /dev/null
+++ b/grid-map.pdf
@@ -0,0 +1,4785 @@
+%PDF-1.4
%
+89 0 obj
<>
endobj
xref
89 465
0000000016 00000 n
+0000010249 00000 n
+0000010348 00000 n
+0000012236 00000 n
+0000012298 00000 n
+0000020163 00000 n
+0000028192 00000 n
+0000028305 00000 n
+0000036079 00000 n
+0000041782 00000 n
+0000046409 00000 n
+0000046747 00000 n
+0000046859 00000 n
+0000047062 00000 n
+0000051524 00000 n
+0000052112 00000 n
+0000052634 00000 n
+0000052718 00000 n
+0000053081 00000 n
+0000053438 00000 n
+0000053799 00000 n
+0000053885 00000 n
+0000054001 00000 n
+0000054222 00000 n
+0000054388 00000 n
+0000054853 00000 n
+0000055337 00000 n
+0000055723 00000 n
+0000056319 00000 n
+0000056717 00000 n
+0000061738 00000 n
+0000068458 00000 n
+0000068513 00000 n
+0000071003 00000 n
+0000071086 00000 n
+0000073016 00000 n
+0000073246 00000 n
+0000074981 00000 n
+0000078815 00000 n
+0000078850 00000 n
+0000078928 00000 n
+0000080517 00000 n
+0000080845 00000 n
+0000080911 00000 n
+0000081027 00000 n
+0000081062 00000 n
+0000081140 00000 n
+0000083102 00000 n
+0000083429 00000 n
+0000083495 00000 n
+0000083611 00000 n
+0000083646 00000 n
+0000083724 00000 n
+0000085912 00000 n
+0000086241 00000 n
+0000086307 00000 n
+0000086423 00000 n
+0000086458 00000 n
+0000086536 00000 n
+0000088703 00000 n
+0000089032 00000 n
+0000089098 00000 n
+0000089214 00000 n
+0000089249 00000 n
+0000089327 00000 n
+0000091287 00000 n
+0000091616 00000 n
+0000091682 00000 n
+0000091798 00000 n
+0000091833 00000 n
+0000091911 00000 n
+0000093876 00000 n
+0000094205 00000 n
+0000094271 00000 n
+0000094387 00000 n
+0000094422 00000 n
+0000094500 00000 n
+0000096381 00000 n
+0000096710 00000 n
+0000096776 00000 n
+0000096892 00000 n
+0000096927 00000 n
+0000097005 00000 n
+0000098932 00000 n
+0000099260 00000 n
+0000099326 00000 n
+0000099442 00000 n
+0000099477 00000 n
+0000099555 00000 n
+0000101321 00000 n
+0000101649 00000 n
+0000101715 00000 n
+0000101831 00000 n
+0000101866 00000 n
+0000101944 00000 n
+0000103486 00000 n
+0000103814 00000 n
+0000103880 00000 n
+0000103996 00000 n
+0000104031 00000 n
+0000104109 00000 n
+0000106243 00000 n
+0000106572 00000 n
+0000106638 00000 n
+0000106754 00000 n
+0000106789 00000 n
+0000106867 00000 n
+0000108892 00000 n
+0000109222 00000 n
+0000109288 00000 n
+0000109404 00000 n
+0000109439 00000 n
+0000109517 00000 n
+0000111487 00000 n
+0000111816 00000 n
+0000111882 00000 n
+0000111998 00000 n
+0000112033 00000 n
+0000112111 00000 n
+0000113884 00000 n
+0000114212 00000 n
+0000114278 00000 n
+0000114394 00000 n
+0000114429 00000 n
+0000114507 00000 n
+0000116463 00000 n
+0000116792 00000 n
+0000116858 00000 n
+0000116974 00000 n
+0000117009 00000 n
+0000117087 00000 n
+0000119014 00000 n
+0000119340 00000 n
+0000119406 00000 n
+0000119522 00000 n
+0000119557 00000 n
+0000119635 00000 n
+0000121841 00000 n
+0000122169 00000 n
+0000122235 00000 n
+0000122351 00000 n
+0000122386 00000 n
+0000122464 00000 n
+0000124430 00000 n
+0000124758 00000 n
+0000124824 00000 n
+0000124940 00000 n
+0000124975 00000 n
+0000125053 00000 n
+0000126585 00000 n
+0000126914 00000 n
+0000126980 00000 n
+0000127096 00000 n
+0000127131 00000 n
+0000127209 00000 n
+0000128999 00000 n
+0000129327 00000 n
+0000129393 00000 n
+0000129509 00000 n
+0000129544 00000 n
+0000129622 00000 n
+0000131862 00000 n
+0000132190 00000 n
+0000132256 00000 n
+0000132372 00000 n
+0000132407 00000 n
+0000132485 00000 n
+0000134290 00000 n
+0000134619 00000 n
+0000134685 00000 n
+0000134801 00000 n
+0000134836 00000 n
+0000134914 00000 n
+0000136765 00000 n
+0000137094 00000 n
+0000137160 00000 n
+0000137276 00000 n
+0000137311 00000 n
+0000137389 00000 n
+0000139375 00000 n
+0000139703 00000 n
+0000139769 00000 n
+0000139885 00000 n
+0000139920 00000 n
+0000139998 00000 n
+0000141886 00000 n
+0000142215 00000 n
+0000142281 00000 n
+0000142397 00000 n
+0000142432 00000 n
+0000142510 00000 n
+0000144823 00000 n
+0000145151 00000 n
+0000145217 00000 n
+0000145333 00000 n
+0000145368 00000 n
+0000145446 00000 n
+0000147766 00000 n
+0000148096 00000 n
+0000148162 00000 n
+0000148278 00000 n
+0000148313 00000 n
+0000148391 00000 n
+0000150515 00000 n
+0000150842 00000 n
+0000150908 00000 n
+0000151024 00000 n
+0000151059 00000 n
+0000151137 00000 n
+0000152997 00000 n
+0000153325 00000 n
+0000153391 00000 n
+0000153507 00000 n
+0000153542 00000 n
+0000153620 00000 n
+0000155461 00000 n
+0000155789 00000 n
+0000155855 00000 n
+0000155971 00000 n
+0000156006 00000 n
+0000156084 00000 n
+0000157865 00000 n
+0000158192 00000 n
+0000158258 00000 n
+0000158374 00000 n
+0000158409 00000 n
+0000158487 00000 n
+0000160396 00000 n
+0000160736 00000 n
+0000160802 00000 n
+0000160918 00000 n
+0000160953 00000 n
+0000161031 00000 n
+0000163002 00000 n
+0000163332 00000 n
+0000163398 00000 n
+0000163514 00000 n
+0000163549 00000 n
+0000163627 00000 n
+0000165704 00000 n
+0000166033 00000 n
+0000166099 00000 n
+0000166215 00000 n
+0000166250 00000 n
+0000166328 00000 n
+0000167992 00000 n
+0000168322 00000 n
+0000168388 00000 n
+0000168504 00000 n
+0000168539 00000 n
+0000168617 00000 n
+0000170992 00000 n
+0000171321 00000 n
+0000171387 00000 n
+0000171503 00000 n
+0000171538 00000 n
+0000171616 00000 n
+0000173506 00000 n
+0000173835 00000 n
+0000173901 00000 n
+0000174017 00000 n
+0000174052 00000 n
+0000174130 00000 n
+0000176550 00000 n
+0000176878 00000 n
+0000176944 00000 n
+0000177060 00000 n
+0000177095 00000 n
+0000177173 00000 n
+0000179004 00000 n
+0000179344 00000 n
+0000179410 00000 n
+0000179526 00000 n
+0000179561 00000 n
+0000179639 00000 n
+0000181748 00000 n
+0000182078 00000 n
+0000182144 00000 n
+0000182260 00000 n
+0000182295 00000 n
+0000182373 00000 n
+0000184473 00000 n
+0000184802 00000 n
+0000184868 00000 n
+0000184984 00000 n
+0000185019 00000 n
+0000185097 00000 n
+0000186890 00000 n
+0000187218 00000 n
+0000187284 00000 n
+0000187400 00000 n
+0000187435 00000 n
+0000187513 00000 n
+0000189149 00000 n
+0000189478 00000 n
+0000189544 00000 n
+0000189660 00000 n
+0000189695 00000 n
+0000189773 00000 n
+0000191329 00000 n
+0000191656 00000 n
+0000191722 00000 n
+0000191838 00000 n
+0000191873 00000 n
+0000191951 00000 n
+0000193750 00000 n
+0000194079 00000 n
+0000194145 00000 n
+0000194261 00000 n
+0000194296 00000 n
+0000194374 00000 n
+0000196520 00000 n
+0000196849 00000 n
+0000196915 00000 n
+0000197031 00000 n
+0000197427 00000 n
+0000197680 00000 n
+0000200766 00000 n
+0000201170 00000 n
+0000201681 00000 n
+0000212205 00000 n
+0000212480 00000 n
+0000212924 00000 n
+0000218980 00000 n
+0000219019 00000 n
+0000219097 00000 n
+0000219212 00000 n
+0000219476 00000 n
+0000219554 00000 n
+0000219817 00000 n
+0000219895 00000 n
+0000220160 00000 n
+0000220238 00000 n
+0000220503 00000 n
+0000220581 00000 n
+0000220843 00000 n
+0000220921 00000 n
+0000221186 00000 n
+0000221264 00000 n
+0000221529 00000 n
+0000221607 00000 n
+0000221871 00000 n
+0000221949 00000 n
+0000222213 00000 n
+0000222291 00000 n
+0000222553 00000 n
+0000222631 00000 n
+0000222896 00000 n
+0000222974 00000 n
+0000223236 00000 n
+0000223314 00000 n
+0000223578 00000 n
+0000223656 00000 n
+0000223918 00000 n
+0000223996 00000 n
+0000224259 00000 n
+0000224337 00000 n
+0000224602 00000 n
+0000224680 00000 n
+0000224945 00000 n
+0000225023 00000 n
+0000225288 00000 n
+0000225366 00000 n
+0000225630 00000 n
+0000225708 00000 n
+0000225973 00000 n
+0000226051 00000 n
+0000226314 00000 n
+0000226392 00000 n
+0000226654 00000 n
+0000226732 00000 n
+0000226995 00000 n
+0000227073 00000 n
+0000227338 00000 n
+0000227416 00000 n
+0000227680 00000 n
+0000227758 00000 n
+0000228023 00000 n
+0000228101 00000 n
+0000228366 00000 n
+0000228444 00000 n
+0000228709 00000 n
+0000228787 00000 n
+0000229052 00000 n
+0000229130 00000 n
+0000229395 00000 n
+0000229473 00000 n
+0000229738 00000 n
+0000229816 00000 n
+0000230123 00000 n
+0000230201 00000 n
+0000230466 00000 n
+0000230544 00000 n
+0000230810 00000 n
+0000230888 00000 n
+0000231153 00000 n
+0000231231 00000 n
+0000231497 00000 n
+0000231575 00000 n
+0000231840 00000 n
+0000231918 00000 n
+0000232184 00000 n
+0000232262 00000 n
+0000232570 00000 n
+0000232648 00000 n
+0000232913 00000 n
+0000232991 00000 n
+0000233256 00000 n
+0000233334 00000 n
+0000233646 00000 n
+0000233853 00000 n
+0000234327 00000 n
+0000234405 00000 n
+0000234716 00000 n
+0000234921 00000 n
+0000235409 00000 n
+0000235487 00000 n
+0000235799 00000 n
+0000236008 00000 n
+0000236479 00000 n
+0000236557 00000 n
+0000236868 00000 n
+0000237075 00000 n
+0000237564 00000 n
+0000237642 00000 n
+0000237907 00000 n
+0000237985 00000 n
+0000238296 00000 n
+0000238501 00000 n
+0000238946 00000 n
+0000239024 00000 n
+0000239335 00000 n
+0000239546 00000 n
+0000240069 00000 n
+0000240147 00000 n
+0000240458 00000 n
+0000240667 00000 n
+0000241207 00000 n
+0000241285 00000 n
+0000241595 00000 n
+0000241802 00000 n
+0000242307 00000 n
+0000242385 00000 n
+0000242696 00000 n
+0000242909 00000 n
+0000243483 00000 n
+0000243561 00000 n
+0000243872 00000 n
+0000244083 00000 n
+0000244674 00000 n
+0000244752 00000 n
+0000245063 00000 n
+0000245266 00000 n
+0000245710 00000 n
+0000245788 00000 n
+0000246053 00000 n
+0000246131 00000 n
+0000246396 00000 n
+0000246474 00000 n
+0000246739 00000 n
+0000246817 00000 n
+0000247082 00000 n
+0000264104 00000 n
+0000815484 00000 n
+0000009596 00000 n
+trailer
<<7E2AFE1F33BD46F98AF44B07CDB7F06B>]/Prev 1138401>>
startxref
0
%%EOF
553 0 obj
<>stream
+hޤOhpǿ-sV;]u ^ҋy"L!"ʐdgtխ^F<ԓ"soz
=K0ŋu1i\W&|_ˏ b+bk;DӒhh_5sB
+ k[ˏ_y7_$wvWLb[Z5bGG<FNB<6܈E)!VK`S0&}CT82Nc[
*v9mzb[-1)O^h e
,7&}aIXcXN+ѤNJjh4ndAh99aw`xaͲ3&uyoH]>!"ΏZPXrmU淐3_ً;BQ 2o-ButkĂh"sTEfefd[t&|Ox% ϑV2R[B)$5߳1|oɮ
]vl#cRH:4C7Alq
B[t>0 C&2
endstream
endobj
90 0 obj
<>>>
endobj
91 0 obj
<>/ExtGState<>/Font<>/ProcSet[/PDF/Text/ImageC]/Properties<>/XObject<>>>/Rotate 0/TrimBox[0.0 0.0 1224.0 792.0]/Type/Page>>
endobj
92 0 obj
[/DeviceN[/Black]/DeviceCMYK 124 0 R 120 0 R]
endobj
93 0 obj
<>stream
+HtWM$)) Sl#D&ļ^U[a#ݮqZ~f a'{¿-]5ZR} A<KNdoUSqv_~!kt} s8lǿa)ux$wFΰ+2aM]6&]- "]
YGdqe