New Project - Bikepacking Route Planner

Codename: Milepost

I wanted to create a bikepacking planning tool. Something that would relieve me from, or somehow help me doing all the admin work. For example, where to sleep, where to find water, groceries etc. And not only that, it should have some sort of optimisation tool. For example, I should be able to say, split the route around 100 kilometers, with a campsite at the end. Or, maybe a hostel at the end and also mark at least one grocery store on the way. It is possible my criteria might not land a valid split, but then it should be able to say that too. It should also be able to store & export a variety of splits from the same route.

I would not want to make any routing decisions. I think there are far better tools for routing, even ad-hoc on-the-road routing, even Garmin's internal routing is pretty good for that, and routing is a hard problem. But these POIs as waypoints, I should be able to encode in the GPX as snapped points so that as a user, I can get notified when there is a grocery store coming up by my bike computer. At that point I can figure it out myself how to get there, that I leave to the future me on the road. In my experience, for Denmark / Norway, just this should alreday be quite useful, but I can not yet say how it will be for other parts of the world. This is also a project that is far more than I can chew in one go if I have to make it a production grade system, but I have a plan!

Data loading & caching

Firstly, I need to deal with visualising map tiles and loading corridor searches for a given set of POIs[1], this is going to be quite heavy on the backend, and I don't have infinite compute resources, so I have to be a bit smart with that. I also need to cache the data somewhere, maybe have some sort of OSM data ingestion pipeline that I can load the POIs that we are actually interested in. And also we need a clean configuration surface where I should be able to configure what kind of POIs we are interested in, also also have an idea of what kind of POIs[1:1] are actually available. This does not need to be a full blown UI, but any interface would be fine to begin with.

Uploading routes & and custom waypoints

Secondly, I need to a system to upload routes, and do the corridor searches. Corridor searches will give me what kind of POIs around a given a polyline or a route. And I should also be able to add custom coordinates as POIs. It is quite possible that we might need something that is not in OSM data. As a quality of life improvement associated with that, we could also have a way to open Google Maps etc. in that same view for a quick check. There is already quite a decent tool out there, called Pitstopper[2], but it does not have the optimisation part.

Planning optimisation & route segmentation

The reason I need some of the segment optimisation is purely to reduce distraction on the road. If I put each grocery store as a waypoint on my route, I will get pinged maybe ten times during a segment on a busy day; I don't want that distraction. I just want to ride my bike! In that regard, I think I should be able to get segments that contains specific POIs. There could be constraints such end a route segment at a campsite and have at least one grocery store on the way after the last segment. The optimisation, ideally, should be rock solid. It is not a hard problem, but I think it's best if it works exactly predictably. And of course, circular routes should be taken into account.

Eventually, I can imagine, that the system be able to modify the route itself to include such waypoints, but that is a far future and I can not imagine that yet. For now, if there can be no optimal set of segments found, one has to end up modifying the original route and re-upload the GPX, if they need to work with a new route.

Export to other apps

We also need to export the GPX, with proper waypoints that can be read by apps such as Komoot, RideWithGPS and even Garmin. This is not particularly complicated, but since all these platforms are quite closed, I can already see it would be quite a bit of grunt work. But doable.

Elevation based optimisation

I guess at some point we can add elevation in the optimisation math, so instead of working on pure distance, we can work the product of distance and total gained elevation. So, either 100km + 500m gained, or 50km + 1000m gained, both are valid segment splits.

POI to Waypoints

I do not need to add detours in the route itself to go over the POI, although, it sounds like a nice feature after we optimise for waypoints, but I think, for now I will stay away as far as possible from the whole routing topic. It is not a easy problem, technically and conceptually, and I will let the experts at Garmin handle it. The last thing I want is to get lost in some maze when I am tired and hungry, and if I do end up in that situation, I can curse Garmin instead of myself.

Assitance, not guidance

I think the entire point of this tool is to be a desktop friendly app, in my mind, that would help me reduce a lot of the manual workload while planning a route. Maybe I'll end up with a mobile app as well for quick check on planning notes, but this system it not meant to replace all manual planning effort. The goal is to create a easy starting point, from which, I can manual enrich the data. For example, it can very much happen that a POI on the OpenStreetMap data is outdated, or incorrect. We should be able to add extra metadata around those.

A note of GPX

The entire system will work on traces; I do not need any sort of turn by turn cue modification etc. at least for now. So a humble GPX exchange format would do.

Hikers?

I think it would very much be possible to extend the usage of this app to support hiking usecases too, but that is for a far far future me.


And that is all that ideas I have, as of tonight. I had two bottles of cola today, hence I am still writing at 0130. This will maybe be a tool for myself and my friends; or might never see the light of day. But as of now, it seems like a darn good usecase for my extremely over-complicated personal IT infrastructure.

  1. POI: Point of interest ↩︎ ↩︎

  2. PitStopper also has a privacy first, frontend only design. Which is very nice, but I need to also save my work on the cloud so that I can come back to it later. For routes 1000 kilometers long, I can not possibly plan in one go, in the browser. ↩︎

#coding #devlog #infra #journal #software