Skip to content
Snippets Groups Projects
Commit 2ce9f2e6 authored by Juha vierinen's avatar Juha vierinen
Browse files

added new config option for rx daughterboard, to allow specifying the...

added new config option for rx daughterboard, to allow specifying the daughterboard for reflected power measurement
parent 1434dfa0
Branches
No related merge requests found
......@@ -5,6 +5,7 @@ import scipy.signal as ss
import time
import matplotlib.pyplot as plt
import h5py
import sys
def acquire_spectrum(freq=12.5e6,
......@@ -14,7 +15,7 @@ def acquire_spectrum(freq=12.5e6,
subdev="A:A",
ofname="spec.h5"):
usrp = uhd.usrp.MultiUSRP("recv_buff_size=500000000")
usrp = uhd.usrp.MultiUSRP("addr=%s,recv_buff_size=500000000"%(sys.argv[1]))
subdev_spec=uhd.usrp.SubdevSpec(subdev)
usrp.set_rx_subdev_spec(subdev_spec)
......@@ -40,6 +41,8 @@ def acquire_spectrum(freq=12.5e6,
h["freq"]=freqv
plt.plot(freqv/1e6, 10.0*n.log10(S))
plt.xlabel("Frequency (MHz)")
plt.ylabel("Power spectral density (dB)")
plt.show()
......
......@@ -15,13 +15,13 @@ save_raw_voltage=false
# minimum time needed for GPS to settle
# 300 seconds is a good safe value
# use 0 if testing to startup faster
min_gps_lock_time=15
min_gps_lock_time=30
gps_holdover_time=1800.0
rx_channel="cha"
sample_rate=1000000
# decimation (100 kHz bandwidth)
dec=10
dec=30
# use ram disk to hold raw voltage
data_dir="/dev/shm"
......@@ -36,16 +36,18 @@ range_shift=5
code_len=10000
# list of codes specified by type, pulse length, ipp, and bandwidth
# note that pulse_length=-1 means continuous code
# lengths are in decimated samples.
# For example, sr=1e6, dec=10 and pulse_length=30 means a 300 microsecond
# pulse length
code_type=["prn"]
pulse_length=[-1]
pulse_length=[30]
ipp=[1000]
bw=[100e3]
# code list (binary waveforms)
#codes=["waveforms/code-l1000-b10-barker39_100k.bin"]
# tTable of center frequencies and codes. Format:
# Table of center frequencies and codes. Format:
# Center frequency (MHz), Code number (refers to code list)
freqs=[[1.0,0],
[1.2,0],
......@@ -118,11 +120,14 @@ frequency_duration=2
antenna_select_freq=3.4
tx_addr="192.168.10.2"
rx_addr="192.168.10.2"
rx_addr="192.168.10.10"
tx_subdev="A:A"
rx_subdev="A:A"
# rx daughterboard is missing on tx usrp
rx_subdev_refl_pwr="A:0"
# this is where ionograms are stored
ionogram_path="./results"
......
......@@ -96,7 +96,8 @@ class gpsdo_monitor:
if __name__ == "__main__":
u = uhd.usrp.MultiUSRP()
import sys
u = uhd.usrp.MultiUSRP("addr=%s" % (sys.argv[1]))
print(u.get_mboard_sensor("gps_gprmc"))
print(u.get_mboard_sensor("gps_gpgga"))
print(u.get_mboard_sensor("gps_time"))
......
......@@ -116,6 +116,7 @@ class iono_config:
self.tx_subdev=json.loads(c["config"]["tx_subdev"])
self.rx_subdev=json.loads(c["config"]["rx_subdev"])
self.rx_subdev_refl_pwr=json.loads(c["config"]["rx_subdev_refl_pwr"])
self.ionogram_path=json.loads(c["config"]["ionogram_path"])
self.ionogram_dirname=json.loads(c["config"]["ionogram_dirname"])
......
......@@ -164,7 +164,7 @@ def main(config):
usrp.set_rx_rate(sample_rate)
rx_subdev_spec=uhd.usrp.SubdevSpec(ic.rx_subdev)
tx_subdev_spec=uhd.usrp.SubdevSpec(ic.tx_subdev)
tx_subdev_spec=uhd.usrp.SubdevSpec(ic.tx_subdev_refl_pwr)
usrp.set_tx_subdev_spec(tx_subdev_spec)
usrp.set_rx_subdev_spec(rx_subdev_spec)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment