-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue49 #53
Conversation
…o in ./flyby, but cat readout of db seems fine...
…Missing yes/no confirmation to overwrite transponder database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very nice, but I have some minor comments.
fetch_satnogs_db.py
Outdated
previous_norad_id = False | ||
|
||
# Iterate through SatNOGS database | ||
for i in sorteddata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use something else than i
, satellite
or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit commit 2c7cf97
Renaming i to transponder
fetch_satnogs_db.py
Outdated
previous_norad_id = i['norad_cat_id'] | ||
|
||
# Add transponder data | ||
db.write("%s - Inverting = %r " %(i['description'], i['invert'])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Write "inverting" when inverting = True, but not otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2c7cf97
fetch_satnogs_db.py
Outdated
if not i['baud']: | ||
db.write("- Baud = %s " %i['baud']) | ||
if not i['alive']: | ||
db.write("Not currently alive\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Write only "(dead)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2c7cf97
fetch_satnogs_db.py
Outdated
db.write("No weekly schedule\n") | ||
db.write("No orbital schedule\n") | ||
|
||
db.write("end\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also the file be closed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File is automatically closed when stepping down to the same indentation level with open was called from.
|
||
#Step 1: Fetch JSON transponder information from SatNOGS db. | ||
request = urllib2.urlopen("https://db.satnogs.org/api/transmitters") | ||
data = json.load(request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of these two lines seem to hang indefinitely (or near indefinitely) when internet is unavailable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not reproduce with python 2.7.13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, probably network configuration errors on my own end. Fails properly on other configurations.
fetch_satnogs_db.py
Outdated
|
||
# Add transponder data | ||
db.write("%s - Inverting = %r " %(i['description'], i['invert'])) | ||
if not i['baud']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to write "Baud = 0" to the file regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2c7cf97
…nsponder has a up and downlink. Dead satellites show only as (dead)
fetch_satnogs_db.py
Outdated
else: | ||
db.write(" - Non-inverting") | ||
if transponder['baud']>0: | ||
db.write(" - Baud = %s " %transponder['baud']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should remove superfluous space after the baud string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7304193
Fix #49
Adds a python script for getting transponder information from db.satnogs.org/api.