Page 1 of 1

How to calculate distance

Posted: 17 May 2013 18:04
by pilusona
Hi,
How to calculate distance between two locations? I can calculate the distance of two Locations using distance function. But the thing is that it takes two Location objects, one of them can be found using InitVariableLocation but the other one?

Thanks and regards,

Re: How to calculate distance

Posted: 21 May 2013 14:05
by plm
I include a flow that does the job...
keep in mind, however, that it is only a "proof of concept": needs to be (higly) improved by adding, for example, error handling, lack of connection, the inability to calculate a position, etc.. I hope this can be helpful to develop your own flow, better organized and more efficient. You can test it inside Automagic or creating a Toggle Widget that toggle a global variable called global_distance
Best.

Re: How to calculate distance

Posted: 23 May 2013 19:06
by pilusona
Hi plm,

Thanks for your reply. I have not used your flow instead I have downloaded the XML and taken the logic from your flow, and it is working perfectly.

Thanks and regards,
pilusona

Re: How to calculate distance

Posted: 23 May 2013 19:22
by plm
pilusona wrote:Hi plm,

Thanks for your reply. I have not used your flow instead I have downloaded the XML and taken the logic from your flow, and it is working perfectly.

Thanks and regards,
pilusona
Thank you, very kind. You have done well, the flow was not written as "running release" but just to show the logic (one of those possible) with which to achieve the purpose.
Best regards.