1
0
Fork 0

Merge pull request #9 from xmichaelx/main

Small fixes and handling corner cases with sat visibility
merge-requests/2/head
Cees Bassa 2022-06-25 17:27:59 +02:00 committed by GitHub
commit 12245fff05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -7,5 +7,5 @@ Python based radio frequency satellite tracking
To view data attached as example:
```
python3 rfplot.py -p data -P 2021-08-04T20:48:35 -s 50 -l 1800 -C 4171
python3 rfplot.py -p .\data\2021-08-04T20_48_35 -s 50 -l 1800 -C 4171
```

View File

@ -136,6 +136,9 @@ def main():
for sat_info in satellite_info:
satellite = EarthSatellite(sat_info["tle"][-2], sat_info["tle"][-1])
t, events = satellite.find_events(site_location, t0, t1, altitude_degrees=0.0)
alt, _, _ = (satellite - site_location).at(t0).altaz()
if len(t) == 0 and alt.degrees > 0:
t, events = [t0, t1], [0,2]
if len(t) > 0:
pairs = [ (ti, event) for ti, event in zip(t, events)]
if pairs[0][1] in [1,2]:

View File

@ -45,7 +45,7 @@ class Spectrogram:
else:
print(f"Spectrogram is not available under {fname}\nUsing {fnames[0]} instead")
fname = fnames[0]
ifile = int(fname.split("_")[1].replace(".bin", ""))
ifile = int(fname.split("_")[-1].replace(".bin", ""))
# Read first header
with open(fname, "rb") as fp: