Skip to content
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

fix(at128): allow negative values in points' elevation fields #193

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Sep 5, 2024

PR Type

  • Improvement

Related Links

Description

⚠️ This has to be rebased onto develop after #173 is merged, and then be merged.

Only AT128 normalized its points' elevation field to [0, 2pi) while other sensors allowed negative elevation values. While the normalization is done on azimuth as well and thus, for consistency sake, would be nice on the elevation field, too, this causes visualizations to look ugly when coloring by elevation.
Anyway, trigonometry functions won't care about this change as they are periodic, and given that all other sensors are not normalizing elevation, it is safe to assume this doesn't impact downstream modules.

Old (normalized) New (unnormalized)
image image

Review Procedure

Confirm the elevation field looks correct. Code review.

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

@mojomex mojomex requested review from knzo25 and drwnz September 5, 2024 06:02
@mojomex mojomex self-assigned this Sep 5, 2024
@mojomex mojomex marked this pull request as draft September 5, 2024 06:02
@knzo25
Copy link
Collaborator

knzo25 commented Sep 30, 2024

@mojomex
#173 was merged, so could you rebase or solve conflicts before checking this PR?

@mojomex mojomex marked this pull request as ready for review September 30, 2024 04:12
@mojomex
Copy link
Collaborator Author

mojomex commented Sep 30, 2024

@knzo25 Thank you for the reminder, done. 👍

@mojomex
Copy link
Collaborator Author

mojomex commented Sep 30, 2024

@knzo25 As discussed internally, since this is a small 'hotfix'-style change, this is fine to merge into main.
I have tested the PR with a live sensor during the develop-eval tests and confirmed it working (see screenshots above). Code review should be enough imho.

@mojomex mojomex changed the base branch from develop to main September 30, 2024 06:08
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.78%. Comparing base (9f706e3) to head (7245521).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
- Coverage   29.65%   25.78%   -3.88%     
==========================================
  Files          99       99              
  Lines        8760     8747      -13     
  Branches     2173     2146      -27     
==========================================
- Hits         2598     2255     -343     
+ Misses       6116     6106      -10     
- Partials       46      386     +340     
Flag Coverage Δ
differential 25.78% <100.00%> (?)
total ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Sep 30, 2024

Copy link
Collaborator

@knzo25 knzo25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

question though:
You are using MAX_AZIMUTH to normalize elevation.
I know that it is set to 360 * AngleUnit but if there comes a time where that stops being true (separate directly solid state from mechanical devices, etc), it would be worth considering using a separate variable

@mojomex
Copy link
Collaborator Author

mojomex commented Oct 1, 2024

@knzo Thanks for the input! The angle corrector classes are very sensor-specific (e.g. only AT128) so I think we are fine for some time to come. Other sensors such as the Aeries II don't have such variables at all for example.

@mojomex mojomex merged commit a9c24e3 into tier4:main Oct 1, 2024
12 of 13 checks passed
@mojomex mojomex deleted the at128-fix-elevation branch October 1, 2024 08:37
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.

2 participants