summaryrefslogtreecommitdiff
path: root/gr-radar-mono/src/python
diff options
context:
space:
mode:
authorjcorgan2007-09-28 21:44:05 +0000
committerjcorgan2007-09-28 21:44:05 +0000
commit554380de440aed0dd2c20c1c394e15c770802b2d (patch)
treef63caace2024a43d2eebaeaa86fa8dc1548e44b5 /gr-radar-mono/src/python
parentea8558daa6d9afa7dea13fe0adf7acbac4e5d352 (diff)
downloadgnuradio-554380de440aed0dd2c20c1c394e15c770802b2d.tar.gz
gnuradio-554380de440aed0dd2c20c1c394e15c770802b2d.tar.bz2
gnuradio-554380de440aed0dd2c20c1c394e15c770802b2d.zip
Merged r6552:6562 from jcorgan/radar into trunk. Updates gr-radar-mono with changes from live field testing.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6563 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-radar-mono/src/python')
-rw-r--r--gr-radar-mono/src/python/radar_mono.py10
-rwxr-xr-xgr-radar-mono/src/python/usrp_radar_mono.py5
2 files changed, 9 insertions, 6 deletions
diff --git a/gr-radar-mono/src/python/radar_mono.py b/gr-radar-mono/src/python/radar_mono.py
index 6e2c993e1..1a7b9260a 100644
--- a/gr-radar-mono/src/python/radar_mono.py
+++ b/gr-radar-mono/src/python/radar_mono.py
@@ -26,6 +26,9 @@ from gr import gr_threading as _threading
n2s = eng_notation.num_to_str
+txp_delay = 60 # Pipeline delay to turn on transmit mixer
+rxp_delay = 76 # Pipeline delay to turn off transmit mixer
+
#-----------------------------------------------------------------------
# FPGA Register Definitions
#-----------------------------------------------------------------------
@@ -92,7 +95,7 @@ class radar_tx(object):
self._u._write_fpga_reg(FR_RADAR_TON, self._ton_ticks)
def set_tsw(self, tsw):
- self._tsw_ticks = 2*(int(tsw*64e6)/2)-1 # Even number, then subtract 1
+ self._tsw_ticks = 2*(int(tsw*64e6)/2)-1+rxp_delay # Even number, then subtract 1
if self._verbose:
print "Setting pulse switching time to", tsw, " sec ("+`self._tsw_ticks+1`+" ticks)"
self._u._write_fpga_reg(FR_RADAR_TSW, self._tsw_ticks)
@@ -246,7 +249,8 @@ class radar(object):
self.set_reset(True)
self.set_tx_board(self._trans.subdev_spec())
self.set_debug(self._debug)
-
+ self.set_atrdel()
+
def _write_mode(self):
self._trans._u._write_fpga_reg(FR_RADAR_MODE, self._mode)
@@ -291,7 +295,7 @@ class radar(object):
self._trans.set_freq(center_freq, chirp_width)
self._rcvr.tune(center_freq)
- def set_atrdel(self, tx_delay, rx_delay):
+ def set_atrdel(self, tx_delay=txp_delay, rx_delay=rxp_delay):
if self._verbose:
print "Setting TX delay of", tx_delay, "clocks, RX delay of", rx_delay
self._trans._u._write_fpga_reg(FR_RADAR_ATRDEL, tx_delay << 16 | rx_delay)
diff --git a/gr-radar-mono/src/python/usrp_radar_mono.py b/gr-radar-mono/src/python/usrp_radar_mono.py
index a8ed9b8bf..3f2ad28e2 100755
--- a/gr-radar-mono/src/python/usrp_radar_mono.py
+++ b/gr-radar-mono/src/python/usrp_radar_mono.py
@@ -52,11 +52,11 @@ def main():
help="set waveform amplitude in % full scale, default is %default,")
parser.add_option("", "--ton", type="eng_float", default=5e-6,
help="set pulse on period in seconds, default is %default,")
- parser.add_option("", "--tsw", type="eng_float", default=406.25e-9,
+ parser.add_option("", "--tsw", type="eng_float", default=0.0,
help="set transmitter switching period in seconds, default is %default,")
parser.add_option("", "--tlook", type="eng_float", default=5e-6,
help="set receiver look time in seconds, default is %default,")
- parser.add_option("", "--prf", type="eng_float", default=10e3,
+ parser.add_option("", "--prf", type="eng_float", default=100,
help="set pulse repetition frequency in Hz, default is %default,")
parser.add_option("-v", "--verbose", action="store_true", default=False,
help="enable verbose output, default is disabled")
@@ -84,7 +84,6 @@ def main():
r.set_prf(options.prf)
r.set_amplitude(options.amplitude)
r.set_freq(options.frequency, options.chirp_width)
- r.set_atrdel(64, 70) # TODO: parameterize
r.start()
raw_input("Press ENTER to stop.")