Repository navigation
Absolute Distance Integration - #482
Merged
electrostat merged 4 commits intoNov 10, 2017
Merged
electrostat merged 4 commits into
electrostat merged 4 commits into
Conversation
- update TurfMethods - create method to calculate the absolute distance between event and final destination
- quick checkstyle fix
- connect absolute distanc calculation to all events and return int result
Guardiola31337
suggested changes
Nov 10, 2017
| ); | ||
| MapboxTelemetry.getInstance().addAbsoluteDistanceToDestination(0, departEvent); | ||
|
|
||
| calculateAbsoluteDistance(location, routeProgress); |
Contributor
There was a problem hiding this comment.
Not completely sure why we're calling calculateAbsoluteDistance(location, routeProgress); here.
We're calling it again 👇
Contributor
There was a problem hiding this comment.
What about extracting it to a local variable (e.g. absoluteDistance) instead of passing the call into addAbsoluteDistanceToDestination()?
Guardiola31337
suggested changes
Nov 10, 2017
| afterLocations = obtainLocations(afterLoc); | ||
| } | ||
|
|
||
| private static int calculateAbsoluteDistance(Location currentLocation, RouteProgress routeProgress) { |
Contributor
There was a problem hiding this comment.
Why not moving this utility method to DistanceUtils class?
- move method to distance utils and call from there - utilize local variables
Guardiola31337
approved these changes
Nov 10, 2017
Guardiola31337
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me 👍
Contributor
|
@electrostat Check CI: |
electrostat
pushed a commit
that referenced
this pull request
Nov 10, 2017
* add telem absolute distance to destination track support * Absolute Distance Integration (#482) * AbsoluteDistance Calculation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calculate absolute distance and integrate with new APIs