Speed of location property

Dear,

I try to use the speed variable from the location property. Nevertheless, I get always 0 when I am moving.

Here is the function:

image

Any help will be appreciated. Regards

Hi @infosmartmobilityccj ,

Would the accelerometer or the gyroscope be a better choice for you?

What are you trying to get the speed of?

1 Like

Hi,

I would like to display the speed of the mobile phone. Regards

Have you checked to see if there’s anything in the green ‘error’ block? That might be informative.

This works for me:

https://x.thunkable.com/copy/4ff39af9d614b63eb61673589fc2b20f

The key is that if you call GetCurrentLocation too frequently, it doesn’t have time to load the values. I found that a 0.5 second delay worked well and that I could go down to as little as 0.3 seconds.

1 Like

I think you might have more luck with the accelerometer, though:

https://x.thunkable.com/copy/c752bf5867b0b9770829b5ab30e9de29

I’m kind of wondering what the intended purpose of the Location Sensor’s speed property is…