Skip to content

Add telem absolute distance to destination track support - #427

Merged
electrostat merged 6 commits into
masterfrom
pg-absolute-distance-to-destionation
Nov 10, 2017
Merged

electrostat merged 6 commits into
masterfrom
pg-absolute-distance-to-destionation

Conversation

@Guardiola31337

@Guardiola31337 Guardiola31337 commented Oct 27, 2017 •

Copy link
Copy Markdown
Contributor
  • 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

@danesfeder danesfeder left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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 done
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