Computed speed

Karel Kozlik 6 years ago

Hello,
thanks for this fantastic project! But I have a question: Is it possible to calculate speed server side? My devices does not report the speed. So I am thinking of using computed attribute to calculate it. Just from current position, previous position and time delta. Is it possible? And if so how can I access the previous position and time delta in the expression of computed attributes? The doc mentions only latitude and longitude primitive objects which as I understand is current position.

If computed attributes cannot be used for this can you propose different solution please?

Well I have read somewhere on this forum that speed attribute cannot be changed. But it is perfectly fine for me to store the calculated speed into different named attribute. Also a rough accuracy is fine for me.

thanks much for any help
Karel

Anton Tananaev 6 years ago

You cannot use computed attributes to access previous position. You would have to modify the code.

yuzz_pol 9 months ago

Hi Anton! I'm having the same problem: some devices aren't sharing speed data. Is there a computed attribute to calculate this? Or do you know of another method?
Thanks a lot!!!

Anton Tananaev 9 months ago

In newer versions it's possible to get last location, so you could probably calculate it using computed attributes.

yuzz_pol 9 months ago

Thanks! I'm going to look for documentation on the topic. When I figure it out, I'll post the calculated attribute on this forum so it can serve as a reference. Thanks again!