0

I'm building an app where I need very good accuracy. The app is calculating trip in the car for the companies I work with.

I came to the point where it counts just like a odometer in a car, but my problem is tunnels. I was thinking that in each city I will create zone on start of the tunnels and end of the tunnels where it will ignore location and just after leaving the tunnel it will adds up the kilometres from database depending on how long the tunnel is. Because sometimes when entering the tunnel in very few cases the location goes back and forward and it adds 800meters+ and this is problem. Image

But my solution to this problem seems very complicated. Is there easier solution for getting locations in tunnel and prevent that what happened on the image?

Michal
  • 3
  • 3
  • Who would tell your Android phone its location when the phone is in a tunnel? What do you have in mind? – blackapps Jul 27 '22 at 18:18
  • 1
    You're not going to get good accuracy in tunnels, or in downtown areas. Regularly in Manhattan my GPS will be off by a block or two (think I'm on 56th St when I'm on 54th). Its a limitation of how GPS satellites work. If you accurately need distance, you should look at integrating with the onboard computer of modern cars. – Gabe Sechan Jul 27 '22 at 18:19
  • 2
    Also, you need to rethink how you deal with location i general. You don't get an exact location from a provider. You get a probability field. You get a center point and a redius. There is a 67% chance you're within that radius . That means there's a 33% chance you're not in it. Most of that 33% chance is just a meter or two over the line, but that does mean a small chance of being *very* wrong. Which frequently will show up by seeing a sudden jump to a far away point, then a jump back later. You have to account for things like that at the app level. – Gabe Sechan Jul 27 '22 at 18:22
  • well...okay, so my solution with creating areas before tunnel where it will ignore all locations and after tunnel where it will start getting locations again.. creating database of these tunnels location with their lenght (there are few in my city)... and after it will start getting locations and just calculate the distance from start to end .... is not that wrong. – Michal Jul 27 '22 at 19:12
  • I know Waze is somehow using bluethooth in tunnels... it will just ask you to turn on bluethooth for case u will be in tunnel and for them it works... so i thought there is someway to do it. – Michal Jul 27 '22 at 19:14
  • If a tunnel has bluetooth beacons throughout AND you know where each beacon is and can match a signal to a beacon, that works. But you'd need physical infrastructure and pretty much Google's scale to do it effectively. – Gabe Sechan Jul 27 '22 at 19:44

0 Answers0