holy moly this is awesome!
@jpascuet A distance column will calculate the distance from a userās current location to a specified location without any user interaction, but that is only on the userās device. The distance is not stored in the database on the server. While I was able to figure out a way to get the live coordinates for the user in this case, the current location and distance is calculated only on the userās device and the active location is also not stored in the database for otherās to view. No, I donāt believe this app does any sort of location calculations when the app is in the background.
@Nanda_Munisamy No, I donāt feel comfortable sharing how I got this to work. This would go against Glideās purpose of requiring the use of the Location Component to acquire a userās location with their consent. I donāt intend for this to be a workaround to expose a personās location without their consent. Itās also a very complex workaround to get it to work correctly. Itās also not always accurate, even though Iāve been able to improve that quite a bit. Also, it sometimes just stops working for me, which requires a restart of the app.
As a land surveyor, i approve this
Back to b-tech calculations!
If you still working on this a bit of an advice
- pick that 3 location, that you always stay within the area of the triangle
- never use a short straight line
It was a fun challenge and I had it pretty accurate and able to dynamically move the 3 points, so the tri-lateration always kept up and I always had an accurate location because I would always be within the 3 points. The only problem is, I think glide has a bug somewhere where javascript crashes and canāt recover, so the app would halfway stop responding after a few minutes. I had put Try Catches in the code, but there would still be a hard crash somewhere.
Now, the newer Location component in glide will dynamically track your live location, so my code isnāt really needed anymore. Iāve since created a new version that uses the new Glide Apps. Itās a lot simpler and more stable. I also have it calculating a bearing from target to destination and Iām close to having it accurately calculate live speed and compass bearing of the user. Some Glide limitations are getting in the way, but I think I have an idea to get past that.
If I use this for anything, it will be geocaching, but other than that, itās just a fun project to see what I can do with complex math.
I believe this needs to be updated to the docs, this is a big update.
Is there a tutorial video on how to use this? @ThinhDinh / @Jeff_Hager
I donāt have a video on how I set any of this up. To be honest, it hasnāt been very reliable and occasionally crashes, at least for the stuff I was doing.
My original version did a lot of trigonometry to calculate a live location, but it was not something that would be updated on the database. All of that math became unnecessary with New Apps, because the location component updates the location continuously.
At the most basic level you could add a location component and have it write to a column in the table. As long as the switch is on, it should continuously update with your current location. However, I havenāt verified, but I think this can eat through updates very quickly because you would be continuously updating a column value every few seconds.
This was just a project to see if I could do it. It was not meant to be something that would be used in a normal production environment.
Here is documentation on how to use the Location Component.