library(tidyverse)
library(flextable)
source("../_munro-toolkit.R")
# The two hills, heights from the Database of British and Irish Hills
summits <- tribble(
~name, ~height, ~lat, ~lon,
"Ben Lui", 1130, 56.3977, -4.8114,
"Beinn a' Chlèibh", 916, 56.3902, -4.8355
)
# Watch data, decoded from the .fit file in data/ (see the notes at the end).
# The barometric altimeter read 1153 m on Ben Lui (map: 1130 m), so the
# whole profile is shifted down 23 m to put the high point at 1130 m.
track <- munro_read_track("data/track.csv", calibrate_to = 1130)
segs <- munro_segments(track, width = 250)
hard <- munro_hard(segs, n = 3)
reached <- munro_summits(track, summits)
stats <- munro_stats(track, tibble())
# Phone photos have a timestamp but no GPS, so each one is placed on the
# track at the point nearest the time it was taken
photos <- munro_photos("photos.csv", tr = track)
# The walk in six stages, by distance along the route (km)
stages <- tribble(
~stage, ~name, ~from, ~to,
1, "The river and the forest track", 0.0, 1.6,
2, "Eas Daimh and Fionn Choirein", 1.6, 3.0,
3, "The north-west ridge", 3.0, 4.6,
4, "Ben Lui: summit and macaroni pie", 4.6, 5.0,
5, "Over to Beinn a' Chlèibh", 5.0, 6.5,
6, "Down, through the forest, and wet again", 6.5, 10.8
) |>
munro_stages(tr = track, segs = segs)
# Features to label in the map margins (in addition to the summits, start
# and hard bits, which are added automatically)
features <- tribble(
~label, ~lat, ~lon, ~kind,
"River Lochy crossing", 56.4078, -4.8560, "river",
"Eas Daimh waterfall", 56.4039, -4.8424, "note",
"Lunch stop", 56.3967, -4.8122, "note",
"Railway underpass", 56.4076, -4.8558, "note"
)