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

Investigate why test address gps coords for non-metric sometimes fails #321

Closed
Shinigami92 opened this issue Jan 27, 2022 · 1 comment · Fixed by #876
Closed

Investigate why test address gps coords for non-metric sometimes fails #321

Shinigami92 opened this issue Jan 27, 2022 · 1 comment · Fixed by #876
Labels
c: bug Something isn't working c: test p: 1-normal Nothing urgent

Comments

@Shinigami92
Copy link
Member

Describe the bug

218ae3a (#285)

Reproduction

comment in the outcommented code and see that it sometimes fails

Additional Info

Not sure if the test is written wrongly or if the function really is broken

@ST-DDT
Copy link
Member

ST-DDT commented Apr 26, 2022

The values from faker.address.nearbyGPSCoordinate([0, 0]) are extremely bad.
I generated 1000 values.
And calculated their distance to the origin. sqrt(lat² + long²)
Actual:
Min: 0.05575°, Avg: 0.05582°, Max: 0.05588°
Expected:
Min: ~0°, Avg: ~0.075°, Max: ~0.15°

It looks like most of them are located on or near a circular line with a radius of 0.055 instead of a circular area with a radius of 0.150. So we only use ~0.08% of the available area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working c: test p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants