[Hackrf-dev] Newbie questions related to RADAR emulation project

Ben Greear greearb at candelatech.com
Fri Jul 20 19:50:22 EDT 2018


Hello!

First, I'm really enjoying the hackrf so far.  Thanks to all of you who
helped make it possible.

My current application is to make it into a pulse generator.  I have it
basically working, but I am not sure how efficient it is or if it will
scale to larger time intervals...

I am programatically building the vector and passing it to the API
like this.  Also, I know how to program, but I am a newbie at python
as well as hackrf.

self.blocks_vector_source_x_0 = blocks.vector_source_c(vector, True, 1, [])

I build the vector like this:

# globals
vector = [0]

...

     # Build our vector
     for i in range(0, pulse_count):
         vector += [1]*pulse_width
         vector += [0]*pulse_interval

     # Minus 1 because we add a leading zero since I am ignorant of python an its syntax
     vector += [0]*((sweep_time * 1000) - 1)


My main concern is that the sweep-time I want to support is often large (like multiple seconds
or even minutes).  The vector is going to be really huge if I pad it with that many zeros.

Is there a better way to have a set of short bursts, and then tell the radio to stop transmitting
for a while before repeating again?

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the HackRF-dev mailing list