-
Notifications
You must be signed in to change notification settings - Fork 14
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 PR for discussion #382
Conversation
int current_x = x + int(curr_trj.vx * curr_time + 0.5); | ||
int current_y = y + int(curr_trj.vy * curr_time + 0.5); | ||
int current_x = x + (int)(floor(curr_trj.vx * curr_time)); | ||
int current_y = y + (int)(floor(curr_trj.vy * curr_time)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor question: From the earlier discussion, it seems the "+ 0.5" is used so that the int casting will round the result rather than truncate/floor it.
We should definitely be consistent about whichever we do, but out of curiosity is there a reason to prefer flooring over rounding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After writing that, I'm realizing that I shouldn't have used truncate/floor interchangeably since they are only equivalent operations for positive values, but I'm still curious about the round vs floor question
Closing this for now since the Eigen change went in. We can revisit pieces of this as needed. |
Makes several fundamental changes to the KBMOD core search:
floor
instead ofint
to convert from predicted position to pixel index (matters for pixels off the negative side of the grid)