07-09-2013 10:49 PM
I folowed these instructions to get continous fixes e.g. a path with values
on my 1st test the coordinates never changed they were the same I was doing this on a car. The altitude started as nan the got some vaues that looked ok and went back to nan. I set the rate at 0.5 secs
I read that sattelites take a few mins to get a lock to get something I set it as below to get network positioning so I tried, (restartng so it sticks)
GPS_src->setProperty( "provider", "hybrid" );
GPS_src->setProperty( "canRunInBackground", true );
here I get nothing or I guess the positionUpdated never gets called. So what is the best way to record positioning I need lon/lat/altitude sampled continously. And then generating a KML file (that is the easy stuff)
07-10-2013 10:53 AM
07-11-2013 11:11 AM - edited 07-11-2013 11:17 AM
The altitude being a nan is consistent with a position fix that comes from wifi or cellular network. See this post for more info. And you are right, the gps provider is often slower at getting its first fix than the wifi or cellular providers, so seeing the altitude as nan initially and then getting reasonable values is consistent with this (when you set the provider property to "hybrid").
It's clearly odd that the coordinates are not changing while in a moving car. Somehow you are only picking up the first value (?) Here's full sample code for getting a device's position. It's specific to getting just a cellular network fix every couple of minutes. But if you change NonSatellitePositioningMethods to SatellitePositioningMethods (for gps only) or AllSatellitePositioningMethods (for the best method available-same as setting the provider property to "hybrid"), and set the update interval to 1000 (this is 1 sec, which is the fastest rate you can get) instead of 120000, you should get what you want. Also, you should remove the call to set the fixType property completely.
If you still have trouble getting it working feel free to share more of your code so we can have a look.
07-11-2013 06:52 PM - edited 07-11-2013 06:56 PM
Thanks guys appreciate the feedback ....actually the hybrid did work but it had to try it a couple times, this seems to be a pattern anytime I compile a new version (with something not being there before) most of the time the 1st time it doesn't stick.
But on the GPS side after it started sampling at 0.5 secs interval it did good & I tested my export to KML and see my path on the map almost exactly as I drove it. So no complains there. I'm not sure how this would behave on a non-network area and just sampling from the GPS I'll give that a shot later on.
A bit off tangent here but ideally if I could load the KML to google maps in the BB browser I'd be on my way on this task on iOS/Android I can pull the google maps URL and pass the kml as an arg and it pops my path with the custom Placemarks but on the BB browser is pretty quirky the closes I've got was to display a point but the path never displayed. Sorry 4 the off topic