From b431056efb25328891dffebcb1a4e86f256e382a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drza=C5=82?= Date: Sat, 25 Jun 2022 17:00:48 +0200 Subject: [PATCH 1/3] Updated usage --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d83f308..639e9e3 100644 --- a/README.md +++ b/README.md @@ -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 ``` From 9650be06d8e0ed2ba8818f42e68082af7ebcfba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drza=C5=82?= Date: Sat, 25 Jun 2022 17:02:03 +0200 Subject: [PATCH 2/3] Added checking if satellite was always above horizon --- rfplot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rfplot.py b/rfplot.py index 1a90efc..a464557 100755 --- a/rfplot.py +++ b/rfplot.py @@ -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]: From 8c41a4c63d754d6c0e2cfe92b0091c6fb73a4163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drza=C5=82?= Date: Sat, 25 Jun 2022 17:10:44 +0200 Subject: [PATCH 3/3] Change to work also on windows --- strf/rfio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strf/rfio.py b/strf/rfio.py index 9fc3e55..c105709 100644 --- a/strf/rfio.py +++ b/strf/rfio.py @@ -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: