Add obsessed_with_gpx.md.
parent
f01f82a326
commit
fa082ead4e
|
@ -397,6 +397,18 @@ body.start_eating_that_trashcan .cvitem_details
|
|||
<section id="cv">
|
||||
<h2 class="width_limited" id="software">Software</h2>
|
||||
|
||||
<div class="cvitem">
|
||||
<div class="width_limited">
|
||||
<h3 class="cvitem_title" id="trkpt">trkpt</h3>
|
||||
<div class="cvitem_details">
|
||||
<p>trkpt is a fork of <a href="https://codeberg.org/y20k/trackbook">Trackbook</a> with the goal of recording GPX files nearly 24/7 so that I can see where I've been.</p>
|
||||
<p><a href="https://voussoir.net/writing/obsessed_with_gpx">https://voussoir.net/writing/obsessed_with_gpx</a></p>
|
||||
<p><a href="https://github.com/voussoir/trkpt">https://github.com/voussoir/trkpt</a></p>
|
||||
</div>
|
||||
<img class="cvitem_logo" style='background-color: transparent !important' src="./cv/trkpt.png"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cvitem">
|
||||
<div class="width_limited">
|
||||
<h3 class="cvitem_title" id="bringrss">BringRSS</h3>
|
||||
|
@ -446,7 +458,7 @@ body.start_eating_that_trashcan .cvitem_details
|
|||
|
||||
<div class="cvitem">
|
||||
<div class="width_limited">
|
||||
<h3 class="cvitem_title" id="voussoirkit">Voussoirkit</h3>
|
||||
<h3 class="cvitem_title" id="voussoirkit">voussoirkit</h3>
|
||||
<div class="cvitem_details">
|
||||
<p>The voussoirkit library contains code that I have found useful to include in my other projects. Everything from <code>bytestring</code> that converts integer numbers of bytes into "3.145 MiB" strings, to <code>pathclass</code> and <code>spinal</code> which provide object-oriented file and directory operations and copy routines. Some modules like <code>winglob</code> boost cross-compatibility by smoothing over differences between Windows and Unix. This way I can easily deploy new features and bug fixes to all my programs.</p>
|
||||
<p><a href="https://github.com/voussoir/voussoirkit">https://github.com/voussoir/voussoirkit</a></p>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
Slightly obsessed with GPX
|
||||
==========================
|
||||
|
||||
In December 2020, I downloaded an app called [Trackbook](https://codeberg.org/y20k/trackbook) by author y20k. This records your GPS position while you walk, hike, drive, or bike, so you can see where you went. [GPX](https://www.topografix.com/GPX/1/1/) is a standardized XML format for storing these tracks.
|
||||
|
||||
![](gpx_1.png)
|
||||
|
||||
There are quite a few Android apps for recording GPX files, but I always found Trackbook to be the most pleasant to use for both its aesthetics and simplicity. I submitted some bug reports and even stumbled my way through Android Studio enough to make code changes and submit a few pull requests, which were merged.
|
||||
|
||||
GPX files are helpful for contributing edits to [openstreetmap](https://openstreetmap.org), because you can more accurately trace out paths that might not be clear in aerial photos, and you can publish the GPX for other mappers to reference as well. You can also use the GPX to know where you were standing when you took a photo of a point of interest, so that you can position the POI more accurately on the map. This is better than relying on EXIF geotagging in some cases.
|
||||
|
||||
Besides being useful, I think GPX recordings are fun. I don't need a GPX to help me map out a sidewalk, but I record my walks anyway because it's cool to see where I was at some time in the past. Much like a photograph, a GPX recording is an artifact by which to remember the day.
|
||||
|
||||
Now that I've recorded more than 100 GPX files, I have become quite fascinated with dumping all of them into [JOSM](https://josm.openstreetmap.de/) and seeing every single track overlaid on top of each other. The rivers of common routes and spiderwebs of distant destinations are very pretty. I zoom in and out, recognizing locations by their pink periphery against a plain black background.
|
||||
|
||||
![](gpx_2.png)
|
||||
|
||||
![](gpx_3.png)
|
||||
|
||||
![](gpx_4.png)
|
||||
|
||||
In March 2023, I became seriously interested in the idea of recording GPX 24/7. I started to think about how awesome these pink rivers and spiderwebs would look if every single path were lit up. Until now, I had primarily used Trackbook to record deliberate outings and special trips. And that's great, but it meant that my track collection mostly showed little disconnected bubbles of places I've been to only once or twice because I didn't typically record day-to-day events. Also, if I was [driving](/writing/not_just_bikes) to a location to hike at, I'd intentionally wait until I got there to start recording because the drive would dominate the statistics like distance travelled and average speed. What's worse is that I would sometimes forget to start recording at all. I knew that micromanaging the start and stop time of each recording for the purpose of statistics was silly, and that it would be better to collect as many trackpoints as possible and then make sense of it in post.
|
||||
|
||||
Initially, I was concerned that if I recorded too many tracks, the boring commutes would drown out the interesting trips, but it turns out that boring tracks are actually interesting too, given time. Seeing how easily JOSM handled the quantity of points I loaded into it gave me confidence that I should proceed. It is probably better to regret having too much data than to regret not having it.
|
||||
|
||||
However, the data structure and user interface of Trackbook are not geared toward 24/7 recording. It is designed for recording outings with a distinct start and end, and this presented me with some [friction](/writing/friction) in using it the way I imagined.
|
||||
|
||||
I sat on the problem for a very long time, and then I finally decided to make a fork of Trackbook called [trkpt](https://github.com/voussoir/trkpt) that takes the data model in a direction more suited to producing long, meandering recordings that can be cut into separate GPX files after the fact. This is my first time forking someone else's project and republishing it with a new name. It makes me feel somewhat guilty, or rude, but it's ok by the license and I'm enjoying the freedom to make this work just how I want it.
|
||||
|
||||
Basically, I swapped out the JSON-based file storage with an [SQLite](/writing/sqlite_what_a_hunk) database, and removed the entire concept of "Tracks" as a stored object. Instead, the database of trackpoints is queried on the fly to produce tracks with any start and end time you want, which you can export as GPX files. This also opens the door to JOSM-style megarenders and geospatial queries like "what day was I here?". I even made it pink.
|
||||
|
||||
![](trkpt_1.png)
|
||||
|
||||
I also added "homepoints", which are points you can put on the map around your home or workplace so that trkpt does not record any trackpoints there. Due to GPS's natural inaccuracy and drift, which is especially bad when you are indoors, you tend to get large clouds of points around buildings if you leave the recording on, so homepoints eliminate that.
|
||||
|
||||
I do not literally run trkpt 24/7 just yet, because my instinct for optimization doesn't like the thought of leaving the GPS at full power all night long and at work, capturing tens of thousands of fixes that are immediately thrown away; or worse, struggling to capture a fix at all. It is hard to shake the somewhat superstitious feeling that it would have a negative effect on my phone's long-term battery lifespan [footnote_link]. Maybe I will find a balance that reduces power consumption near homepoints without sleeping the GPS so much that it is late to capture departures. These mental blocks are the only thing in the way of me running trkpt all the time, so the code changes themselves have been successful, I think. I am still starting trkpt when I wake up in the morning and turning it off at work. But for day trips on weekends I record the whole day with no stress, thanks to the flexibility of the new data model.
|
||||
|
||||
Anyway, the code is the easy part. Now I have to do the hard part which is actually going out to interesting places more often and turning the world pink.
|
||||
|
||||
Thank you y20k for making Trackbook!
|
||||
|
||||
[footnote_text] perhaps someday we'll [invent](/writing/the_stuff_of_fiction) a standardized interchangeable battery for pocket computers.
|
Loading…
Reference in New Issue