12

I got to program Android from other platforms I used with GPS . on the other platfroms I had access to the GPS HW (I had a low level GPS driver) and by that I could get GPS updates 5 times per second and even more Now I work with Samsung Galaxy S2 (which it is clear to me that its GPS is very strong and can supply several updates per second Currently when I set the GPS provider to supply updates in minimum distance and minimum time like this:

mlocManager.requestLocationUpdates( 
    LocationManager.GPS_PROVIDER, 0, 0, mlocListener
); 

I get 1 update per second (or 800ms as smallest gap between two updates) which is too low for my application. Is there a way to force the GPS HW to report more updates somehow ? I guess it is not exposed to the user but is there still some way to access the registers of the GPS HW somehow ?

Ash Burlaczenko
  • 24,778
  • 15
  • 68
  • 99
user2610687
  • 121
  • 1
  • 1
  • 3
  • I doubt that you can get more than 1hz. Further I doubt that your app cannot work with 1s intervalls, What about interpolating? – AlexWien Jul 24 '13 at 14:51
  • I have another Bluetooth GPS from QStarz which will do 10hz. – user2613743 Jul 24 '13 at 08:28
  • Indeed, interpolating is one solution. I'm trying to track a car location, so 1 second in 100kmh is ~30 meters and I need better granularity. also, I would like to know (if any body knows here) what is the delay of the GPS calculation . I mean, when it reports the location, how much time passed from the point we were on this location. this also needs interpolation to understand where we are now for example. so if that's also in the area of 1 second or half second so we have to interpolate 2 seconds for where we are now and this is really bad for me. – user2610687 Jul 25 '13 at 15:07
  • Have you done your measurements while you were actually moving? If you are going that fast usually the refresh rate of the gps gets a lot better. – Pasquale Anatriello Jan 07 '14 at 16:45
  • @user2610687 To determine the lag in the GPS, allow the GPS To report a static location to a high precision, then take off as quickly and smoothly as you can, using the accelerometer data to calculate where you are accurately as a delta from stop location, and compare with what the GPS says, which should give you a variance from which you could infer a few things, very roughly. Useful to gain some understanding, unlikely to be useful in the real world app without further controls. – FredCooke Jul 09 '16 at 04:45

1 Answers1

4

Currently you can't get updates faster than once per second in most of the phone.This is the hardware gps limit.

Usually in most of the phones,it is at 1hz.

It all depends on hardware and scenario where you are using ( Indoor,Outdoor)

But again, You could check using

LocationRequest setFastestInterval (long millis)

This allows your application to passively acquire locations at a rate faster than it actively acquires locations, saving power.

Unlike setInterval(long), this parameter is exact. Your application will never receive updates faster than this value.

This method sets the fastest rate in milliseconds at which your app can handle location updates. You need to set this rate because other apps also affect the rate at which updates are sent. Location Services sends out updates at the fastest rate that any app requested by calling LocationRequest.setInterval().

If this rate is faster than your app can handle, you may encounter problems with UI flicker or data overflow.

Jambaaz
  • 2,788
  • 1
  • 19
  • 30
  • 2
    could you post a link to the resource where you got the information about the gps hardware limit? – Duncan Dec 07 '17 at 11:27