mapbox / mapbox/mapbox-navigation-ios

Reimplement RouteProgress based on navigator status

Open
#2,457 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

op-ex topic: location
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

MapboxNavigationNative provides route progress statistics, but RouteController mostly ignores it in favor of the calculations in RouteProgress. At some point, we may want to migrate over to MapboxNavigationNative’s calculations for consistency.

MapboxNavigationNative ensure a consistent Earth radius or distance formula between MapboxNavigationNative and Valhalla. Currently, Core Navigation calculates and aggregates route progress statistics purely from the fields coming from the Directions API, which ensures consistency with the API whether the endpoint happens to be powered by Valhalla or OSRM (which may use different constants). Differences in Earth radius and distance formula have bitten us in the past, and there’s still some inconsistency on the client side: mapbox/turf-swift#26. Migrating to MapboxNavigationNative for this purpose will be a bit sad because RouteProgress is such a showcase for Swift functional programming – especially compared to the C++ that would replace it under the hood.

/cc @mapbox/navigation-ios

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading RouteController and RouteProgress, then compare their current calculations with the route progress statistics provided by MapboxNavigationNative. Review the consistency concerns involving the Directions API, Valhalla, OSRM, and turf-swift#26. Done means RouteProgress is reimplemented around navigator status with consistent progress calculations.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.