Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
nunonobre
Posts: 64
Registered: ‎09-21-2011
My Device: Curve & 8520

GPS Bugs

Hi all,

 

I'am using the LocationListener to implement a class that obtains Locations. I' am using the following Criteria:

 

            criteria = new Criteria();
            criteria.setHorizontalAccuracy(VariablesUtil.GPS_MIN_ACCURACY);
            criteria.setVerticalAccuracy(VariablesUtil.GPS_MIN_ACCURACY);
            criteria.setAltitudeRequired(true);
            criteria.setSpeedAndCourseRequired(true);
            criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);

 

At most part of the time all Locations got it are correct, but sometimes I obtain some strange Locations out of my area: for example I obtain positions from places where I have never been (although the locations are not too far from the place I am - something like 20km). I'am using a blackberry curve 9300 with Blackberry OS 6.

 

Best regards,

 

 Nuno Nobre

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: GPS Bugs

min accuracy seems to be not that accurate, then.
you'll have to filter locations that are unreasonable, most likely.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Regular Contributor
nunonobre
Posts: 64
Registered: ‎09-21-2011
My Device: Curve & 8520

Re: GPS Bugs

So, but  should'nt  GPS API returns good Locations? Because I put the accuracy to 50 meters, but once in a while I received Locations that are 20km far from my place (I am running my application in background)

 

If I use BlackberryCriteria and Automonus Moded, Will I obtain more accurate results?

 

Best regards,

 

 Nuno Nobre

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: GPS Bugs

some extreme locations can always happen, be it by reflections or other means.
using a higher accuracy in the arguments should help, at least that is it's intended use.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: GPS Bugs

I have to agree with Simon here: in my experience you will get an occasional location that is way out in left field. You need to apply some filtering logic that says "discard the really bad samples".

 

This happens also in Autonomous mode.