Repat Planner Guide

Back to the planner

A single-file web page for planning repatriation runs: from the base (601 Blackburn Rd, Notting Hill), to the Coroner (46 Moore St, Southbank), out to country funeral directors and back to base. Start, Finish and the Coroner are filled in for you; you give it the towns you're delivering to. It works out the route, places the stops (the Coroner, each drop-off, morning tea, lunch (at a Zambrero when there's one on the way), only if the tank needs it a Shell Card fuel stop, and at the end fuel at Reddy Express and the car wash in Oakleigh), and builds a live trip sheet:

Every change you make on the sheet updates everything below it straight away. The sheet can be copied into Google Sheets or Excel, or downloaded as CSV.

The planner comes as two files for use from a folder on your computer:

For the shared funeral director list on a hosted site there is a third file, functions/api/funeral-directors.js; see Hosting on Cloudflare Pages.


Getting started

  1. Unzip both files into the same folder, anywhere on your computer. Keep them together.
  2. Open index.html directly in Chrome or Edge: double-click it, or drag it into a browser window.
  3. On the very first open, it plans an example run so you can see how it works: Notting Hill → Coroner → Horsham → Reddy Express and Jet Clean car wash, Oakleigh → Notting Hill, leaving 06:10 tomorrow.
  4. Add your funeral directors with Funeral directors list in the Trip panel (one at a time, or import a CSV list; the button shows how many are in the list). Then choose the one for Horsham under the Via box and press Plan trip, or choose it under Horsham in the trip sheet, and the trip is planned to that address.
  5. The How it works (README) link in the green header, and the README.html link at the bottom of the page, open this guide in a new tab. That's why the two files need to be in the same folder.

Don't open it inside another app's file preview pane. Preview panes block internet lookups, and the page will say so.

You need an internet connection. There are no accounts, keys or installs.


The Trip panel

Setting What it does
Start / Finish Both are Notting Hill unless you change them, meaning the base at 601 Blackburn Rd, Notting Hill (anything containing "Notting Hill" or "601 Blackburn"). The Coroner (46 Moore St, Southbank) is always added as the first stop after the start; you don't type it. Both addresses are looked up on the map when you plan, and the green text underneath shows exactly what was matched, so check it. Neither gets a funeral director drop-down. Otherwise: a town, suburb or address. Add the state to avoid mix-ups, e.g. Burnside SA. You can also type a latitude and longitude, e.g. -37.90, 145.14, for example if the van leaves from a different gate.
Via (one per line) The towns you're delivering to, after the Coroner (in the quickest order if that's ticked, otherwise in the order typed). Each becomes a drop-off with its own funeral director drop-down, shown under the box as you type (choose them before planning) and in the trip sheet. (Lines for the Coroner, Reddy Express or Jet Clean are ignored: those stops are added automatically.) If the finish isn't the base (a one-way run), it gets a drop-down too. Add @ HH:MM to stay overnight and leave at that local time, e.g. Mildura VIC @ 06:00 (also @ 0600, @ 6:00 or @ 6am; a time that can't be read gives no overnight, and the status line says so). Add a time window for a delivery: Bendigo before 1200, Ballarat after 13:00 or Cobram between 1100 1300 (see Delivery time windows below). Both together: Mildura before 1500 @ 07:00. Add first or last for a delivery that must be the first or last drop-off, e.g. Ballarat first, Horsham last (see below).
Depart date / time When you leave the start, in the start's local time. Defaults to 06:10 tomorrow. Changing it places morning tea, lunch, afternoon tea and fuel again.
Speed (% of limit) Every leg is timed as if you drive at this percentage of the speed limit (default 95%).
Coroner / + per via Minutes at the Coroner: the first number, plus the second for each town under Via (defaults 10 and 5: one via = 15 min, four vias = 30 min).
Drop-off Minutes at each funeral director (default 15).
Morning tea / Lunch / Afternoon tea / Fuel stop Minutes for each (defaults 15, 30, 15 and 15). A stop doing two jobs, e.g. a drop-off where you also have lunch, takes both times added together. A stop you add by hand with + stop takes 5 minutes (30 with FOOD ticked, 15 with a fill, and the longer of the two, 30, with both).
Reddy Express / Car wash Minutes at the two stops that end every run finishing at the base (defaults 5 and 10): fuel at Reddy Express, 1523 Dandenong Rd, Oakleigh, then Jet Clean car wash, 43 Stamford Rd, Oakleigh, then 601 Blackburn Rd. Not added if the Finish is somewhere else.
Morning tea at / Lunch at / Aft. tea (min after lunch) When the meals are wanted (defaults 09:45, 12:00 and 150 minutes, i.e. 2½ hours). Morning tea is planned for about its time, preferring 15 minutes either side. Lunch is planned for about its time, after the last drop-off (see Choosing stops under How it works). Afternoon tea is planned that many minutes after you leave lunch, and only on a day that would finish after 16:00. Clearing a time box puts the default back.
Fuel range (km) How far you can drive on a tank (default 500). If the whole run is within it (less what's already used), no fuel stop is planned.
Km on tank at start Leave at 0 if you start with a full tank.
Show all Shell Card stations on the route / Shell Card stations within (km of route) The button searches the whole route for Shell Card stations and shows them on the map (only the planned fuel stop is shown otherwise). The setting is how far either side of the route they're shown (default 3, up to 10); changing it redraws the pins straight away.
Quickest order for drop-offs Ticked (the default): Plan trip puts the towns under Via in the order that gets the last drop-off done soonest after the Coroner (the drive home afterwards doesn't count, so the furthest town is usually last), rewrites the Via list to match, and says in the status line how much sooner the last drop-off is (or that your order was already the quickest). A town with @ HH:MM (an overnight) stays where it is in the list; only the towns either side of it are reordered, so you still decide which drops are on which day. A town marked first always goes first and one marked last always goes last (see below); the rest are ordered between them. Funeral directors chosen for each drop-off move with it. Untick to keep the order you typed.
Sealed roads only Ticked (the default): the route avoids unsealed roads, using the Valhalla routing engine's car profile. Unticked: OSRM, which drives unsealed roads more slowly but will still use them when they are much shorter. Press Plan trip after changing it.

Press Plan trip after changing the start, vias or finish. Changing the date, time, a stop length, a meal time, speed, fuel range or km on tank places morning tea, lunch, afternoon tea and fuel again on the same route; any changes you'd made to those stops (a different town picked, a typed length) are redone, while edits on the fixed stops (the Coroner, drop-offs, the Oakleigh stops, including a departure time typed on one) are kept. Stops you added yourself with + stop or Add as stop are removed and need adding again.

Clear trip (next to Plan trip) starts a new run. Click it twice to confirm (it changes to Click again to clear); the second click must come within 4 seconds. It removes the current trip, including the sheet, map, edits, weather and the funeral directors you chose, empties Via, and puts Start and Finish back to Notting Hill. It keeps your settings, your funeral director list, and the remembered place results, fuel hours and fuel brands. If you might want the trip again, use Save plan first.


Funeral directors

Funeral directors come only from your own list. Nothing is taken from the map data: only funeral directors you've added are shown on the map or offered in the drop-downs.

Your list

Where the list is kept. On the Cloudflare Pages site set up as below, the list is shared: it's stored on the server, everyone using the site sees the same list on any device, and changes need the passphrase (asked for once, then remembered in that browser; Forget passphrase in the window removes it). Opened from a file instead, the list is kept in that browser only: clearing the browser's site data removes it, and another computer won't have it. Either way, Export list now and then makes a backup.

If you'd added funeral directors in a browser before the shared list was set up, the window offers Copy this browser's own list into the shared list.

If the shared list can't be reached, the last copy seen in that browser is shown and can still be used for trips, but it can't be changed until the server is back.

Choosing one for a trip

Your choices for a trip are kept with the plan and in a saved plan file, but not after Clear trip, so a new trip never starts with a funeral director chosen for an earlier one. If you delete a funeral director that's chosen for the current trip, it disappears from the drop-down and a red note says the route still goes there: choose another, or press Plan trip to go to the town centre. Always confirm the delivery address against the paperwork.


Shell Card stations

Plan trip doesn't search the whole route for fuel. When a fuel stop is needed, it searches only the stretch where the fill should be (see Choosing stops), and the map shows just that station. To see every Shell Card station along the route, press Show all Shell Card stations on the route in the Trip panel: it finds every fuel station within 10 km of the route and highlights those that take the card:

On the map Brands
Yellow SC pin, red edge Shell; Reddy Express (formerly Coles Express, now run by Viva Energy); OTR (On The Run). These take the Shell Card.
White SC pin, dashed edge Liberty, Westside and Mogas. Only participating sites take the card, so check before filling.

Only stations within the Shell Card stations within setting are shown. Click a pin for its name, brand, opening hours (when known), how far along and off the route it is, and an Add as stop button (one for each time the route passes it, e.g. on the way out and the way back).

Fuel stops are only ever planned at stations that take the Shell Card (the yellow-pin brands: Shell, Reddy Express / Coles Express, OTR), and only when the run is longer than your fuel range (see Choosing stops). Other servos, including Liberty, Westside and Mogas, can still be stops, but the sheet doesn't count them as fuel. On the trip sheet, a stop with a Shell Card station shows Shell Card fuel (OTR 24 hrs) in the grey line, and the FUEL button offers a fill there; a stop without one shows no fuel. If no Shell Card station is within your fuel range, the sheet says so in red. You can still click no fuel to plan a fill there by hand. Once Show all Shell Card stations has finished, the green header shows how many yellow-pin stations are within the map setting. The CSV has a Shell Card column.

How a station's brand is known: its brand in OpenStreetMap, looked up for the stations in the fuel-stop search and, after Show all, for every station along the route (other servos, e.g. in a lunch town, use a brand looked up in the last 30 days if there is one); otherwise its name (most are named after their brand, e.g. "Shell Ararat"). Matching is by whole word, so "Shellharbour" is not taken for Shell. A station with neither a brand nor a brand-like name recorded won't be highlighted or used for fuel, even if it does take the card; use Add as stop and click its FUEL button if you know it does. In the busiest parts of Melbourne, stations more than about 2 km from the route may be missed.

The list of brands comes from Shell and the trucking press (Shell: What's a fuel card; Big Rigs, 11 Nov 2024). Networks change, so check Shell's own station locator if in doubt.

The full search runs in the background and the status line says when it's done; planning never waits for it. Pressed before a trip is planned, the button says "Plan a trip first."; pressed again after it has finished, it just redraws the pins.


The trip sheet

Each row is a stop. The numbers on a row describe the leg that arrives at that stop.

Column Meaning
# Stop number (the unlabelled first column; matches the pins on the map).
Flags FUEL and FOOD buttons. An amber Fuel 303 means a fill is planned here, 303 km after the previous fill. + fuel / + food means it's available but not planned; no fuel / no food means none was found in the map data. Click to change; a ticked FOOD shows Food. A dot after the FUEL label means it was set by hand (Reddy Express, Oakleigh always has one: it's always a fill).
Stop The town, and underneath it the stop's job: Coroner, Drop-off, Morning tea, Lunch, Fuel (Shell Card), Fuel (Reddy Express), Car wash, or several, e.g. "Drop-off · Lunch" (Start / Via / Finish for a fixed stop with no job). Destination towns have the funeral director drop-down. A servo or roadhouse that isn't inside a town shows its name and where it is, e.g. Ampol, Horsham or 7-Eleven, near Dimboola. Morning tea, lunch and afternoon tea stops show just the town, not the café or pub found there (a lone roadside place shows the town in its address, e.g. Inglewood, or near Dimboola). Fuel stops keep the station's name. Meal and fuel stops have a drop-down of other places within 50 km, showing how far away each one is and what it has; picking one moves that job there. The grey line underneath lists the funeral director's address (once chosen), the services found (Shell Card fuel only counts stations that take the card; other servos show as Store), and how far the town is off the route. Shell Card stations show their opening hours when OpenStreetMap has them, otherwise just the brand. If every Shell Card station there has recorded hours and all of them are shut when you arrive, Fuel closed on arrival shows in red; if it's a planned fill, a warning also appears above the table. Many country servos have no hours recorded, so no warning doesn't guarantee they're open.
State State, plus the time zone in use (e.g. AEDT).
Km / Total Length of this leg, and the running total.
Km/h Average speed for the leg. Hover to see the average at 100% of the limits. Type a number to override it; auto goes back.
Drive Driving time for the leg (h:mm).
Arrive / Depart Local times. Type a departure time to make the stop an overnight; auto goes back. On a fixed stop (the Coroner, a drop-off or an Oakleigh stop), typing a time or pressing auto places morning tea, lunch, afternoon tea and fuel again for the new days. Changing the departure on row 0 changes the trip's departure time.
Stop min Length of the stop, from its job(s) (see the Trip panel). Type a number to override it for this stop; this also clears a departure time set on it.
Since fuel Km driven since the last planned fill. Shown in red if it's over your fuel range, with a warning above the table.
Weather on arrival Temperature, conditions, chance of rain, wind and gusts for the hour you arrive. Forecasts only go 16 days ahead.
Sun Sunrise and sunset at that stop on the day you arrive.
Light When the leg arriving at this stop is driven in the dark (before sunrise or after sunset, blue) or in the half-hour after sunrise or before sunset (kangaroo hour, amber), worked out minute by minute with the sunrise and sunset where you are along the leg: e.g. Dark until 07:00 (a pre-dawn start), Dark from 19:36, Dark (the whole leg), Dawn until 07:29 or Dusk from 19:06 (a stretch in the middle of a leg shows both times, e.g. Dark 05:10–06:20). Dark is shown over dawn/dusk when a leg has both. The labels show in capitals on the sheet. Hover for the minutes, e.g. "About 60 of 67 min in the dark (before sunrise)". On the start row, and on the leave line of an overnight stop, it shows Leave in dark or Leave at dawn/dusk instead.
Notes Your own notes. They are kept with the plan and exported.
+ stop / remove + stop adds a stop after this row: the place with services nearest the middle of the gap (it searches 25 km either side of the middle), preferring one with a Shell Card station. remove takes away a stop the planner placed or you added; the Coroner, drop-offs and Oakleigh stops can't be removed.

Overnight stops

A stop of 5 hours or more is an overnight and takes two shaded lines: the arrival line (with an Overnight · 11 h 34 min stay label, that evening's sunset and the weather on arrival) and the leave line (the departure time, the next morning's sunrise, the forecast for leaving, and Leave in dark or Leave at dawn/dusk if it applies). A green line under the pair marks the end of the driving day. A stop with a set departure time is also the end of a driving day.

Below the table, one day card per driving day shows the distance, driving time, stop time, leave and arrive times, total time on the road, and how many legs were partly driven Before sunrise, After dark or at Dusk/dawn. The green header shows the totals for the whole trip.

On the map

Buttons


How it works

Route

With Sealed roads only ticked, the route comes from the public Valhalla server (the routing engine on the OpenStreetMap website), using its car profile set to avoid unsealed roads. An unsealed road is only used right at the start or finish, for example a gravel driveway. This relies on roads being marked as sealed or unsealed in OpenStreetMap; check remote sections on the Satellite map.

The public Valhalla server won't take a single request covering more than 1,500 km, so the planner asks for the route one leg at a time, and splits any leg longer than about 1,400 km (in a straight line) into pieces of about 1,000 km.

If Valhalla can't be reached or can't find a sealed route, the planner uses OSRM instead and says so in red. With the box unticked, OSRM is always used.

The quickest order for drop-offs

With Quickest order for drop-offs ticked, Plan trip first asks OSRM for the driving time between every pair of places: the Coroner and each drop-off. It then finds the order that reaches the last drop-off soonest (with delivery time windows, see Delivery time windows below). The drive home after the last drop-off isn't counted: the aim is to complete the deliveries as early as possible, so the furthest town normally comes last, even where doing a nearer town on the way back would mean less driving in total. With an overnight, the towns before it are put in the order that reaches the overnight town soonest, and the towns after it in the order that finishes the last drop-off soonest. Every possible order is checked for up to 10 drop-offs between overnights; for more, it builds a good order and keeps improving it. Stop times are the same whatever the order. The new order is only used if it makes the last drop-off at least a minute sooner. If OSRM can't be reached, straight-line distances are used instead, and the status line says so. Without time windows, the order is judged on driving time alone; it doesn't consider meal times or opening hours. For a delivery that has to be at a set time, give it a time window (see below) rather than unticking the box.

A drop-off that must be first or last

Add first to a Via line, e.g. Ballarat first, and that delivery is always the first drop-off after the Coroner. Add last, e.g. Horsham last, and it's always the last drop-off before heading home to Oakleigh. This applies whatever order the lines were typed in, and whether or not Quickest order for drop-offs is ticked. The Via list is rewritten with them at the top and bottom, and the status line says e.g. "Ballarat put first, Horsham put last, as marked." With ordering ticked, the other drop-offs are put in the quickest order between them: with a last town, the order that reaches it soonest (so a town that would otherwise be done on the way home is done on the way out). Both work with a time window and an overnight: Ballarat first before 1000 (or Ballarat before 1000 first), Mildura last @ 07:00. If more than one line is marked first (or last), they go in the order typed. A line marked both is treated as first. A funeral director chosen for the line moves with it.

Delivery time windows

Any town under Via can have a time window for its delivery, written after the town:

Typed Means
Bendigo before 1200 (or by 12:00) Must arrive by 12:00.
Ballarat after 13:00 Must not arrive before 13:00. Arriving early means waiting there until 13:00.
Cobram between 1100 1300 Preferably arrive between 11:00 and 13:00. Arriving early means waiting until 11:00.

Times can be written 1200, 12:00, 930, 9:30, 1pm, 1:30pm, noon or midday; "between" also takes 11am and 1pm or 11:00-13:00. A window is on the local clock of the day you arrive. With an overnight, the window goes before the @: Mildura before 1500 @ 07:00. A window that can't be read (e.g. "after lunch") is ignored, and the status line says so.

On the sheet, a stop with a window shows it under the stop name with how the plan meets it, e.g. Before 12:00: on time, After 13:00: waits 25 min, or in red Before 12:00: 20 min late. A late arrival also gets a red warning above the sheet. A wait is added before the stop (Depart moves later; Stop min stays the stop's own length) and counts in the day's stop time; it never makes the stop an overnight.

The drop-off order (with Quickest order for drop-offs ticked) then follows the run on the clock: the departure time, the Coroner, each drive and drop-off, any waiting, and rough allowances for morning tea and lunch. It looks for the order that gets the last drop-off done soonest, counting every minute late for a before window 20 times over and for a between window 3 times over. So deliveries still go on the way out, with the furthest last, unless a window makes it better to do one on the way back: Ballarat after 13:00 on a run to Horsham is done on the return, while Bendigo before 1200 on a run to Mildura stays on the way out. Overnights stay where they are, as without windows. Every order is checked for up to 8 drop-offs between overnights. These are estimates made before the route is worked out; the sheet has the real times and flags any window still missed. With the box unticked, your order is kept, and the sheet still waits for and checks the windows.

Choosing stops

The times below are the defaults; change them with Morning tea at, Lunch at and Aft. tea (min after lunch) on the Trip form.

Every run is Start → Coroner → the drop-offs (in the quickest order, or as typed) → Reddy Express, Oakleigh (fuel) → Jet Clean car wash, Oakleigh → Finish (the two Oakleigh stops only when the run finishes at the base). Then, using the times worked out so far (morning tea and lunch never join the Oakleigh stops):

  1. Morning tea: a town with food (café, bakery, pub, takeaway) you'd reach nearest 9:45, preferring 9:30–10:00, after the Coroner. None if you're back before 9:30 or leave after 10:00.
  2. Lunch: a town with food nearest 12:00, but after the last drop-off; if you'd leave the last drop-off after 12:00, as soon as possible after it. If the last drop-off is reached after 13:00, lunch is around 12:00, before it. None if you're back before then. Only towns you'd reach between 11:30 and 12:30 are considered, if there are any; if not, the nearest to the lunch time is used as before.
    A Zambrero comes first: if you'd reach a Zambrero between 11:00 and 13:00 in that same stretch, lunch is there instead of a town, even if it's up to 30 km off the route by road. With more than one, it's the one you'd reach nearest the lunch time: 12:00, or, when you leave the last drop-off after 12:00, the one nearest the last drop-off. The Zambrero is a stop of its own (never joined to the drop-off), named after it, e.g. Zambrero, Bendigo. The drive there and back is added to the legs either side of it, so Km, Total, Drive, Since fuel and every time after it include it; the grey line under the stop says so (e.g. 12.3 km off route · 25 km there and back, included in Km), and the map shows the detour as a dashed line. Its drop-down still lists the towns nearby if you'd rather stop in one. Both windows follow Lunch at: an hour either side for a Zambrero, half an hour either side for a town. Zambreros are found from OpenStreetMap, which doesn't have every store: when this was written it had them in Melbourne, Geelong, Torquay and Bendigo, but none in Ballarat, Ararat or Horsham. A store that isn't on the map can't be planned.
  3. Afternoon tea: only when the day would finish after 16:00. A town with food nearest 2½ hours after leaving lunch (on a day with no lunch, 2½ hours after lunch would have finished), and not in the last half hour of driving. It's worked out after the fuel stops, so the finish time includes them.
  4. Fuel, only if the whole run (with any Zambrero detour) is longer than your fuel range less the km on the tank at the start (otherwise no fuel stop is planned, and none searched for). Then one fill at a Shell Card station about halfway, at or after the last drop-off (preferably no earlier than 20 km before it; earlier only if there's none after), anywhere one fill gets you there and home within range. If the lunch town has a Shell Card station that works, the fill is done there too: it shows as its own row, named after the station, just before the lunch row (0 km between them). Otherwise only that stretch is searched: first 25 km either side of the target point, then 50, 100, 200 km and so on, until a Shell Card station within 3 km of the route turns up. The nearest one found becomes the fuel stop. If one fill can't do it (a very long run, or a small tank), fills are added along the way, each as late as the tank allows, then the last one as above. If none can be found, the status line and the red notes above the sheet say so.

A stop that lands within 3 km of one already planned joins it: for example, morning tea in a drop-off town, or fuel at the last drop-off. Its time is the jobs' times added together. A fill and a meal (morning tea, lunch or afternoon tea) are the exception: they always get a row each, side by side in the order you reach them (the fill first if they're at the same place), so the sheet shows the fuel stop and the meal separately.

Runs over more than one day

If the run has an overnight (a via with @ HH:MM, e.g. Mildura VIC @ 07:00, or a departure time typed on a drop-off in the sheet), morning tea and lunch are planned for each driving day, by that day's clock:

The first day is planned just as a one-day run would be. Typing or clearing a departure time on a fixed stop in the sheet places morning tea, lunch, afternoon tea and fuel again, because the days change.

Clicking a FUEL button sets or clears a fill by hand; the sheet's fuel check (the red "past your range" notes) still covers every stretch. A stop counts as an overnight if it has a set departure time or a stop of 5 hours or more.

Speeds and times

Each leg is timed at Speed (% of limit) of the speed limits along it. On a sealed-roads route (Valhalla), the route is sent back to Valhalla after planning to read, for each stretch of road, its type and its recorded speed limit, and is timed at:

Without this, Valhalla times a highway with no recorded limit at 75 or 60 km/h, which is why highway legs used to look slow. The status line says how much of the route had a recorded limit. Reading the limits takes a few seconds; if it fails, Valhalla's own road speeds are used and the status line says so. On an OSRM route, the limits are estimated from OSRM's road speeds. If a leg still looks wrong, type a speed into its Km/h cell. Times are calculated in each stop's own time zone, from Open-Meteo.

Sunrise, sunset and weather

Sunrise and sunset are calculated on your computer (the standard NOAA sunrise equation, accurate to about a minute). Forecasts come from Open-Meteo, up to 16 days ahead. They're fetched for new stops, refreshed for every stop when you press Refresh weather, and refreshed for stops whose forecast is over 3 hours old when the plan is opened or the stops change.


Data sources

Service Used for
Valhalla (FOSSGIS public server) Route and travel times with Sealed roads only ticked, and the speed limits along that route; the drive to a Zambrero lunch and back
OSRM demo server Route and travel times otherwise, or if Valhalla fails; the driving times between drop-offs used to find the quickest order; the drive to a Zambrero lunch and back
Photon Finding your start, vias and finish; finding the addresses of the funeral directors in your list; towns, fuel and food along the route; fuel stations near a planned fill, or along the whole route when Show all Shell Card stations is pressed; Zambreros near the route
Nominatim Fuel station opening hours and brands (looked up by map id); backup for finding places
Overpass Backup for the town, fuel and food search, the fuel station search and the Zambrero search, and for hours and brands
Open-Meteo Forecasts and time zones
Esri Map pictures
The site's own /api/funeral-directors (Cloudflare Pages only) The shared funeral director list

All place and road data (Photon, Nominatim, Overpass, Valhalla, OSRM) is from OpenStreetMap and its contributors. These are free, shared services, so the planner spaces out its requests. If one is busy, it waits and retries, and the status line counts down. If Photon (the quick place search) still doesn't answer after its retries, it's left alone for 10 minutes: every look-up goes straight to the backups (Nominatim, Overpass) with no more countdowns, then Photon is tried again. The Coroner, the base and the two Oakleigh stops are remembered for 30 days once Photon has found them, so they don't need looking up each time. If both place searches fail, the stops found so far are kept, and pressing Plan trip again a few minutes later carries on from where it stopped.


What is saved on your computer

These are kept in the browser's storage on this computer only, under names starting repatPlanner.:

Clear trip removes only your last plan. Use Save plan to keep a trip permanently or move it to another computer.


Troubleshooting

Message or problem Cause and fix
"…inside another app…" The file is open in an app's preview. Save it and open it directly in Chrome or Edge.
"…could not be reached…" No internet, or an ad blocker or firewall is blocking that service.
"… did not answer in time" / "… returned an error (NNN). It may be busy; try again in a minute." / "… rejected the request (…)" That service (named at the start) was busy or refused. Wait a minute and press Plan trip (or the button you used) again.
"Wait for the current planning to finish…" Planning is still running. Try again when the Plan trip button is back.
"No funeral director chosen for …" Choose one in the drop-down under that town in the Stop column, or ignore it if delivering to the town centre is right.
"No funeral directors listed for …" None in your list for that town. Use "+ add funeral director" under the town. Check its Town is spelled the same as the via, or that it's within 10 km.
A funeral director shows "not located" and can't be chosen Its address wasn't found on the map. Open Funeral directors list, edit it, and fix the address or paste latitude and longitude.
Your funeral director list is empty Opened from a file: the browser's site data was cleared, or this is a different browser or computer. Import your last exported funeral-directors.csv. On the Cloudflare site: check you're using the main …pages.dev address, not a preview address.
"That passphrase was wrong…" / "Not saved: wrong passphrase." The passphrase doesn't match the EDIT_KEY secret in Cloudflare. A wrong one is asked for again straight away; after a second wrong one the change isn't saved, the remembered passphrase is forgotten, and it's asked for at the next change. "Not saved: the passphrase is needed…" means the question was cancelled.
"Not saved: the server said … not set up" The EDIT_KEY secret is missing, or the site wasn't redeployed after adding it. See Hosting on Cloudflare Pages. (If the FD_KV binding is missing instead, the window says "kept in this browser only" rather than "Shared list, kept on the server".)
"The shared funeral director list could not be reached…" The server or the internet connection is down. The last copy is shown, read-only. Reload when it's back.
"No Shell Card station found between … km" / "The Shell Card station search failed" No Shell Card station within 3 km of the route in the stretch where a fill would work, or the search services didn't answer. Press Plan trip to try again, or add a station yourself with + stop or from Show all Shell Card stations (its pin's Add as stop).
"Shell Card stations could not be found…" The Show all Shell Card stations search failed. Press the button again later.
"Brands could not be looked up, so stations are judged by their names only." A few Shell Card stations may be missed. Later, press Plan trip and then Show all Shell Card stations again to retry.
"Place search is busy, trying again in N s…" / "Shell Card search: place search busy…" Photon is busy or down. It retries on its own, for up to about a minute and a half; if it still doesn't answer, the planner uses the backups for the next 10 minutes without asking Photon again, so you only see this once.
"Quick search unavailable. Trying the slower search…" Photon failed, so the Overpass backup is being used. It's slower; let it finish.
"Place search failed…" Photon and the Overpass backup both failed. Stops found so far are kept; press Plan trip again in a few minutes.
"Could not find …" Add the state, e.g. Keith SA, or type latitude and longitude. If it's the Coroner, the base or an Oakleigh stop that can't be found, its address is looked up from PRESETS in the page script: fill in its lat and lon there (see For anyone editing the code), or try again later.
"…: arrives HH:MM, N min after its HH:MM deadline." / "…after its preferred window…" A delivery time window can't be met with this order or route. Check the order (or tick Quickest order for drop-offs), an earlier departure time, shorter stops, or whether the window is realistic.
"The time window "…" for … couldn't be read, so it's ignored…" Write it like before 12:00, after 13:00 or between 11:00 and 13:00, after the town and before any @ HH:MM.
"The departure time "@ …" for … couldn't be read, so there's no overnight there…" Write the time after @ like 06:00, 0600 or 6am, at the end of the line: Mildura @ 06:00.
"No town with food found for morning tea" / "…for lunch" (or "…on day 2") No town with food on the stretch where that meal fits. Add a stop with + stop and tick FOOD, or leave it out.
"The Zambrero search failed (…), so a Zambrero for lunch may have been missed…" Neither Photon nor the Overpass backup answered the search for Zambreros, so lunch is at a town (or a Zambrero found before the failure). Press Plan trip again in a few minutes.
"… is N km since the last planned fill, past your R km range." A stretch is longer than your tank. Click a FUEL button to add a fill, or check Fuel range and Km on tank.
"Fuel at … looks closed when you arrive (HH:MM)…" Every Shell Card station there has recorded hours, and all are shut then. Pick another place in that stop's drop-down, or fill earlier.
"… is no longer in your funeral director list, but the route still goes there…" The chosen funeral director was deleted from your list. Choose another, or press Plan trip to go to the town centre.
"No towns with services between these two stops." / "… is already a stop." From + stop or Add as stop: nothing to add there, or that place is already on the sheet.
"No route found" The routing service couldn't route between those places. Check the green "matched to" text under each box.
"A sealed-roads-only route could not be made…" Valhalla couldn't be reached or found no sealed route, so OSRM was used and the route may include unsealed roads.
"Speed limits could not be read…" Valhalla's speed-limit lookup was busy or unreachable, so legs are timed at Valhalla's own road speeds (slower on country highways). Press Plan trip again in a minute. "…could not be read for N km of the route" means only those stretches use Valhalla's own speeds; the rest of the route is timed at the speed limits.
"Beyond forecast range" The arrival is more than 16 days away.
"Weather and time zones could not be loaded…" / "Fuel station opening hours could not be loaded…" Open-Meteo, or the hours lookup, didn't answer. Times use estimated time zones meanwhile. Press Refresh weather to try again.
"Copy was blocked by the browser. Use Download CSV instead." The browser didn't allow copying. Download CSV gives the same table.
"That file is not a saved trip plan." Open plan only opens .json files made with Save plan.
In the Funeral directors window: "Address not found…", "A name and a town are needed.", "Latitude, longitude should look like…", "No funeral directors found in that file…", "That file could not be read…", "N not found: they show 'Not located'…" Fix the address or paste coordinates; fill in Name and Town; type coordinates as -36.7180, 142.2010; check the CSV has at least a Name and a Town column (save it from Excel as CSV); then edit any "Not located" entries.
"Your list could not be saved in this browser (storage full or blocked)…" The browser refused to save. Export list to keep a copy, and check the browser isn't in private mode or blocking site data.
Map area says "Map library did not load." The map library couldn't be downloaded (no internet, or blocked). Reload when online.
Map shows "Access blocked" or "API key required" A map provider refused. Try the Topographic or Satellite switch.

Hosting on Cloudflare Pages (shared funeral director list)

The planner works opened straight from a file, but hosted on Cloudflare Pages it can keep one shared funeral director list for everyone. The files are laid out like this, in a GitHub repository:

File What it is
public/index.html The planner
public/README.html This guide
functions/api/funeral-directors.js The small server program that stores and returns the shared list, at /api/funeral-directors

Cloudflare's drag-and-drop upload can't deploy the functions folder, so the site is deployed from GitHub (or with Cloudflare's Wrangler tool).

Set it up once

  1. Create the storage. In the Cloudflare dashboard, go to Storage & Databases → KV and create a namespace, e.g. repat-funeral-directors.
  2. Create the site. Go to Workers & Pages → Create, choose Pages and import your GitHub repository, then set: Framework preset None, Build command blank, Build output directory public. Save and deploy.
  3. Connect the storage. In the Pages project: Settings → Bindings → Add → KV namespace. Variable name FD_KV (exactly), and choose the namespace from step 1.
  4. Set the passphrase. Settings → Variables and Secrets → Add: name EDIT_KEY (exactly), type Secret, value your passphrase. Use something long that others won't guess; anyone with the passphrase can change the list.
  5. Redeploy (Deployments → the latest one → Retry deployment, or push any change). The binding and secret only take effect after a redeploy.
  6. Open the site, open Funeral directors list, and check the window says "Shared list, kept on the server". Then add one or import your CSV; the passphrase is asked for at the first change.

Anyone who has the site's address can see the list and plan trips; only people with the passphrase can change it. To keep the whole site private, turn on Cloudflare Access for the Pages project (in the project's settings), so only listed email addresses can open it.

Use the site's main address (yourproject.pages.dev). Preview builds get their own addresses, and keep their own saved trips and passphrase; they only see the shared list if the binding and secret are also added for the Preview environment.

Cloudflare's free plan covers this comfortably: each change to the list is one write (importing saves every 10 addresses found), within the free allowance of 1,000 writes a day. A change can take up to about a minute to show on a device in another part of the world.


For anyone editing the code

index.html has three parts, all commented in detail:

  1. Page layout and styles (HTML and CSS). Colours are named settings at the top of the styles, with light and dark versions.
  2. Core: all calculations, with no screen and no internet: the route model (buildRoute) and re-timing at the speed limits (applyLimits), possible stops (buildCandidates), fuel planning (planFuel), the drop-off order (bestPath), time zones, sunrise and sunset, the Light column (legLight), the sheet and day totals (computeSheet), opening hours, weather codes, and the Shell Card brand rules (shellCardStatus). Copied into a .js file, it can be tested on its own in Node.js. (samplePoints, scoreCand, chooseStops and pickOne are not used.)
  3. The page script: the Trip form, online lookups, the speed limits (signedLimits), funeral directors, Shell Card stations, the drop-off order (orderDrops), stop placing (planStops), map, sheet drawing, editing, export and saving.

The shared funeral director list is served by functions/api/funeral-directors.js (Cloudflare Pages Function, stored in KV under the key funeral-directors); its comments describe the requests. The page looks for it on start-up and falls back to the browser's own list without it.

Where to change things:

The developer notes (DEVELOPER.md, next to the public folder) summarise the design and how it was tested.