Skip to content

Commit

Permalink
check if the satellite exists in the TLE file
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsPL committed Oct 8, 2018
1 parent 5434aa2 commit 2ac40c7
Show file tree
Hide file tree
Showing 11 changed files with 2,150 additions and 2,111 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ recordings
bin/pymultimonaprs.confs/
bin/heatmap.py
var/nextpass.png
var/nextpass.html
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ Sample `satellitesData` dictionary:

```
satellitesData = {
'NOAA 18': {
'NOAA-18': {
'freq': '137912500',
'processWith': 'modules/noaa/noaa.sh',
'priority': 1},
'NOAA 15': {
'NOAA-15': {
'freq': '137620000',
'processWith': 'modules/noaa/noaa.sh',
'priority': 1},
'NOAA 19': {
'NOAA-19': {
'freq': '137100000',
'processWith': 'modules/noaa/noaa.sh',
'priority': 1},
Expand Down
21 changes: 13 additions & 8 deletions autowx2.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def genPassTable(howmany=20):
# transit.start - unix timestamp


else: # fixed time recording
elif 'fixedTime' in satellitesData[satellite]: # if ['fixedTime'] exists in satellitesData => time recording
# cron = getFixedRecordingTime(satellite)["fixedTime"]
cron = satellitesData[satellite]['fixedTime']
duration = getFixedRecordingTime(satellite)["fixedDuration"]
Expand All @@ -140,6 +140,8 @@ def genPassTable(howmany=20):
start = delta + time.time()
passTable[start] = [
satellite, int(start), int(duration), '0', '0', priority]
else:
print bc.FAIL + "ERROR: " + bc.ENDC + "Can't find TLE data (in keplers) nor fixed time schedule (in config) for " + satellite

# Sort pass table
passTableSorted = []
Expand Down Expand Up @@ -252,16 +254,19 @@ def getDefaultDongleShift(dongleShift=dongleShift):

def calibrate(dongleShift=dongleShift):
'''calculate the ppm for the device'''
cmdline = [ calibrationTool ]
newdongleShift = justRun(cmdline).strip()
if newdongleShift != '' and is_number(newdongleShift):
log("Recalculated dongle shift is: " + str(newdongleShift) + " ppm")
return str(float(newdongleShift))
if (calibrationTool != False):
cmdline = [ calibrationTool ]
newdongleShift = justRun(cmdline).strip()
if newdongleShift != '' and is_number(newdongleShift):
log("Recalculated dongle shift is: " + str(newdongleShift) + " ppm")
return str(float(newdongleShift))
else:
log("Using the good old dongle shift: " + str(dongleShift) + " ppm")
return dongleShift
else:
log("Using the good old dongle shift: " + str(dongleShift) + " ppm")
return dongleShift


def azimuth2dir(azimuth):
''' convert azimuth in degrees to wind rose directions (16 wings)'''
dirs = ["N↑", "NNE↑↗", "NE↗", "ENE→↗",
Expand Down Expand Up @@ -296,7 +301,7 @@ def log(string, style=bc.CYAN):

satellite, start, duration, peak, azimuth = satelitePass

satelliteNoSpaces = satellite.replace(" ", "_") #remove spaces from the satellite name
satelliteNoSpaces = satellite.replace(" ", "-") #remove spaces from the satellite name

freq = satellitesData[satellite]['freq']
processWith = satellitesData[satellite]['processWith']
Expand Down
13 changes: 7 additions & 6 deletions autowx2_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
# http://www.dk3wn.info/p/?page_id=29535

satellitesData = {
'NOAA 18': {
'NOAA-18': {
'freq': '137912500',
'processWith': 'modules/noaa/noaa.sh',
'priority': 2},
'NOAA 15': {
'NOAA-15': {
'freq': '137620000',
'processWith': 'modules/noaa/noaa.sh',
'priority': 2},
'NOAA 19': {
'NOAA-19': {
'freq': '137100000',
'processWith': 'modules/noaa/noaa.sh',
'priority': 2},
Expand Down Expand Up @@ -109,8 +109,8 @@
# script tha will be used whle waiting for the next pass; set False if we just want to sleep
# by default, this script will get the parameter of duration of the time to be run and the recent dongleShift
# scriptToRunInFreeTime = False # does nothing
#scriptToRunInFreeTime = baseDir + "bin/aprs.sh" # APRS monitor
scriptToRunInFreeTime = baseDir + "bin/radiosonde_auto_rx.sh" # radiosonde tracker, see https://github.com/projecthorus/radiosonde_auto_rx
scriptToRunInFreeTime = baseDir + "bin/aprs.sh" # APRS monitor
#scriptToRunInFreeTime = baseDir + "bin/radiosonde_auto_rx.sh" # radiosonde tracker, see https://github.com/projecthorus/radiosonde_auto_rx
#scriptToRunInFreeTime = baseDir + "bin/pymultimonaprs.sh" # APRS iGate,

# pymultimonaprs must be installed, see: https://github.com/asdil12/pymultimonaprs/
Expand All @@ -131,8 +131,9 @@
# dongle calibration program
# should return the dongle ppm shift

calibrationTool = False # don't calibrate the dongle, use old/fixed shift
#calibrationTool = baseDir + "bin/calibrate.sh" # uses predefined GSM channel
calibrationTool = baseDir + "bin/calibrate_full.sh" # check for the best GSM channel and calibrates
#calibrationTool = baseDir + "bin/calibrate_full.sh" # check for the best GSM channel and calibrates


# DERIVATIVES #############################
Expand Down
Loading

0 comments on commit 2ac40c7

Please sign in to comment.