-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Multiple fixes in cs_de #25480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
eriksandgren
wants to merge
5
commits into
nrfconnect:main
Choose a base branch
from
eriksandgren:cs_de_ifft_issue_offset_by_1_bin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Multiple fixes in cs_de #25480
eriksandgren
wants to merge
5
commits into
nrfconnect:main
from
eriksandgren:cs_de_ifft_issue_offset_by_1_bin
+228
−27
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:more detailsGithub labels
List of changed files detected by CI (0)Outputs:ToolchainVersion: Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
b9fc43f to
3b981f1
Compare
|
You can find the documentation preview for this PR here. |
This commit fixes an issue where the computed IFFT magnitude was offset by 1 index due to an implementation error when using FFT to compute the IFFT. The implementation is changed to a different approach which should solve this issue. The new approach is tested and verified to be equal to the output of numpy IFFT: `np.abs(np.fft.ifft(iq_tones_comb, n=512))` This commit also splits refactors `calculate_dist_ifft` with the intention of making it easier to follow. The function has been split up into multiple sub-functions with comments trying to explain the logic of each sub-function. Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
This commit adds unittests for the cs_de module. Three unittests are added for the `cs_de_calc` function: `test_cs_de_calc_empty_report` and `test_cs_de_calc_bad_tone_quality` tests that the returned result is `CS_DE_QUALITY_DO_NOT_USE` when the input is empty or has bad tone quality. `test_cs_de_calc_with_ideal_iq_data` tests that given ideal measurement data (which is generated by the UT itself) the `cs_de_calc` function can estimate the correct distance using both `ifft` and `phase_slope` algorithm. Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
As only one size (512, 1024 or 2048) can be used at a time. Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
Noticed that this was missing when adding ownership of the unittest for cs_de. Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
It might happen that the ToF is negative because the RTT measurements are in CS are not perfectly accurate and may have a statisical distribution around its true value. It might also happen that the ToF is negative because the devices involved in the CS RTT measurements are not perfectly calibrated for internal delays. In these cases it makes more sense to just set the estimated distance to 0.0f, since it is the best estimate we can make, given that we do not want to use negative distances. Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
3b981f1 to
9df0709
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.