GPS distance interval

Skip to first unread message
Assigned to by me

Mar 4, 2014, 9:05:07 PM3/4/14
I am working on a prototype tracking app using the gps location sensor. This works fine when the time interval is used firing off right around the intervals expected. However when I remove the time interval to distance intervals of 1600 meters the sensor begins to fire off it's locations every 16 to 23 meters. Or within a 15 minute period 547 times. When I adjust the distance interval up or down the sensor still fires every 16 to 23 meters. I have had it as high as 106,000 meters and as lol as 10 meters does not makes any difference. It works near to perfection with the time interval only but not with only the distance interval. When used together it follows the time. I tried this on several devices with the same results.

Am I misusing the distance interval on the location sensor?


Mar 4, 2014, 10:45:14 PM3/4/14
No.  The issue is, the gps in the phones is not very accurate. Usually, the gps 'fires' based on time but you can also have it 'fire' based on distance.  I can see application of mixing the two, but then you might get results like what you see.  

The Location sensor has a function  called "DistanceInterval to"    ...the units are in meters.  Another feature is one called "TimeInterval" - it sets the frequency the gps triggers an event.      These controls trigger the gps to attempt to determine its position.  So, you can use time interval, the interval that is usually the default is 60000 ms ( one  minute) or you can request the device to trigger at a set interval... actually both can be working simultaneously.   I believe if you want to work only on the basis of distance you may have to set the interval to a large value.  I do not know whether distance interval can be controlled on every gps, however, the time interval probably can be controlled.

1) the gps in most phones is not precisely accurate, +/- 50 feet on average, perhaps as good as 5 feet on occasion.
2) phones do also use other information to determine location.  It is not as accurate as the gps.
3) the gps receivers in phones are not very sensitive.  They lose signals in buildings and are difficult in an urban environment.  Buildings obscure their line of sight to the positional satellites.
4) not all phones have a gps.  Those phones that do not have much reduced positional accuracy compared to those that have a gps.
4) there is an option in the location sensor to determine proximity to a destination.  My experiments indicate it is not very accurate. +/- 50 feet reliable might be possible on a regular basis.

The following describes what the sensors in AI2 can (and cannot) do:   Sensor Controls    Some of the functions they control are not available on all devices, so if a function does not seem to work, the Android version in use or the device might not have the capability.

Ten meter sampling of a location does not seem practical.  A phone gps might only be able to resolve +/- 50 meters.  See for your self, use the Location.Sensor.Accuracy block   and sample it every minute and see what you get?  Perhaps sample every 50 meters.  .

Another issue is the frequency the gps will update the location.   I think the default is 60 seconds; it can be reset, however, the simple gps receivers in phones take a bit to stabilize.  There is no guarantee that after someone traverses 10 meters, the gps will update

Is this the type of info you are interested in?

Best of luck,

Reply all
Reply to author
0 new messages