solfinker Member Licensed User Longtime User Jan 30, 2019 #1 I know we - always? - set GPS.Start(0, 0) in order to have the quickest sampling. What if we change the parameters to (5000, 5) (ms?, meters?) B4X: Public Sub StartGps If gpsStarted = False Then GPS1.Start(500, 5) 'GPSMinTime, GPSMinDistance gpsStarted = True End If End Sub I want to read the location every 5 seconds. Should I resort to a timer? Thank you.
I know we - always? - set GPS.Start(0, 0) in order to have the quickest sampling. What if we change the parameters to (5000, 5) (ms?, meters?) B4X: Public Sub StartGps If gpsStarted = False Then GPS1.Start(500, 5) 'GPSMinTime, GPSMinDistance gpsStarted = True End If End Sub I want to read the location every 5 seconds. Should I resort to a timer? Thank you.
Erel B4X founder Staff member Licensed User Longtime User Jan 30, 2019 #2 Yes. Milliseconds and meters. You can store the last location in the event sub and read it with a timer. This way your program logic will not be affected by the unpredictable events timing. Upvote 0
Yes. Milliseconds and meters. You can store the last location in the event sub and read it with a timer. This way your program logic will not be affected by the unpredictable events timing.
solfinker Member Licensed User Longtime User Jan 30, 2019 #3 Thank you. I have set GPSMinTime, GPSMinDistance to 0,0 and use the Timer as you say - more or less. Upvote 0