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

Change delay type to Long #129

Closed
wants to merge 1 commit into from
Closed

Change delay type to Long #129

wants to merge 1 commit into from

Conversation

ccritne
Copy link

@ccritne ccritne commented Dec 3, 2024

This pull should fix the problem pointed out by @javaherisaber in #108

I changed the delay variable from seconds to milliseconds to reduce the gap between the real location and the puck.
The default value is still 1 second but it is possible to update it with locationEngine.updateDelayMs(...).
The old function locationEngine.updateDelay(...) wasn't deleted because of retrocompatibility.

In the first video you can see the problem and in the second video you can see it fixed with a delay of 250 milliseconds. The marker is the real location.

delay_1000ms.mp4
delay_250ms.mp4

@boldtrn
Copy link
Collaborator

boldtrn commented Dec 4, 2024

Thanks for working on this. I think the issue #108 isn't about replay location, but about an actual GPS position. The library is based on 1s update rate from the GPS sensor. Just changing the the replay updates should not really improve this?

@ccritne
Copy link
Author

ccritne commented Dec 4, 2024

I made some test before this change and I found same bug. After my fix the puck seems more precise with replay or gps position. I don't understand what do you mean with "changing the replay updates". Can you explain me better this?

@Fabi755
Copy link
Collaborator

Fabi755 commented Dec 4, 2024

All your changes affecting the classes in org.maplibre.navigation.android.navigation.v5.location.replay as the replay package point to, this engine is a replay engine, or with other words a mock/simulated route run.

Your videos use the snap-example, that is also using the mocked engine, and not real locations. If you try your changes with a real navigation, with real GPS usage, you will see that you changes having no affect to this.

Thanks for your try, and sorry for the confusion, but your changes are not fixing the issue described in #108. I will close this PR for that reason.

@Fabi755 Fabi755 closed this Dec 4, 2024
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.

3 participants