How about a trip fuel cost calculator where you enter start and destination plus any waypoints. Also perhaps pick the best of the route options available, e.g. highway or not as per the mapping tools. Could then just link to the mapping tool and then feed back into the calculator. For km/l also pick from some suggested consumptions for car engines/type. There is this one I am aware of Trip Fuel Cost Calculator | AA Inform but has ads etc.
Love this idea, Nebula. A trip based version that grabs the route distance and lets you pick your car’s consumption would beat a plain rand per litre sum, and keeping it ad free is a nice plus. The mapping side is the fiddly bit, free routing APIs are a little limited, but waypoints and a highway or not toggle are doable. Let me dig into what we can wire up. Anything else you’d want in there, like diesel vs petrol or splitting the cost between passengers?
Geat if you can pull this off. Yes, petrol vs diesel and split costs for people car pooling although it’s just a straight arithematic calc.
If you do much web scraping you may find this site useful findanapi.com
Right Nebula, this one is live: Trip Fuel Cost Calculator (South Africa)
Your wishlist mostly made it in. You can pick from 13 of the most travelled SA routes, like Joburg to Cape Town or Durban, or just type your own distance. For consumption there is a list of typical figures by vehicle type, from a Polo Vivo up to a double cab, with petrol and diesel bakkies listed separately, or you can punch in your real litres per 100km. It does petrol vs diesel, inland or coastal pricing on the current AA prices, a return trip toggle, and it splits the total across passengers so the carpooling rand per head is worked out for you. No ads anywhere.
The one thing I held back on is live mapping with waypoints. The free routing APIs were too limited to trust for accurate distances, so rather than ship something flaky I went with the fixed route list plus a manual distance box, which covers most real trips cleanly. I have parked the waypoint and highway or not idea until a reliable free routing option turns up, and thanks for the findanapi.com pointer, that is a useful directory to keep.
Give it a go and tell me if the consumption presets match what your cars actually do, easy to tune.
Wow, that was quick! Would have taken me days just agonising over how to lay it all out.
Used it for our usual Pretoria to Langebaan run and it lined up with what I actually spend, the petrol versus diesel choice is the bit most people get wrong when they reckon a bakkie is automatically cheaper. Good that it factors coastal pricing too, that one catches folks out every time. Quick turnaround on this.