Skip to content

Commit

Permalink
Moving to more appropriate usage of aoa_capon func
Browse files Browse the repository at this point in the history
  • Loading branch information
edwin-pan committed Mar 17, 2020
1 parent 93557dd commit fe12c5c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions demo/people_tracking/people_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@


# Start DSP processing
range_azimuth = np.zeros((ANGLE_BINS, BINS_PROCESSED), dtype=np.complex_)
range_azimuth = np.zeros((ANGLE_BINS, BINS_PROCESSED))
num_vec, steering_vec = dsp.gen_steering_vec(ANGLE_RANGE, ANGLE_RES, VIRT_ANT)
tracker = EKF()

Expand All @@ -64,13 +64,12 @@
radar_cube = radar_cube - mean

# --- capon beamforming
beamWeights = np.zeros((VIRT_ANT, BINS_PROCESSED))
beamWeights = np.zeros((VIRT_ANT, BINS_PROCESSED), dtype=np.complex_)
radar_cube = np.concatenate((radar_cube[0::2, ...], radar_cube[1::2, ...]), axis=1)
# Note that when replacing with generic doppler estimation functions, radarCube is interleaved and
# has doppler at the last dimension.
for i in range(BINS_PROCESSED):
range_azimuth[:,i], beamWeights[:,i] = dsp.aoa_capon(radar_cube[:, :, i].T, steering_vec)
range_azimuth = np.abs(range_azimuth)
range_azimuth[:,i], beamWeights[:,i] = dsp.aoa_capon(radar_cube[:, :, i].T, steering_vec, magnitude=True)

""" 3 (Object Detection) """
heatmap_log = np.log2(range_azimuth)
Expand Down

0 comments on commit fe12c5c

Please sign in to comment.