CUTR-at-USF / OpenTripPlanner-for-Android

An Android app for multi-modal trip planning and navigation using any OpenTripPlanner server.
Other
130 stars 91 forks source link

With new Play Services, real-time bearing is inaccurate/slow-to-update #453

Open vreixo opened 9 years ago

vreixo commented 9 years ago

With new play services version, at least on android l preview, my location point introduces an arrow signaling device's orientation.

This arrow updates it's bearing really slow, only updating every few seconds, so it's very confusing. Would be good to improve this behavior.

barbeau commented 9 years ago

@vreixo I believe that the bearing of the real-time location marker is controlled by the GPS (or other location source) bearing, not the accelerometer/gyroscope. I'm ok with this as-is, since its behavior that goes back a while in Android, and the behavior is consistent across all apps. But, if we want to improve it, I'd be open to that as well. I'd just want to be sure that our solution looks similar to the Maps API real-time marker (which looks good now, and reflects Material design).

Related - I've created a view that draws an arrow that points towards a provided location (actually a bus stop, for OneBusAway Android), which can be seen here.

This makes use of an OrientationHelper utility class that handles real-time sensor data.

Both these could be re-used, to some extent, for this feature.

vreixo commented 9 years ago

@barbeau I had thought that this would be the same as the one in Google maps app, which now does move on gyroscope/accelerometer, although in my device is not very precise. But I was wrong, this only happens with Google Maps app which is using something different, exploring other apps it's clear that this is not from accelerometer/gyroscope.

It seems that other projects are also using similar features like CityMapper and Trafi.

That arrow pointing to first stop looks very interesting, and might be a good option for the future to add it, pointing to first transit stop of the trip, before trip starts.

El 29/9/2014 16:21, "Sean Barbeau" notifications@github.com escribió:

@vreixo https://github.com/vreixo I believe that the bearing of the real-time location marker is controlled by the GPS (or other location source) bearing, not the accelerometer/gyroscope. I'm ok with this as-is, since its behavior that goes back a while in Android, and the behavior is consistent across all apps. But, if we want to improve it, I'd be open to that as well. I'd just want to be sure that our solution looks similar to the Maps API real-time marker (which looks good now, and reflects Material design).

Related - I've created a view that draws an arrow that points towards a provided location (actually a bus stop, for OneBusAway Android), which can be seen here https://github.com/CUTR-at-USF/onebusaway-android/blob/issue155-UIredesign/onebusaway-android/src/main/java/com/joulespersecond/view/ArrowView.java .

This makes use of an OrientationHelper https://github.com/CUTR-at-USF/onebusaway-android/blob/issue155-UIredesign/onebusaway-android/src/main/java/com/joulespersecond/seattlebusbot/util/OrientationHelper.java utility class that handles real-time sensor data.

Both these could be re-used, to some extent, for this feature.

— Reply to this email directly or view it on GitHub https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/453#issuecomment-57167714 .