Hi, is there any way to assign a value to a “variable” (e.g. #VAR_1#) other than 0 +/- increments?
What I would like to do is:
- capture the latitude/longitude value
- wait n milliseconds
- capture the latitude/longitude value again
- use the haversine formula to calculate distance and/or bearing between position 1 and 2
- [optional] divide distance by n milliseconds to get speed
I have managed to do this is MS PowerApps - the math is quite easy (although the calculation is quite involved!), but what I can’t seem to be able to do is steps 1) and 2) above. Step 3) is easy - it’s just #LAT# or #LNG#.
I have thought about using #VAR_1_T# (The timestamp in milliseconds when VAR_1 was last updated), but all this requires #VAR_1# to be settable to a value other than 0 +/- an increment.
In other programming I have done, you can “set” variables to a desired value (e.g. X=1.3), but that does not seem to be possible in facer…or am I wrong?
Alternatively, is there already a built-in #tag that gets you speed and/or bearing from GPS, thereby obviating all of the above?!
Many thanks,