egaebel / lgtm

The code for my thesis project, Looks Good to Me (LGTM), Authentication for Augmented Reality. This is a full implementation of LGTM that localizes a wireless transmitter, and searches for a specific face at that location to authenticate two users trying to establish secure point to point communication.
57 stars 58 forks source link

Question on SpotFi MUSIC specturm #3

Closed somidad closed 8 years ago

somidad commented 8 years ago

In lines between 646-652 of a file csi-code/spotfi.m:

for jj = 1:size(Pmusic, 2)
    % AoA loop
    for ii = 1:size(Pmusic, 1)
        Pmusic(ii, jj) = 10 * log10(Pmusic(ii, jj));% / max(Pmusic(:, jj))); 
        Pmusic(ii, jj) = abs(Pmusic(ii, jj));
    end
end

I think abs should be removed. Because MUSIC spectrum will have negative value at non-candidate in decibels , and taking abs to the negative value will make a non-candidate to a candidate.

If I get wrong, please let me know about it.

Regards.

caichao commented 8 years ago

abs(...) corresponds to the peaks in y axis, the angle corresponds to the peaks is the index.

somidad commented 8 years ago

No, I mean that taking abs(...) to -30 dB, for instance, will produce a wrong MUSIC spectrum

egaebel commented 8 years ago

@gsongsong You're absolutely right. I had this fixed in my local copy and just failed to upload the fix. Thank you for pointing this out. I'm uploading a commit to fix this in about 5 minutes.