0

My applcation description: The application will generate the user location everywhere and everyime 24/7. The other app which browse the locations of the user will show him the locations with 1-10 minute spaces(I havn't decided yet) and of course that the location record that will be printed will be the most accurate.

I have tried diffrent type of things but I can't get the most accurate location for a minute for example. Many suggested to send to the requestLocationUpdate a minute as a parameter but then it will generate every minute a location but I want to get the most accurate location in that minute so I guess I will have too generate all of that minute locations and choose the most accurate.

I came across many errors such as getting a city level location which is pretty bad(You have been in xx:xx at new york city.. I'm not looking for that). There are many considerations such as battery safe and accuracy. I'm agree to compromise about the amount of locations (means print every 10 minute the user location instead of 1 minute).

Anyway I'm so confused, if someone got a plan (not code level) how to manage that system I would like to hear.

Imri Persiado
  • 1,857
  • 8
  • 29
  • 45

1 Answers1

1

The GPS location provider should give you precision of meters if you are in open air. If you take samples every minute with requestLocationUpdate, that should be enough.

It is not possible to "get N samples in a given time interval and keep only the most accurate one", you should do that calculation keeping a buffer of positions if you need that. In any case, I don't think it is worth the effort in this kind of applications.

The battery life is going to be a problem if you want a mobile device to last more than 4-6 hours with the GPS + internet connection active.

Guido
  • 46,642
  • 28
  • 120
  • 174
  • You convinced me, in open air generating 1 location in 1 minute is fine but what to do when the phone would be indoor? maybe I need to find the last accurate location that my gps provider supplied? – Imri Persiado Jan 12 '13 at 20:55
  • 1
    Yes, it depends on the application you are developing, but when the device is indoors you can stop the gps provider (to save battery) and assume the last gps position is good enough. There are other ways to do indoors positioning based on accelerometers/gyroscopes (see http://stackoverflow.com/questions/7499959/indoor-positioning-system-based-on-gyroscope-and-accelerometer) but it is not easy in my opinion and it also consumes lots of battery. What I don't know is how to detect that the user is outdoors again. – Guido Jan 13 '13 at 12:13
  • But how can I know when the phone is indoor? – Imri Persiado Jan 13 '13 at 13:05
  • Sorry for double comment, but maybe if gps provider is generating nothing(means indoor) then I use the network provider? – Imri Persiado Jan 13 '13 at 17:44