Extract POIs from a Suunto watch
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
The Suunto watches (Spartan, Suunto 9,…) can record waypoints (or POIs) but although they can be visualized in the Suunto app (or on the watch), they cannot be exported to be used with other tools. It used to be possible to access them from the Movescount website but it was discontinued a few month ago.
So we have to use some black magic tricks to extract them :
- Make sure Suunto app has storage permission.
- Go to settings and tap many times the version number. Logging will start.
- Go to home , pull to refresh the feed
- Wait a bit
- Go again to settings tap many times the version it will stop logging
- On your Android internal storage there will be a folder called stt
Actually, with the current app version, we get an SQLite database in :
android > data > com.stt.android.suunto > files > stt-dump > amer_app.db
Now it’s just a matter of copying the file (via USB, bluetooth, etc.) to a PC, connecting to the database and finding where the POIs are stored (in a table called… pois) ; we can use QGIS or R for that…
With R, we can select this year POIs (dates are stored as UNIX timestamp) and export them as GeoJSON :
library(RSQLite) library(dplyr) library(lubridate) library(sf) library(leaflet) cnx <- dbConnect(SQLite(), "~/amer_app.db") poi <- dbGetQuery(cnx, "SELECT * FROM pois") %>% filter(creation >= format(ymd("2022-01-01"), "%s")) %>% st_as_sf(coords = c("longitude", "latitude"), crs = "EPSG:4326") poi %>% st_write("~/pois.geojson")
Or we can easily map them :
poi %>% leaflet() %>% addCircleMarkers() %>% addTiles()
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.