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

The GPS range is not displayed in the right scale #1684

Closed
Mbodin opened this issue Dec 15, 2019 · 9 comments
Closed

The GPS range is not displayed in the right scale #1684

Mbodin opened this issue Dec 15, 2019 · 9 comments
Labels
Milestone

Comments

@Mbodin
Copy link

Mbodin commented Dec 15, 2019

The GPS precision is not infinite and the app displays it as usual with a blue circle around the current position. The issue is that the size of this blue circle is not properly updated when zooming in and out. In other words, the scale of the blue circle doesn’t seem to be the same than the scale of the map: it seems to be in the scale of the previous zoom setting, bot the current one.

How to Reproduce
I think that the simplest way to visualise the bug is through these two screens. These two screens are almost identical expect by the size of the blue circle:
Screenshot_2019-12-14-15-02-31-776_de westnordost streetcomplete
Screenshot_2019-12-14-15-02-23-793_de westnordost streetcomplete
I can switch from the big blue circle to the small blue circle by pressing through the “-” zoom button, then the “+” zoom button. To switch from the small blue circle to the big circle, I can press the “+” zoom button followed by the “-” zoom button. I can do this consistently: this is not a GPS issue. Actually, I can switch off my GPS and let the phone rely on the Wifi positioning approximation and the result stays the same (it was actually the case in these screenshots): pressing “-” followed by “+” makes the circle bigger, and pressing “+” followed by “-” makes the circle smaller.

Versions affected
15.0

@Mbodin Mbodin added the bug label Dec 15, 2019
@westnordost westnordost added this to the new tangram milestone Dec 19, 2019
@westnordost
Copy link
Member

Will be fixed in next version

@westnordost
Copy link
Member

(Though, when tilting, the displayed accuracy is still hugely inprecise, but that's another issue, one I will not likely fix)

@Mbodin
Copy link
Author

Mbodin commented Jan 27, 2020

Is the tilting inaccuracy due to StreetComplete itself? It feels like it’s about the phone captors or something like that.

@westnordost
Copy link
Member

The map rendering library does not support to draw a circle in meters, only in pixels. See tangrams/tangram-es#1121

The workaround I use to to calculate the pixels by calculating a second point that is X meters away from the original one and query from the map the screen position of that point. The distance of that position to the screen position of the GPS location is then the radius. This method gets hugely imprecise when tilt is active (imagine looking into the horizon).

@westnordost
Copy link
Member

Actually, while describing the algorithm to calculate it, it came to me that it is needlessly complex. I changed the algorithm now to basically 2^zoom_level * 256 / (cos(latitude * pi/180) * earth_circumference)

@Mbodin
Copy link
Author

Mbodin commented Jan 27, 2020

Oh, I understand the issue… :-/ This is frustrating. It does feel that it should be a nice feature for the map rendering library.

@rugk

This comment has been minimized.

@rugk
Copy link
Contributor

rugk commented Feb 9, 2020

Ah sorry, just saw tangrams/tangram-es#1121. Forget it. 😄

@westnordost
Copy link
Member

If you are proficient with C++, you can help out in that project, it's open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants