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
get_time_diffs and get_distances inconsistent #57
Comments
@blacknapkinsuk Please see the discussion for Issue #51 . I have opened a pull request hotfix-57 and fixed and overloaded the get_time_diffs() and get_distance() functions to accept and initial value and therefore return N results for an input of size N. Can you please review the changes and see if this makes sense? |
@blacknapkinsuk , the same had also been fixed by @bacusters in the python-binding branch This hasn't been merged with master yet, we need to check which of the two solutions is better and incorporate that. Any preferences? |
Looking at the change, I am unsure why this code changes the behaviour. Surely the initial value is just overwritten after being set? I do not see the iterator being advanced after setting the initial value. |
@blacknapkinsuk the |
For N timestamps, get_time_diffs returns n-1 results. Should this be N, with the first value being 0?
For N positions, get_distances returns N results. Neither the first or last distance is 0. One of these should be incorrect.
Both methods should be consistent.
Calculation appears to be difference between N and N +1, hence It appears that the last distance calculation must be incorrect as there is no N + 1
However, a change in behaviour will break existing code, so more clarification in the API documentation is perhaps called for.
The text was updated successfully, but these errors were encountered: