Robertlees, this programme of yours looks promising. Thanks for putting so much effort into this!
Are you planning to eventually include 'training data'? It would be nice to have log entries for heart rate (HR) zone (plus time in, below, above that HR zone), average, maximum and recovery HR. Weather conditions and perception of the ride are also worth thinking about.