kinda +1 on this: either
A) make completely separate record and playback functions and call them individually in main(), or

B) just change the name of `record_waypoints()` to something like 'record_and_play()'