zero_corr_max_peak
makes strange empty samples at the end of the profile
#6
Labels
invalid
This doesn't seem right
zero_corr_max_peak
leaves/appends strange values at the end of a profile when run. I assume that this has to do with that a new array is constructed with only zeros:rsgpr/src/gpr.rs
Line 620 in dc73fa0
.. and then it may not be trimmed at the end correctly.
Here's the end of a radar profile without zero-corr:
![image](https://private-user-images.githubusercontent.com/33550973/243622014-37145193-616f-40f5-8b62-621b01d5d862.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MjIxNTIsIm5iZiI6MTcyMTUyMTg1MiwicGF0aCI6Ii8zMzU1MDk3My8yNDM2MjIwMTQtMzcxNDUxOTMtNjE2Zi00MGY1LThiNjItNjIxYjAxZDVkODYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIxVDAwMzA1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWViMWNjZWU0NTc5OGQyZmM1NDQ4Yzc0YjEwYzc5YWNkNzVhOWYzZjI0YzM1NzY0YmU1MmYxMGVhNGFkNjk2NjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NbZtt6QLfWBTcprGnA-QmDYqs4VtJrU0xy4ktHKScQA)
And here it is with
![image](https://private-user-images.githubusercontent.com/33550973/243621612-b13d0b1f-4227-46b7-836f-6ff82a7f597f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MjIxNTIsIm5iZiI6MTcyMTUyMTg1MiwicGF0aCI6Ii8zMzU1MDk3My8yNDM2MjE2MTItYjEzZDBiMWYtNDIyNy00NmI3LTgzNmYtNmZmODJhN2Y1OTdmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIxVDAwMzA1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlhMzhhOGM1ODlmMmRkN2NlMTdhNTc4YTEwNWEzMDk1NzUxNWE3ZDEzZGMzZTk3YWFlOTcwNjdkM2VlZmNmM2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.O6uwD5CG0uvAgNgp-NKMoappK6ZXv0_HT0mdP8sFTcg)
zero_corr_max_peak
:The fix may be as simple as just trimming the data correctly. I also think there's a zero-copy way of doing this instead of instantiating an entirely new array. Finally, a test should be added to make sure this does not happen!
The text was updated successfully, but these errors were encountered: