Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

User location tracking is rough #1041

Description

@1ec5

User location tracking for is functional #756 but rough compared to MapKit’s implementation. In MapKit, the user dot crawls continuously and the map pans just as smoothly. Our implementation jerks forward every time the GPS location changes. Since the panning motion is animated, the map always trails the user dot. Instead, perhaps it could lead the user dot, by overshooting it based on its n previous coordinates.

Activity

  1. added
    iOS
    performance
    on Mar 21, 2015
  2. 1ec5 commented on Apr 3, 2015

    @1ec5
    ContributorAuthor

    Looks like -[CLLocation speed] and -[CLLocation course] will be of use here.

  3. mikemorris commented on Apr 3, 2015

    @mikemorris
    Contributor
  4. mikemorris commented on Apr 3, 2015

    @mikemorris
    Contributor

    There are two different ways to implement this:

    • "dead reckoning"
      • Optimistically assume that an entity will continue traveling on it's current trajectory and velocity, retroactively correcting as necessary.
      • This works well for bullets, does not work well for less predictable actions like player movement (can cause "lag skipping" all over the screen in high latency conditions).
    • "entity interpolation"
      • Interpolate an object, animating it from a less recently known location to a more recently known location.
      • This can introduce slight player latency, but is configurable for smoothness versus accuracy and generally results in smoother, more predictable animation.
  5. incanus commented on Apr 10, 2015

    @incanus
    Contributor

    Interpolate an object, animating it from a less recently known location to a more recently known location.

    We can do this pretty easily as the user dot is a native iOS view. We do an atomic position update that could just use implicit layer animation.

  6. added a commit that references this issue on May 17, 2015
  7. 1ec5 commented on May 18, 2015

    @1ec5
    ContributorAuthor

    MapKit apparently uses entity interpolation, or at least a crude version. In the iOS Simulator, switch from City Run to City Bicycle Ride (for instance) and note how the user dot animates back to the Infinite Loop 1 entrance without skipping any steps. In dfd563a, I used UIView block-based animation to accomplish pretty much the same thing for the non-tracking case.

  8. self-assigned this
    on May 18, 2015
  9. incanus commented on Aug 28, 2015

    @incanus
    Contributor

    Using map.userTrackingMode = .FollowWithCourse is much more stable here and applicable to navigation-type apps.

  10. 1ec5 commented on Aug 28, 2015

    @1ec5
    ContributorAuthor

    No, .FollowWithCourse will have the same behavior described here.

  11. picciano commented on Sep 9, 2015

    @picciano

    Any thoughts on scheduling this into a milestone?

  12. muZZkat commented on Oct 16, 2015

    @muZZkat
    Contributor

    In Map kit, the user location view is fixed on the screen and the map moves under it, This is not really related to any entity interpolation of the current users location.

  13. 1ec5 commented on Oct 16, 2015

    @1ec5
    ContributorAuthor

    @muZZkat, the behavior you describe would still require entry interpolation or dead reckoning, except only to pan the map smoothly, rather than move the user dot (thus causing the map to pan), as #1582 does.

  14. 7 remaining items

  15. 1ec5 commented on Jan 20, 2016

    @1ec5
    ContributorAuthor

    Next steps are in #1582, which is about smoothly moving the user dot outside of user tracking mode.

  16. added a commit that references this issue on Jan 20, 2016
  17. modified the milestones: ios-v3.3.0, ios-v3.2.0 on Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

iOSperformance

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions