Skip to content

feat(signal): extract a signed BVP so Doppler direction survives - #1816

Open
clonea1 wants to merge 1 commit into
ruvnet:mainfrom
clonea1:contrib/signal-signed-bvp
Open

feat(signal): extract a signed BVP so Doppler direction survives#1816
clonea1 wants to merge 1 commit into
ruvnet:mainfrom
clonea1:contrib/signal-signed-bvp

Conversation

@clonea1

@clonea1 clonea1 commented Sep 4, 2026

Copy link
Copy Markdown

extract_bvp takes a real-valued, amplitude-only input and keeps only the
magnitude of the FFT output, then folds doppler_freq.abs() into the velocity
bins. Direction is therefore unavailable from that path -- and not as a tuning
shortcut that a better post-processing step could undo.

A real-valued signal's FFT magnitude is symmetric about zero frequency:

|X(-f)| == |X(f)|    for real x

So approach and retreat produce identical spectra. The information is not
attenuated or noisy, it is absent, and no amount of downstream work recovers
it. Anything built on that output can report that motion occurred but never
which way it went.

extract_bvp_signed takes temporal COMPLEX CSI -- amplitude and phase together
-- so the spectrum is no longer constrained to be symmetric and the sign of the
Doppler shift is preserved. Added alongside the existing function rather than
replacing it: callers with only amplitude available keep working unchanged, and
the choice of which to use is made where the input format is known.

Three tests cover the property that matters: a synthetic approaching source and
a receding one must produce opposite signs, which the amplitude-only path
cannot distinguish by construction.


Rebased onto current main before opening: staged before today's seven merges, so it needed replaying to avoid reading as a revert of them. Clean rebase, no files deleted.

extract_bvp takes a real-valued, amplitude-only input and keeps only the
magnitude of the FFT output, then folds doppler_freq.abs() into the velocity
bins. Direction is therefore unavailable from that path -- and not as a tuning
shortcut that a better post-processing step could undo.

A real-valued signal's FFT magnitude is symmetric about zero frequency:

    |X(-f)| == |X(f)|    for real x

So approach and retreat produce identical spectra. The information is not
attenuated or noisy, it is absent, and no amount of downstream work recovers
it. Anything built on that output can report that motion occurred but never
which way it went.

extract_bvp_signed takes temporal COMPLEX CSI -- amplitude and phase together
-- so the spectrum is no longer constrained to be symmetric and the sign of the
Doppler shift is preserved. Added alongside the existing function rather than
replacing it: callers with only amplitude available keep working unchanged, and
the choice of which to use is made where the input format is known.

Three tests cover the property that matters: a synthetic approaching source and
a receding one must produce opposite signs, which the amplitude-only path
cannot distinguish by construction.

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant