Re:Espargos: ESP32-based WiFi sensing array
by janmo on Tuesday February 18, 2025 @04:17AM
(#43087655)
Thank you for your reply, I have been reading the code and there are some things that I am not sure to understand.
- The Espargos code uses rxstart_time_cyc & rxstart_time_cyc_dec for the ns timestamp calculation
- Both values are not documented in the Espressif code and just marked as /*< reserved */
- The timestamp parameter is documented but it is in "microseconds"
Is there anywhere I can find more documentation on the "rxstart_time_cyc" and "rxstart_time_cyc_dec" fields? Are these cycle counters from the wifi chip?
Additionally, you can use the phase information in the estimated channel coefficients (CSI) to determine the more precise time of arrival. Very briefly, a time delay in time domain will be visible as a frequency(=subcarrier)-dependent phase shift in frequency(=subcarrier)-domain. Now synchronization is only limited by impairments like thermal noise and phase noise. In practice in nice lab conditions, the time of arrival accuracy is on the level of <<1m.
On top of phase differences between subcarriers (--> timing information), we also measure phase differences between antennas, which provides angle of arrival and, with multiple arrays, phase of arrival information.
You can go even further by measuring phase differences between subsequent packets, which provides frequency offset and Doppler (--> velocity) information. I have some nice results on that, but that's a topic for the future ;)