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

Ignore 0 values of latitude and longitude on client #297

Merged
merged 6 commits into from
Jan 18, 2024

Conversation

york-wei
Copy link
Contributor

  • isValid check failed to filter out 0 coordinates previously due to lon and lat values not being precisely 0

@york-wei york-wei requested review from KennyHuRadar and lmeier and removed request for KennyHuRadar January 16, 2024 18:51
@lmeier
Copy link
Contributor

lmeier commented Jan 16, 2024

This is looking good to me.

Because this is in the critical path, we should do some dogfooding. I propose:

  • run a build of Waypoint locally on your simulator. Change location to something like (40.124567, 0.000000) and verify that that fails while (40.124567, 0.000001) succeeds
  • have the build on your device for ~24 hours, tracking in responsive, and check your user activity page a few times to verify that we're not getting spurious error_location errors from this

Once you do that, leave a comment, and we can move this forward.

@@ -8,17 +8,23 @@
@import Foundation;
#import "CLLocation+Radar.h"

const double DEGREE_EPSILON = 0.00000001;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe obj C has this DBL_EPSILON global const that we can use, maybe we can consider its use here? I think it can be imported with float.h.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DBL_EPSILON is approximately 2.2e-16 which is too precise I think, it would give similar results to just using the != operator like we did before

@york-wei
Copy link
Contributor Author

@lmeier verified both 👍

This is looking good to me.

Because this is in the critical path, we should do some dogfooding. I propose:

  • run a build of Waypoint locally on your simulator. Change location to something like (40.124567, 0.000000) and verify that that fails while (40.124567, 0.000001) succeeds
  • have the build on your device for ~24 hours, tracking in responsive, and check your user activity page a few times to verify that we're not getting spurious error_location errors from this

Once you do that, leave a comment, and we can move this forward.

Copy link
Contributor

@lmeier lmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 🔥

@york-wei york-wei requested a review from KennyHuRadar January 18, 2024 19:23
Copy link
Contributor

@KennyHuRadar KennyHuRadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@york-wei york-wei merged commit 3211df7 into master Jan 18, 2024
1 check passed
@york-wei york-wei deleted the ignore-zero-coordinates branch January 18, 2024 21:53
ShiCheng-Lu pushed a commit that referenced this pull request Jun 13, 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