Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spinning car #523

Open
vcardillo opened this issue Mar 18, 2016 · 0 comments
Open

Spinning car #523

vcardillo opened this issue Mar 18, 2016 · 0 comments

Comments

@vcardillo
Copy link
Member

For posterity

https://bentonow.slack.com/archives/G0R0STM3R/p1458258709000026

josephlausf [4:51 PM]
ok, so here’s the issue with spinning car

[4:52]
when calculating the bearing, sometimes it would randomly return 0 degrees (edited)

[4:53]
which is why the car has a tendency to spin around to face north (edited)

[4:54]
to fix this, i’m doing this

[4:55]
if ( bearing != 0 || (bearing == 0 && (previousBearing <= 5 || previousBearing >= 355))) {
// animate
}
else {
// skip
}

[4:56]
what i’m doing here is giving 10 degrees worth of leeway

[4:57]
so it’s ok to animate it if it wants to point to 0 degrees, but the radian has to be <= 5

[4:58]
from previous position

[4:58]
this should fix the frequent spinning issue

[5:00]
also, you mentioned the app wasn’t auto updating from prep to delivery. that’s fixed now. i was accidentally untracking right when they load the screen if status != enroute

[5:00]
the app should respond to the other states

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant