heremaps / here-android-sdk-examples

Java-based projects using the HERE SDK for Android.
Apache License 2.0
145 stars 191 forks source link

OnPositionChangedListener send a wrong speed while guidance when user moved map. #361

Open JustTrust opened 4 years ago

JustTrust commented 4 years ago

OnPositionChangedListener send a wrong speed while guidance when user moved map. Here is a code with logs:

        override fun onPositionUpdated(
            method: LocationMethod?,
            position: GeoPosition?,
            isMapMatched: Boolean
        ) {
            logD("onPositionUpdated, speed = ${position?.speed}, isMapMatched = $isMapMatched")
            onPositionUpdated(position)
        }

When guidance by a route is active everything is fine and speed is showing right value = 58.27000045776367

When user starts moving map by finger value of current speed is changing to some strange values

2020-04-15 15:12:20.302 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:20.564 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:20.565 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:20.575 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:20.955 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:20.956 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:20.957 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:24.335 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:24.356 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:24.358 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:24.599 D: onPositionUpdated, speed = 0.0, isMapMatched = true
2020-04-15 15:12:24.861 D: onPositionUpdated, speed = 0.0, isMapMatched = true
2020-04-15 15:12:25.145 D: onPositionUpdated, speed = 48.33000183105469, isMapMatched = true
2020-04-15 15:12:25.400 D: onPositionUpdated, speed = 48.33000183105469, isMapMatched = true
2020-04-15 15:12:26.188 D: onPositionUpdated, speed = 29.729999542236328, isMapMatched = true
2020-04-15 15:12:26.467 D: onPositionUpdated, speed = 29.729999542236328, isMapMatched = true
2020-04-15 15:12:26.717 D: onPositionUpdated, speed = 23.469999313354492, isMapMatched = true
2020-04-15 15:12:27.819 D: onPositionUpdated, speed = 29.600000381469727, isMapMatched = true
2020-04-15 15:12:28.047 D: onPositionUpdated, speed = 29.600000381469727, isMapMatched = true
2020-04-15 15:12:28.340 D: onPositionUpdated, speed = 29.600000381469727, isMapMatched = true
2020-04-15 15:12:28.607 D: onPositionUpdated, speed = 29.6200008392334, isMapMatched = true
2020-04-15 15:12:28.836 D: onPositionUpdated, speed = 29.6200008392334, isMapMatched = true
2020-04-15 15:12:29.091 D: onPositionUpdated, speed = 29.6200008392334, isMapMatched = true
2020-04-15 15:12:29.381 D: onPositionUpdated, speed = 29.6200008392334, isMapMatched = true
2020-04-15 15:12:29.646 D: onPositionUpdated, speed = 24.049999237060547, isMapMatched = true
2020-04-15 15:12:30.670 D: onPositionUpdated, speed = 28.989999771118164, isMapMatched = true
2020-04-15 15:12:30.916 D: onPositionUpdated, speed = 28.989999771118164, isMapMatched = true
2020-04-15 15:12:31.208 D: onPositionUpdated, speed = 28.989999771118164, isMapMatched = true
2020-04-15 15:12:31.445 D: onPositionUpdated, speed = 28.989999771118164, isMapMatched = true
2020-04-15 15:12:31.709 D: onPositionUpdated, speed = 29.270000457763672, isMapMatched = true
2020-04-15 15:12:32.019 D: onPositionUpdated, speed = 23.90999984741211, isMapMatched = true
2020-04-15 15:12:32.539 D: onPositionUpdated, speed = 29.479999542236328, isMapMatched = true
2020-04-15 15:12:32.814 D: onPositionUpdated, speed = 23.579999923706055, isMapMatched = true
2020-04-15 15:12:33.722 D: onPositionUpdated, speed = 29.739999771118164, isMapMatched = true
2020-04-15 15:12:34.006 D: onPositionUpdated, speed = 29.739999771118164, isMapMatched = true
2020-04-15 15:12:34.225 D: onPositionUpdated, speed = 29.739999771118164, isMapMatched = true
2020-04-15 15:12:34.453 D: onPositionUpdated, speed = 29.739999771118164, isMapMatched = true
2020-04-15 15:12:34.691 D: onPositionUpdated, speed = 29.690000534057617, isMapMatched = true
2020-04-15 15:12:34.986 D: onPositionUpdated, speed = 22.780000686645508, isMapMatched = true
2020-04-15 15:12:36.028 D: onPositionUpdated, speed = 30.790000915527344, isMapMatched = true
2020-04-15 15:12:36.297 D: onPositionUpdated, speed = 30.790000915527344, isMapMatched = true
2020-04-15 15:12:36.565 D: onPositionUpdated, speed = 30.790000915527344, isMapMatched = true
2020-04-15 15:12:36.872 D: onPositionUpdated, speed = 30.790000915527344, isMapMatched = true
2020-04-15 15:12:37.114 D: onPositionUpdated, speed = 30.549999237060547, isMapMatched = true
2020-04-15 15:12:37.376 D: onPositionUpdated, speed = 23.239999771118164, isMapMatched = true
2020-04-15 15:12:38.444 D: onPositionUpdated, speed = 29.8799991607666, isMapMatched = true
2020-04-15 15:12:38.707 D: onPositionUpdated, speed = 22.229999542236328, isMapMatched = true
2020-04-15 15:12:39.706 D: onPositionUpdated, speed = 0.0, isMapMatched = true
2020-04-15 15:12:40.163 D: onPositionUpdated, speed = 23.389999389648438, isMapMatched = true
2020-04-15 15:12:40.804 D: onPositionUpdated, speed = 23.440000534057617, isMapMatched = true
2020-04-15 15:12:41.788 D: onPositionUpdated, speed = 0.0, isMapMatched = true
2020-04-15 15:12:41.998 D: onPositionUpdated, speed = 0.0, isMapMatched = true
2020-04-15 15:12:42.989 D: onPositionUpdated, speed = 6.010000228881836, isMapMatched = true
2020-04-15 15:12:43.272 D: onPositionUpdated, speed = 23.780000686645508, isMapMatched = true
2020-04-15 15:12:44.267 D: onPositionUpdated, speed = 29.520000457763672, isMapMatched = true
2020-04-15 15:12:44.281 D: onPositionUpdated, speed = 29.520000457763672, isMapMatched = true
2020-04-15 15:12:44.537 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:44.558 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true
2020-04-15 15:12:44.559 D: onPositionUpdated, speed = 58.27000045776367, isMapMatched = true

When map is returned to current user position speed return to normal. Tested with android emulator, android 9

NazarKacharaba commented 4 years ago

Hi @JustTrust Does it happen all the time? Is it specific to the the map area, tracking mode, route? If so, provide such details, please. Thanks

JustTrust commented 4 years ago

Hi @NazarKacharaba! Yes it happens all the time and not depend from route. Most of routes was created in USA. The only thing the route was created for truck.

Merlin1stHere commented 4 years ago

@JustTrust Unfortunately, I'm not able to reproduce this issue. Which version of the SDK did you use? Did you use simulation or real navigation? If you used real navigation, can you share with us the GPX log collected when this bug occurred? Could you reproduce it with using our sample (advanced-navigation)?