Skip to content

Commit 1ceb5fd

Browse files
committed
short list of next passes, to be included in the main static page.
1 parent 492c7f3 commit 1ceb5fd

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

autowx2_functions.py

+13
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,17 @@ def listNextPasesTxt(passTable, howmany):
572572

573573
return output
574574

575+
def listNextPasesShort(passTable, howmany=4):
576+
''' list next passes in a sentence '''
577+
578+
output = ""
579+
580+
for satelitePass in passTable[0:howmany]:
581+
satellite, start, duration, peak, azimuth = satelitePass
582+
583+
output += "%s (%s); " % (satellite, strftime('%H:%M', time.localtime(start)) )
584+
585+
return output
575586

576587
def listNextPasesList(passTable, howmany):
577588
output = []
@@ -602,6 +613,8 @@ def generatePassTableAndSaveFiles(satellites, qth, verbose=True):
602613
listNextPasesHtmlOut = listNextPasesHtml(passTable, 100)
603614
saveToFile(htmlNextPassList, listNextPasesHtmlOut)
604615

616+
saveToFile(wwwDir + 'nextpassshort.tmp', listNextPasesShort(passTable, 6))
617+
605618
listNextPasesListList = listNextPasesList(passTable, 20)
606619
CreateGanttChart(listNextPasesListList)
607620

bin/gen-static-page.sh

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ echo $autowxUptimeH
5959

6060
autowxUptime="autowx2 uptime: $autowxUptimeH h (~$autowxUptimeD d)<br />"
6161

62+
### short list of next passes
63+
64+
shortlistofnextpassess="<br/>Next passes: $(cat "$wwwDir/nextpassshort.tmp")<br />"
65+
6266

6367
# ---- NOAA list all dates and times -------------------------------------------------#
6468

var/www/index.tpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ cat <<EOF
6161
$keplerInfo
6262
$autowxUptime
6363
Software version: $autowx2version<br />
64-
64+
$shortlistofnextpassess
65+
6566
$htmlBody
6667
</div>
6768
</div>

0 commit comments

Comments
 (0)