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

Native Development

Reply
Developer
Posts: 23
Registered: ‎05-29-2012
My Device: PlayBook
My Carrier: NA
Accepted Solution

What's a good way to determine GPS validity with BPS?

Hi,

 

I'm using BPS for a native app on the Playbook. There are a lot of functions to call to get information on geolocation events which is great. But I'm looking to distill the available information into something that would tell me whether or not the position (lon,lat at least) is suitable to use in my application... ie whether or not I have a 'GPS fix'. You can check the invididual validity for a lot of parameters (altitude, heading, speed, etc)... but nothing that tells you if lon and lat are valid.

 

Does anyone have any advice as to how I can extract a true/false 'gpsIsValid' from  the available data?

 

ref;

http://developer.blackberry.com/native/reference/playbook/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.li...

Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: What's a good way to determine GPS validity with BPS?

If you get a reading at all, it should be "valid" in that sense that it came from data calculated based on the used satellites.

What you need to do is decide "how valid" it is, which is up to you: https://developer.blackberry.com/native/reference/playbook/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.l...

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!