fix constant spectrum for all tof
This commit is contained in:
parent
3199103caa
commit
25e259f038
15
src/aoa.py
15
src/aoa.py
@ -79,16 +79,21 @@ class AoA:
|
||||
)
|
||||
|
||||
def steering_vector(self, theta: float, tof: float):
|
||||
omega_t = self.omega_base**tof
|
||||
phi_theta = self.phi_base ** (1 - np.cos(theta))
|
||||
|
||||
assert phi_theta.shape == omega_t.shape
|
||||
omega_t = np.exp(-2j * np.pi * config.DELTA_F * tof)
|
||||
phi_theta = np.exp(
|
||||
2j
|
||||
* np.pi
|
||||
* config.CENTRAL_FREQUENCY_HZ
|
||||
* config.ANTENNA_SPACING
|
||||
* (1 - np.cos(theta))
|
||||
/ config.C
|
||||
)
|
||||
|
||||
omega_t = np.expand_dims(omega_t, axis=-1)
|
||||
phi_theta = np.expand_dims(phi_theta, axis=-1)
|
||||
|
||||
antenna_v = omega_t ** np.arange(self.N_subcarriers // 2)
|
||||
phis = phi_theta ** np.arange(self.N_rx)
|
||||
phis = phi_theta ** np.arange(self.N_rx // 2)
|
||||
antenna_v = np.expand_dims(antenna_v, axis=-1)
|
||||
steering = antenna_v * phis
|
||||
return steering.T.reshape(-1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user