Is there a way to get my current position (latitudes and longitudes, preferably in decimal form) from my phone's GPS data with a Google Apps Script? Also, is it possible to turn GPS on and off or at least detect if it's on or off?
Here's what I try to do: I go to places with my electric moped, and at every place I enter some data in a spreadsheet, such as date, distance since last position, which battery I'm using and more. One of the columns is my position. I currently enter it manually, but some positions are very common (for instance ”Work” and ”Home”) and it would be convenient if a script entered my position for me on edit.
I do that already, but it's very primitive at the moment. The only thing it does now, is check if it's a working day, and in that case, if my last position was ”Home”, it will enter ”Work”, and ”Home” if my last position was ”Work”. That takes care of the most common situations, but there are a few more places I go to often, so I figured that if I can get my current GPS coordinates from my phone, I could use them for figuring out if I'm at work, at home, or at one of the grocery stores I visit often or whatever.
I have searched for the answer, but all I can find is how to convert addresses to coordinates and the other way around, which obviously is not what I'm looking for at all.