Skip to content

Instantly share code, notes, and snippets.

@kng
Created September 10, 2022 15:56
Show Gist options
  • Save kng/46c7821fc8245be6286aeaa385c82f02 to your computer and use it in GitHub Desktop.
Save kng/46c7821fc8245be6286aeaa385c82f02 to your computer and use it in GitHub Desktop.
manual patch for running systems knegge/gr-satnogs:pr239
#!/bin/bash
patch -b /usr/lib/python3/dist-packages/satnogs/doppler_compensation.py /usr/lib/python3/dist-packages/satnogs/doppler_compensation.diff
--- doppler_compensation.py.orig 2022-09-01 17:35:16.790922672 +0100
+++ doppler_compensation.py 2022-09-01 17:35:27.620784977 +0100
@@ -102,7 +102,7 @@
# Compute roughly the maximum Doppler shift. For that we use an (extreme)
# elliptic LEO with a relative speed of 10 km/s
max_doppler = (10e3/3e8) * sat_freq
- decimation = max(1, math.ceil(samp_rate / (out_samp_rate +abs(lo_offset) + max_doppler)))
+ decimation = max(1, math.floor(8 / 9 * samp_rate / (out_samp_rate + 2 * (abs(lo_offset) + max_doppler))))
decimated_samp_rate = samp_rate / decimation
if(decimation > 1):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment