If you like open source applications, and use GPS on your phone, you probably have heard of SatStat. It is a really great open source option for monitoring your location with GPS, as well as several other nifty perks. The only downside I could see to this application, is that it did not have a way to copy your current location to the clipboard so that you could share it with someone else.
Often, when using this app, I end up taking a screenshot of my location and sending that to someone else, but this is very tedious for them in the form of wasted data transmitted that they now have to manually sort through and retype the coordinates of the picture into a text format for use in a GPS app or Google maps.
So, I decided to quit whining and do something about it.
It was fairly simple, actually. You can see my commit here. All I did was fork the SatStat GitHub, download the fork, and added a menu option to copy the current location ( the one being displayed to the user) to the clipboard. I followed that up with a pull request, which also updates the referenced issue tracker, where other users were requesting this function as well.
I could have actually used the “location” that was being reported to the system, rather than the displayed location, but I did it by displayed location for three reasons:
- If there is no location information from the system. The displayed location still has ” – – ” displayed in it. So, the copy to clipboard command will not error, because it will simply copy ” – – ” as your location.
- The user has the choice of how the location is displayed. Rather than weed through all the settings and then copy the system reported information, and then edit it to match the user preferences for display, it simply copies the text as displayed, which already is per the user’s preference. I figure if they wanted it to be in MGRS, or decimal minutes, they would already have set their displayed information to that.
- To keep “what you see is what you get”. The location displayed to them is exactly the information they will copy to the clipboard. This helps in the event that the information displayed is not updated, they can copy the last known location, as the information displayed is only updated when the location has changed.
I tried to keep the code as clean and simple as possible. Hopefully they will add that to the regular app. If not, well, I suppose that I will just start using my edited personal copy, so I can save my own position to the clipboard.
Linux – keep it simple.
One Reply to “Adding the ability to SatStat to copy the current location to the clipboard”