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

Add telem absolute distance to destination track support #427

Merged
merged 6 commits into from
Nov 10, 2017

Conversation

Guardiola31337
Copy link
Contributor

@Guardiola31337 Guardiola31337 commented Oct 27, 2017

  • Adds telem absoluteDistanceToDestination track support

This PR depends on mapbox/mapbox-java#615

TODO

  • For now, we're using 0 as absoluteDistanceToDestination (placeholder), this needs to be taken from RouteProgress somehow.
  • Bump MAS version when the new release (2.2.7) lands

👀 @zugaldia @danesfeder @electrostat @ericrwolfe

@Guardiola31337 Guardiola31337 force-pushed the pg-absolute-distance-to-destionation branch from e47e283 to 3f0ae14 Compare October 27, 2017 06:34
@danesfeder danesfeder added ⚠️ DO NOT MERGE PR should not be merged! and removed ⚠️ DO NOT MERGE PR should not be merged! labels Oct 27, 2017
* AbsoluteDistance Calculation

* Connect Absolute Distance

* Move to DistanceUtils
- Fixed conflicts
- added method to handle final location from MetricsRouteProgress
- passes local tests
Copy link
Contributor

@danesfeder danesfeder left a comment

Choose a reason for hiding this comment

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

@electrostat Looking great - just two nit picks, then let's 🚀

return finalManuever.location();
}

return new Point() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be simplified to return Point.fromLatLng(0d, 0d);


public Point getDirectionsRouteDestination() {
StepManeuver finalManuever = directionsRoute.legs().get(directionsRoute.legs().size() - 1).steps()
.get(directionsRoute.legs().get(directionsRoute.legs().size() - 1).steps().size() - 1).maneuver();
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, can we extract this into separate variables?

RouteLeg lastLeg = route.legs().get(route.legs().size() - 1);
LegStep lastStep = lastLeg.steps().get(lastLeg.steps().size() - 1);
StepManeuver finalManeuver = lastStep.maneuver();

- clean-up getDirectionsRouteDestination()
- make more readable
@electrostat electrostat removed the ⚠️ DO NOT MERGE PR should not be merged! label Nov 10, 2017
@electrostat electrostat merged commit 37d2a3d into master Nov 10, 2017
@electrostat electrostat deleted the pg-absolute-distance-to-destionation branch November 10, 2017 21:33
@danesfeder danesfeder mentioned this pull request Nov 13, 2017
9 tasks
Grsmto pushed a commit to Grsmto/mapbox-navigation-android that referenced this pull request Nov 14, 2017
…android into fix-build

* 'master' of https://github.com/mapbox/mapbox-navigation-android:
  Bumped version number to 0.7.0 in readme (mapbox#496)
  Release 0.7.0  (mapbox#497)
  Portrait / landscape layouts are different. Only cast to View (mapbox#494)
  Add missing javadoc for feedback methods in MapboxNavigation (mapbox#493)
  Update lane stylekit and then maneuver bias (mapbox#492)
  Fix bug with bottom sheet behavior null onConfigChange (mapbox#490)
  Fix issue where new route was not being detected (mapbox#478)
  Add telem absolute distance to destination track support (mapbox#427)
  Adjust Instruction Content Layout XML (mapbox#465)
  Fix bug with bottomsheet not hiding in night mode (mapbox#483)
  Cleanup / javadoc (mapbox#479)
  Initialize click listeners after presenter / viewmodel is set (mapbox#481)
  Create SpanUtil and SpanItem to more easily format Strings for our views (mapbox#477)
  Check for null or empty String speechUrl before playing (mapbox#475)
  Update location layer to 0.2.0 and re-add as lifecycle observer (mapbox#473)
  Check for null raw location before setting bearing (mapbox#476)

# Conflicts:
#	libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationMetricsWrapper.java
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