Inconsistent GPS data

Hi everyone!
Sorry if this has been posted before. I've looked at the forum for a while and gone through the Location Sensor tutorial twice but still havent found an answer to my question.

I'm finding some inconsistent performance of using the Location Sensor to get GPS data. Just using the Location Sensor accuracy tutorial right now, sometimes I get regular GPS data and other times I get none or very little like, 1 successful download of GPS data every 10 minutes or so.

I'm just wondering at this stage if there is any known cause for getting such low success at retrieving GPS while other times it works really well?

Thanks
DigiTeacher01

Purtroppo la ricezione del GPS varia tenendo in considerazione tantissime variabili..come il luogo al chiuso oppure la presenza di ostacoli come palazzi.

Buongiorno! Thanks for the reply.

Based on your reply I'll do some more testing. Currently I've had some issues when outside too but will do some more comprehensive testing.

I'm wondering why other map apps or any GPS apps don't seem to have the same problem? It's not a swipe at AI2 just wanting to broaden my own knowledge.

DigiTeacher01 :grin:

Welcome Tim.

Now that you re-read Using the Location Sensor and LocationSensor can you imagine the possible reasons for the performance you see in your app?

Nicola provided you with a partial answer. Good guesses, to get a better understanding we need to know whether you are testing outside or in a building away from windows and to see your actual code. The gps receiver uses radio signals from the gps satellites; buildings, rain, wet tree leaves, a mountain range or buildings in the path between available satellites attenuates the signal strength.

The 'performance' you get depends on how you program the gps receiver to display data. You did not share your Blocks so we can only speculate. What does "1 successful download of GPS data every 10 minutes or so." mean to you? The gps receiver only updates data using the LocationSensor component when the LocationSensor.LocationChanged event fires/occurs. If the TimeInterval is set faster than about 20000 ms (20 seconds or so) the gps receiver might not be having sufficient time for it to determine where it is located. The gps receiver is not getting a satellite fix or the location is not changing.

App Inventor apps do not natively run in the background. When your app goes to sleep, it stops reporting/logging and posting the received data. When the app wakes up, it continues to post data. The data the gps receiver hears when the app is asleep will not post.

Show your Blocks here. Please provide a more detailed description of what you see happening and what you think should happen and someone could possibly answer "why other map apps or any GPS apps don't seem to have the same problem". What apps don't have the 'same problem'? What apps are these?

My App Inventor gps apps run fine. :slight_smile: You should be able to get your app to work as you expect too.

1 Like