It works!

Collumns with time, unused data and beats per minute
Columns with time, unused data and beats per minute

I’ve made myself very happy tonight. I decided to write the code that invents the data from the Suunto watch, that was lost yesterday. I wanted the date and times to be right but the beats per minute would just be 10 everywhere. The strangest thing happened when I was programming. I didn’t understand quite what I was doing I just followed the logic without actually using my brain the way I usually do. Step by step I worked through the hour, minute, second and day numbers. They of course have to be incremented with 1, 1, 10 and 1 when they’ve reached a certain value. So when the minutes and seconds are at 59 and 59 a new hour must start and their values must be reset to 09 and 00. I typed it out and it worked the first time! The I only had to add the leading zero for minutes and seconds. And now I’ve got myself 4158 lines of fake data from my Suunto watch 🙂 I can use this to prepare the big data file which holds all the data for that day.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.