Google Maps and the Location Sensor (running simultaneously to achieve better Accuracy)

Hello all,

I cannot find much on the internet about this but I noticed and interesting phenomenon.

In my Inventor App if I ONLY use code blocks to move an updating marker on a map to the current Latitude and Longitude on the map and notice the accuracy isn't that great regardless of update intervals of time or distance. I would say in some cases off by 30 meters especially while moving in car.

While the aforementioned Inventor App is running AND I have the Google Maps app in the process to navigating to any destination I notice the updating marker location accuracy in the MIT Inventor app is SIGNIFICANTLY more accurate, down to approximately 1 meter.

  1. Why do I observe this behavior?

  2. Is it possible to always have Google Maps running in the background and making these updates?

  3. How can one achieve the same level of detail and update intervals as Google Maps in their MIT Inventor app?

Thanks ahead for the feedback.

With regards to App Inventor and the LocationSensor, have you read this?

Google Maps makes use of all the satellite constellations your device is capable of using; the MIT location sensor only uses the original GPS constellations when achieving a satellite fix. Using more satellites increases Accuracy (see the link). 1 meter? Highly unlikely as the hardware in most, if not all cell phones, is incapable of a position resolution of 2 meters at best. Don't use AI to create a self driving car. :wink:

One way is to LockProvider to gps and set TImeInterval at something other than the default setting which is 60000 ms (one minute) while using the MIT LocationSensor.

Another way is to use a Location extension that can make use of all the available satellite constellations your phone is capable of. There are at least two I am aware of.

There are other sophisticated ways that involve complex algorithms to improve Accuracy if you program in Java or other languages which can make use of these algorithms (as does Google Maps). These libraries are not accessible using AI but Java can.

Search for community discussions highlighted with the word LocationSensor and/or Map to read more about how users can improve quality of their AI location/gps apps. There are dozens of these discussions.

Simultaneously running Google Maps and an App Inventor gps app? Didn't know that was possible. It appears App Inventor is hitching a ride on the location determined by Google Maps and it affects the location values AI 'sees'. Will have to see if I can reproduce that :cry: sometime.

1 Like

I will provide a proper response when I get back to my home computer.

My guestimate of 1m was purely based on eyeballing the moving map marker of my MIT Inventor app. Thanks for clarifying I forgot to mention that that number was not based on any sort of data callbacks I was reading.

Since my initial post I have reproduced the aforementioned behavior any time I open Google Maps, set a destination in Google Maps, then open my MIT Inventor App which has has a moving marker based on location updates. As soon as I terminate Google Maps navigation the accuracy returns to the undesired variations in my MIT Inventor app.

Thank you for the detailed feed back.

I have verified over the past few days that in fact yes, every time you are navigating to a destination in Google Maps the MIT Inventor app is far more accurate. I have yet to discern why.

Do you mean that when you run Google Maps in the background and then run your App Inventor app, the App Inventor app provides more precision than if Google Map is not running.

I expect when you run Google Map you see the gps icon and when you run your app (which you have not shared) it is running as a fused Provider. Running Google Map probably forces your device gps to use the gps Provider.

Have you tried ' to LockProvider to gps and set TImeInterval at something other than the default setting which is 60000 ms (one minute) while using the MIT LocationSensor.' to improve the precision of App Inventor.

??? I don't know exactly why. My previous comments describe a very good guess as to why. You realize, you have never provided an example comparing the 'difference' or showing your AI code You can improve the LocationSensor precision by working with the Provider setting.

Perhaps this could help