Update transmit.py add doppler time shift

master-b-d
Alan Johnston 1 month ago committed by GitHub
parent b0b5fd167c
commit 61f97d2d4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -949,11 +949,18 @@ if __name__ == "__main__":
print("Beacon mode off so no repeater transmission") print("Beacon mode off so no repeater transmission")
print("Ready to detect carrier") print("Ready to detect carrier")
start_time = time.perf_counter()
doppler_start_tz = txr * 1e6
doppler_freq_hz = txr * 1e6
while True: while True:
if (input(squelch) == False) and (command_tx == True): if (input(squelch) == False) and (command_tx == True):
doppler_freq_hz = doppler_start_hz + (time.perf_counter() - start_time) * 60
print(doppler_freq_hz)
tx = "{:.3f}".format(doppler_freq/1000)
print(tx)
print("Carrier detected, starting repeater") print("Carrier detected, starting repeater")
output(txLed, 1) output(txLed, 1)
system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + " > /dev/null 2>&1 &")
sleep(0.5) sleep(0.5)
system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &")
while (input(squelch) == False): while (input(squelch) == False):

Loading…
Cancel
Save

Powered by TurnKey Linux.