org-arl / SignalAnalysis.jl

Signal analysis toolbox for Julia
MIT License
41 stars 10 forks source link

Add snap DoA-ToA estimation #32

Open ymtoo opened 1 year ago

ymtoo commented 1 year ago

Snap DoA-ToA estimation using Hough transform is implemented. Given an array sensor data, snapdoatoa returns snap DoAToAs in the form of Vector{NTuple{3}} for 2D DoA and Vector{NTuple{2}} for 1D DoA.

MWE:

# setting
data = randn(10000, 4)
fs = 200000
rxpos = [0.0 1.0 0.0 0.0; 
              0.0 0.0 1.0 0.0;
              0.0 0.0 0.0 1.0]
c = 1540.0
p = 99.999
tdist = 2e-3
minvotes = 4
Γ₀ = 1000
# simulate a snap 
data[Γ₀ - round(Int, 0.75 / c * fs),2] += 100 
data[Γ₀ + round(Int, 0.25 / c * fs), [1,3,4]] .+= 100
# DoA-ToA estimation
doatoas = snapdoatoa(data, fs, rxpos, θ, c; p = p, tdist = tdist, minvotes = minvotes) 
#1-element Vector{Tuple{Float64, Float64, Float64}}:
# (0.00336680173802057, 0.0033667826560101035, 999.7500000000016) 

Reference

M. Chitre, S. Kuselan, and V. Pallayil, “Ambient noise imaging in warm shallow waters; robust statistical algorithms and range estimation,” The Journal of the Acoustical Society of America, vol. 132, no. 2, pp. 838–847, 2012.