Keep old bearing value if new one is not available#10
Conversation
By not resetting the bearing value when a new one is not available (e.g. the car is stationary so we can't calculate the bearing based on the location difference), we can avoid annoying map rotation in navigation apps like Waze or Yanosik in stop-and-go traffic.
|
There will always be a bearing - there's no case in which we stop sending it - so that case won't ever get invoked. Since speed and bearing are calculated directly from GPS, and GPS has jitter - even more so due to being processed by javascript which has no timing guarantees, they'll always be somewhat unreliable. It's the limitations of the hardware/browser. Waze will spin around sometimes at 30mph.. It seems to get its predictions of where you're going next wrong. I'm not sure it even uses the bearing in that case - before that existed waze worked more or less the same way. |
Ok, I was under impression that if the car is stationary then heading and speed is not being sent to the RPi. |
|
It won't be zero because jitter in the GPS reading means you'll always have sometihng.. it gets increasingly innacurate at slower speeds becauase of this. I still don't think waze uses that value - just stop sending it and you'll find it behaves exactly as before. It only even uses speed as a visual display.. we used to just send GPS coordinate and waze worked. |
cda860e to
a842116
Compare
8cc021f to
2b11d54
Compare
04bf1e5 to
645c47d
Compare
By not resetting the bearing value when a new one is not available (e.g. the car is stationary so we can't calculate the bearing based on the location difference), we can avoid annoying map rotation in navigation apps like Waze or Yanosik in stop-and-go traffic.